From 5e92ae6b361f9221f5c5f9a39ab4c28a36597a77 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 21 Nov 2023 11:40:59 +0100 Subject: Regenerate most of the test files --- tests/coq/traits/Primitives.v | 88 +++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 40 deletions(-) (limited to 'tests/coq/traits') diff --git a/tests/coq/traits/Primitives.v b/tests/coq/traits/Primitives.v index 85e38f01..83f860b6 100644 --- a/tests/coq/traits/Primitives.v +++ b/tests/coq/traits/Primitives.v @@ -467,14 +467,14 @@ Definition alloc_boxed_Box_deref_mut (T : Type) (x : T) : result T := Return x. Definition alloc_boxed_Box_deref_mut_back (T : Type) (_ : T) (x : T) : result T := Return x. (* Trait instance *) -Definition alloc_boxed_Box_coreOpsDerefInst (Self : Type) : core_ops_deref_Deref Self := {| +Definition alloc_boxed_Box_coreopsDerefInst (Self : Type) : core_ops_deref_Deref Self := {| core_ops_deref_Deref_target := Self; core_ops_deref_Deref_deref := alloc_boxed_Box_deref Self; |}. (* Trait instance *) -Definition alloc_boxed_Box_coreOpsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {| - core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreOpsDerefInst Self; +Definition alloc_boxed_Box_coreopsDerefMutInst (Self : Type) : core_ops_deref_DerefMut Self := {| + core_ops_deref_DerefMut_derefInst := alloc_boxed_Box_coreopsDerefInst Self; core_ops_deref_DerefMut_deref_mut := alloc_boxed_Box_deref_mut Self; core_ops_deref_DerefMut_deref_mut_back := alloc_boxed_Box_deref_mut_back Self; |}. @@ -576,7 +576,7 @@ Definition alloc_vec_Vec_insert (T: Type) (v: alloc_vec_Vec T) (i: usize) (x: T) else Fail_ Failure). (* Helper *) -Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result T. +Axiom alloc_vec_Vec_index_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize), result T. (* Helper *) Axiom alloc_vec_Vec_update_usize : forall {T : Type} (v : alloc_vec_Vec T) (i : usize) (x : T), result (alloc_vec_Vec T). @@ -620,18 +620,18 @@ Definition core_slice_index_Slice_index end. (* [core::slice::index::Range:::get]: forward function *) -Axiom core_slice_index_Range_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)). +Axiom core_slice_index_RangeUsize_get : forall (T : Type) (i : core_ops_range_Range usize) (s : slice T), result (option (slice T)). (* [core::slice::index::Range::get_mut]: forward function *) -Axiom core_slice_index_Range_get_mut : +Axiom core_slice_index_RangeUsize_get_mut : forall (T : Type), core_ops_range_Range usize -> slice T -> result (option (slice T)). (* [core::slice::index::Range::get_mut]: backward function 0 *) -Axiom core_slice_index_Range_get_mut_back : +Axiom core_slice_index_RangeUsize_get_mut_back : forall (T : Type), core_ops_range_Range usize -> slice T -> option (slice T) -> result (slice T). (* [core::slice::index::Range::get_unchecked]: forward function *) -Definition core_slice_index_Range_get_unchecked +Definition core_slice_index_RangeUsize_get_unchecked (T : Type) : core_ops_range_Range usize -> const_raw_ptr (slice T) -> result (const_raw_ptr (slice T)) := (* Don't know what the model should be - for now we always fail to make @@ -639,7 +639,7 @@ Definition core_slice_index_Range_get_unchecked fun _ _ => Fail_ Failure. (* [core::slice::index::Range::get_unchecked_mut]: forward function *) -Definition core_slice_index_Range_get_unchecked_mut +Definition core_slice_index_RangeUsize_get_unchecked_mut (T : Type) : core_ops_range_Range usize -> mut_raw_ptr (slice T) -> result (mut_raw_ptr (slice T)) := (* Don't know what the model should be - for now we always fail to make @@ -647,15 +647,15 @@ Definition core_slice_index_Range_get_unchecked_mut fun _ _ => Fail_ Failure. (* [core::slice::index::Range::index]: forward function *) -Axiom core_slice_index_Range_index : +Axiom core_slice_index_RangeUsize_index : forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T). (* [core::slice::index::Range::index_mut]: forward function *) -Axiom core_slice_index_Range_index_mut : +Axiom core_slice_index_RangeUsize_index_mut : forall (T : Type), core_ops_range_Range usize -> slice T -> result (slice T). (* [core::slice::index::Range::index_mut]: backward function 0 *) -Axiom core_slice_index_Range_index_mut_back : +Axiom core_slice_index_RangeUsize_index_mut_back : forall (T : Type), core_ops_range_Range usize -> slice T -> slice T -> result (slice T). (* [core::slice::index::[T]::index_mut]: forward function *) @@ -683,44 +683,44 @@ Axiom core_array_Array_index_mut_back : forall (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx) (a : array T N) (i : Idx) (x : inst.(core_ops_index_IndexMut_indexInst).(core_ops_index_Index_Output)), result (array T N). -(* Trait implementation: [core::slice::index::[T]] *) -Definition core_slice_index_Slice_coreopsindexIndexInst (T Idx : Type) - (inst : core_slice_index_SliceIndex Idx (slice T)) : - core_ops_index_Index (slice T) Idx := {| - core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output); - core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst; -|}. - (* Trait implementation: [core::slice::index::private_slice_index::Range] *) -Definition core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst +Definition core_slice_index_private_slice_index_SealedRangeUsizeInst : core_slice_index_private_slice_index_Sealed (core_ops_range_Range usize) := tt. (* Trait implementation: [core::slice::index::Range] *) -Definition core_slice_index_Range_coresliceindexSliceIndexInst (T : Type) : +Definition core_slice_index_SliceIndexRangeUsizeSliceTInst (T : Type) : core_slice_index_SliceIndex (core_ops_range_Range usize) (slice T) := {| - core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_Range_coresliceindexprivate_slice_indexSealedInst; + core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedRangeUsizeInst; core_slice_index_SliceIndex_Output := slice T; - core_slice_index_SliceIndex_get := core_slice_index_Range_get T; - core_slice_index_SliceIndex_get_mut := core_slice_index_Range_get_mut T; - core_slice_index_SliceIndex_get_mut_back := core_slice_index_Range_get_mut_back T; - core_slice_index_SliceIndex_get_unchecked := core_slice_index_Range_get_unchecked T; - core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_Range_get_unchecked_mut T; - core_slice_index_SliceIndex_index := core_slice_index_Range_index T; - core_slice_index_SliceIndex_index_mut := core_slice_index_Range_index_mut T; - core_slice_index_SliceIndex_index_mut_back := core_slice_index_Range_index_mut_back T; + core_slice_index_SliceIndex_get := core_slice_index_RangeUsize_get T; + core_slice_index_SliceIndex_get_mut := core_slice_index_RangeUsize_get_mut T; + core_slice_index_SliceIndex_get_mut_back := core_slice_index_RangeUsize_get_mut_back T; + core_slice_index_SliceIndex_get_unchecked := core_slice_index_RangeUsize_get_unchecked T; + core_slice_index_SliceIndex_get_unchecked_mut := core_slice_index_RangeUsize_get_unchecked_mut T; + core_slice_index_SliceIndex_index := core_slice_index_RangeUsize_index T; + core_slice_index_SliceIndex_index_mut := core_slice_index_RangeUsize_index_mut T; + core_slice_index_SliceIndex_index_mut_back := core_slice_index_RangeUsize_index_mut_back T; +|}. + +(* Trait implementation: [core::slice::index::[T]] *) +Definition core_ops_index_IndexSliceTIInst (T Idx : Type) + (inst : core_slice_index_SliceIndex Idx (slice T)) : + core_ops_index_Index (slice T) Idx := {| + core_ops_index_Index_Output := inst.(core_slice_index_SliceIndex_Output); + core_ops_index_Index_index := core_slice_index_Slice_index T Idx inst; |}. (* Trait implementation: [core::slice::index::[T]] *) -Definition core_slice_index_Slice_coreopsindexIndexMutInst (T Idx : Type) +Definition core_ops_index_IndexMutSliceTIInst (T Idx : Type) (inst : core_slice_index_SliceIndex Idx (slice T)) : core_ops_index_IndexMut (slice T) Idx := {| - core_ops_index_IndexMut_indexInst := core_slice_index_Slice_coreopsindexIndexInst T Idx inst; + core_ops_index_IndexMut_indexInst := core_ops_index_IndexSliceTIInst T Idx inst; core_ops_index_IndexMut_index_mut := core_slice_index_Slice_index_mut T Idx inst; core_ops_index_IndexMut_index_mut_back := core_slice_index_Slice_index_mut_back T Idx inst; |}. (* Trait implementation: [core::array::[T; N]] *) -Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize) +Definition core_ops_index_IndexArrayInst (T Idx : Type) (N : usize) (inst : core_ops_index_Index (slice T) Idx) : core_ops_index_Index (array T N) Idx := {| core_ops_index_Index_Output := inst.(core_ops_index_Index_Output); @@ -728,10 +728,10 @@ Definition core_array_Array_coreopsindexIndexInst (T Idx : Type) (N : usize) |}. (* Trait implementation: [core::array::[T; N]] *) -Definition core_array_Array_coreopsindexIndexMutInst (T Idx : Type) (N : usize) +Definition core_ops_index_IndexMutArrayInst (T Idx : Type) (N : usize) (inst : core_ops_index_IndexMut (slice T) Idx) : core_ops_index_IndexMut (array T N) Idx := {| - core_ops_index_IndexMut_indexInst := core_array_Array_coreopsindexIndexInst T Idx N inst.(core_ops_index_IndexMut_indexInst); + core_ops_index_IndexMut_indexInst := core_ops_index_IndexArrayInst T Idx N inst.(core_ops_index_IndexMut_indexInst); core_ops_index_IndexMut_index_mut := core_array_Array_index_mut T Idx N inst; core_ops_index_IndexMut_index_mut_back := core_array_Array_index_mut_back T Idx N inst; |}. @@ -765,13 +765,13 @@ Axiom core_slice_index_usize_index_mut_back : forall (T : Type), usize -> slice T -> T -> result (slice T). (* Trait implementation: [core::slice::index::private_slice_index::usize] *) -Definition core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst +Definition core_slice_index_private_slice_index_SealedUsizeInst : core_slice_index_private_slice_index_Sealed usize := tt. (* Trait implementation: [core::slice::index::usize] *) -Definition core_slice_index_usize_coresliceindexSliceIndexInst (T : Type) : +Definition core_slice_index_SliceIndexUsizeSliceTInst (T : Type) : core_slice_index_SliceIndex usize (slice T) := {| - core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_usize_coresliceindexprivate_slice_indexSealedInst; + core_slice_index_SliceIndex_sealedInst := core_slice_index_private_slice_index_SealedUsizeInst; core_slice_index_SliceIndex_Output := T; core_slice_index_SliceIndex_get := core_slice_index_usize_get T; core_slice_index_SliceIndex_get_mut := core_slice_index_usize_get_mut T; @@ -815,8 +815,16 @@ Definition alloc_vec_Vec_coreopsindexIndexMutInst (T Idx : Type) (*** Theorems *) +Axiom alloc_vec_Vec_index_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a), + alloc_vec_Vec_index a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i = + alloc_vec_Vec_index_usize v i. + +Axiom alloc_vec_Vec_index_mut_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a), + alloc_vec_Vec_index_mut a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i = + alloc_vec_Vec_index_usize v i. + Axiom alloc_vec_Vec_index_mut_back_eq : forall {a : Type} (v : alloc_vec_Vec a) (i : usize) (x : a), - alloc_vec_Vec_index_mut_back a usize (core_slice_index_usize_coresliceindexSliceIndexInst a) v i x = + alloc_vec_Vec_index_mut_back a usize (core_slice_index_SliceIndexUsizeSliceTInst a) v i x = alloc_vec_Vec_update_usize v i x. End Primitives. -- cgit v1.2.3 From 46ab0fc047c69d14e52415bd8b76be167771cd58 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 21 Nov 2023 11:46:10 +0100 Subject: Regenerate the Traits files --- tests/coq/traits/Traits.v | 126 ++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 60 deletions(-) (limited to 'tests/coq/traits') diff --git a/tests/coq/traits/Traits.v b/tests/coq/traits/Traits.v index e104fb66..a25d5089 100644 --- a/tests/coq/traits/Traits.v +++ b/tests/coq/traits/Traits.v @@ -16,12 +16,12 @@ Record BoolTrait_t (Self : Type) := mkBoolTrait_t { Arguments mkBoolTrait_t { _ }. Arguments BoolTrait_t_get_bool { _ }. -(** [traits::Bool::{0}::get_bool]: forward function *) +(** [traits::{bool}::get_bool]: forward function *) Definition bool_get_bool (self : bool) : result bool := Return self. -(** Trait implementation: [traits::Bool::{0}] *) -Definition Bool_BoolTraitInst : BoolTrait_t bool := {| +(** Trait implementation: [traits::{bool}] *) +Definition traits_BoolTraitBoolInst : BoolTrait_t bool := {| BoolTrait_t_get_bool := bool_get_bool; |}. @@ -34,23 +34,26 @@ Definition boolTrait_ret_true (** [traits::test_bool_trait_bool]: forward function *) Definition test_bool_trait_bool (x : bool) : result bool := b <- bool_get_bool x; - if b then boolTrait_ret_true Bool_BoolTraitInst x else Return false + if b then boolTrait_ret_true traits_BoolTraitBoolInst x else Return false . -(** [traits::Option::{1}::get_bool]: forward function *) +(** [traits::{core::option::Option#1}::get_bool]: forward function *) Definition option_get_bool (T : Type) (self : option T) : result bool := match self with | None => Return false | Some t => Return true end . -(** Trait implementation: [traits::Option::{1}] *) -Definition Option_BoolTraitInst (T : Type) : BoolTrait_t (option T) := {| +(** Trait implementation: [traits::{core::option::Option#1}] *) +Definition traits_BoolTraitcoreoptionOptionTInst (T : Type) : BoolTrait_t + (option T) := {| BoolTrait_t_get_bool := option_get_bool T; |}. (** [traits::test_bool_trait_option]: forward function *) Definition test_bool_trait_option (T : Type) (x : option T) : result bool := b <- option_get_bool T x; - if b then boolTrait_ret_true (Option_BoolTraitInst T) x else Return false + if b + then boolTrait_ret_true (traits_BoolTraitcoreoptionOptionTInst T) x + else Return false . (** [traits::test_bool_trait]: forward function *) @@ -67,15 +70,17 @@ Record ToU64_t (Self : Type) := mkToU64_t { Arguments mkToU64_t { _ }. Arguments ToU64_t_to_u64 { _ }. -(** [traits::u64::{2}::to_u64]: forward function *) +(** [traits::{u64#2}::to_u64]: forward function *) Definition u64_to_u64 (self : u64) : result u64 := Return self. -(** Trait implementation: [traits::u64::{2}] *) -Definition u64_ToU64Inst : ToU64_t u64 := {| ToU64_t_to_u64 := u64_to_u64; |}. +(** Trait implementation: [traits::{u64#2}] *) +Definition traits_ToU64U64Inst : ToU64_t u64 := {| + ToU64_t_to_u64 := u64_to_u64; +|}. -(** [traits::Tuple2::{3}::to_u64]: forward function *) -Definition tuple2_to_u64 +(** [traits::{(A, A)#3}::to_u64]: forward function *) +Definition pair_to_u64 (A : Type) (inst : ToU64_t A) (self : (A * A)) : result u64 := let (t, t0) := self in i <- inst.(ToU64_t_to_u64) t; @@ -83,15 +88,15 @@ Definition tuple2_to_u64 u64_add i i0 . -(** Trait implementation: [traits::Tuple2::{3}] *) -Definition Tuple2_ToU64Inst (A : Type) (inst : ToU64_t A) : ToU64_t (A * A) - := {| - ToU64_t_to_u64 := tuple2_to_u64 A inst; +(** Trait implementation: [traits::{(A, A)#3}] *) +Definition traits_ToU64TupleAAInst (A : Type) (inst : ToU64_t A) : ToU64_t (A * + A) := {| + ToU64_t_to_u64 := pair_to_u64 A inst; |}. (** [traits::f]: forward function *) Definition f (T : Type) (inst : ToU64_t T) (x : (T * T)) : result u64 := - tuple2_to_u64 T inst x + pair_to_u64 T inst x . (** [traits::g]: forward function *) @@ -109,21 +114,21 @@ Record Wrapper_t (T : Type) := mkWrapper_t { wrapper_x : T; }. Arguments mkWrapper_t { _ }. Arguments wrapper_x { _ }. -(** [traits::Wrapper::{4}::to_u64]: forward function *) +(** [traits::{traits::Wrapper#4}::to_u64]: forward function *) Definition wrapper_to_u64 (T : Type) (inst : ToU64_t T) (self : Wrapper_t T) : result u64 := inst.(ToU64_t_to_u64) self.(wrapper_x) . -(** Trait implementation: [traits::Wrapper::{4}] *) -Definition Wrapper_ToU64Inst (T : Type) (inst : ToU64_t T) : ToU64_t (Wrapper_t - T) := {| +(** Trait implementation: [traits::{traits::Wrapper#4}] *) +Definition traits_ToU64traitsWrapperTInst (T : Type) (inst : ToU64_t T) : + ToU64_t (Wrapper_t T) := {| ToU64_t_to_u64 := wrapper_to_u64 T inst; |}. (** [traits::h1]: forward function *) Definition h1 (x : Wrapper_t u64) : result u64 := - wrapper_to_u64 u64 u64_ToU64Inst x + wrapper_to_u64 u64 traits_ToU64U64Inst x . (** [traits::h2]: forward function *) @@ -139,12 +144,12 @@ Record ToType_t (Self T : Type) := mkToType_t { Arguments mkToType_t { _ _ }. Arguments ToType_t_to_type { _ _ }. -(** [traits::u64::{5}::to_type]: forward function *) +(** [traits::{u64#5}::to_type]: forward function *) Definition u64_to_type (self : u64) : result bool := Return (self s> 0%u64). -(** Trait implementation: [traits::u64::{5}] *) -Definition u64_ToTypeInst : ToType_t u64 bool := {| +(** Trait implementation: [traits::{u64#5}] *) +Definition traits_ToTypeU64BoolInst : ToType_t u64 bool := {| ToType_t_to_type := u64_to_type; |}. @@ -189,14 +194,14 @@ Record TestType_t (T : Type) := mkTestType_t { testType_0 : T; }. Arguments mkTestType_t { _ }. Arguments testType_0 { _ }. -(** [traits::TestType::{6}::test::TestType1] *) +(** [traits::{traits::TestType#6}::test::TestType1] *) Record TestType_test_TestType1_t := mkTestType_test_TestType1_t { testType_test_TestType1_0 : u64; } . -(** Trait declaration: [traits::TestType::{6}::test::TestTrait] *) +(** Trait declaration: [traits::{traits::TestType#6}::test::TestTrait] *) Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t { TestType_test_TestTrait_t_test : Self -> result bool; }. @@ -204,19 +209,19 @@ Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t { Arguments mkTestType_test_TestTrait_t { _ }. Arguments TestType_test_TestTrait_t_test { _ }. -(** [traits::TestType::{6}::test::TestType1::{0}::test]: forward function *) +(** [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}::test]: forward function *) Definition testType_test_TestType1_test (self : TestType_test_TestType1_t) : result bool := Return (self.(testType_test_TestType1_0) s> 1%u64) . -(** Trait implementation: [traits::TestType::{6}::test::TestType1::{0}] *) -Definition TestType_test_TestType1_TestType_test_TestTraitInst : - TestType_test_TestTrait_t TestType_test_TestType1_t := {| +(** Trait implementation: [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}] *) +Definition traits_TestType_test_TestTraittraitstraitsTestTypeTtestTestType1Inst + : TestType_test_TestTrait_t TestType_test_TestType1_t := {| TestType_test_TestTrait_t_test := testType_test_TestType1_test; |}. -(** [traits::TestType::{6}::test]: forward function *) +(** [traits::{traits::TestType#6}::test]: forward function *) Definition testType_test (T : Type) (inst : ToU64_t T) (self : TestType_t T) (x : T) : result bool := x0 <- inst.(ToU64_t_to_u64) x; @@ -228,15 +233,15 @@ Definition testType_test (** [traits::BoolWrapper] *) Record BoolWrapper_t := mkBoolWrapper_t { boolWrapper_0 : bool; }. -(** [traits::BoolWrapper::{7}::to_type]: forward function *) +(** [traits::{traits::BoolWrapper#7}::to_type]: forward function *) Definition boolWrapper_to_type (T : Type) (inst : ToType_t bool T) (self : BoolWrapper_t) : result T := inst.(ToType_t_to_type) self.(boolWrapper_0) . -(** Trait implementation: [traits::BoolWrapper::{7}] *) -Definition BoolWrapper_ToTypeInst (T : Type) (inst : ToType_t bool T) : - ToType_t BoolWrapper_t T := {| +(** Trait implementation: [traits::{traits::BoolWrapper#7}] *) +Definition traits_ToTypetraitsBoolWrapperTInst (T : Type) (inst : ToType_t bool + T) : ToType_t BoolWrapper_t T := {| ToType_t_to_type := boolWrapper_to_type T inst; |}. @@ -263,22 +268,22 @@ Arguments WithConstTy_tWithConstTy_t_W { _ _ }. Arguments WithConstTy_tWithConstTy_t_W_clause_0 { _ _ }. Arguments WithConstTy_t_f { _ _ }. -(** [traits::Bool::{8}::LEN1] *) +(** [traits::{bool#8}::LEN1] *) Definition bool_len1_body : result usize := Return 12%usize. Definition bool_len1_c : usize := bool_len1_body%global. -(** [traits::Bool::{8}::f]: merged forward/backward function +(** [traits::{bool#8}::f]: merged forward/backward function (there is a single backward function, and the forward function returns ()) *) Definition bool_f (i : u64) (a : array u8 32%usize) : result u64 := Return i. -(** Trait implementation: [traits::Bool::{8}] *) -Definition Bool_WithConstTyInst : WithConstTy_t bool 32%usize := {| +(** Trait implementation: [traits::{bool#8}] *) +Definition traits_WithConstTyBool32Inst : WithConstTy_t bool 32%usize := {| WithConstTy_tWithConstTy_t_LEN1 := bool_len1_c; WithConstTy_tWithConstTy_t_LEN2 := with_const_ty_len2_c; WithConstTy_tWithConstTy_t_V := u8; WithConstTy_tWithConstTy_t_W := u64; - WithConstTy_tWithConstTy_t_W_clause_0 := u64_ToU64Inst; + WithConstTy_tWithConstTy_t_W_clause_0 := traits_ToU64U64Inst; WithConstTy_t_f := bool_f; |}. @@ -377,12 +382,13 @@ Record ChildTrait1_t (Self : Type) := mkChildTrait1_t { Arguments mkChildTrait1_t { _ }. Arguments ChildTrait1_tChildTrait1_t_parent_clause_0 { _ }. -(** Trait implementation: [traits::usize::{9}] *) -Definition usize_ParentTrait1Inst : ParentTrait1_t usize := mkParentTrait1_t. +(** Trait implementation: [traits::{usize#9}] *) +Definition traits_ParentTrait1UsizeInst : ParentTrait1_t usize + := mkParentTrait1_t. -(** Trait implementation: [traits::usize::{10}] *) -Definition usize_ChildTrait1Inst : ChildTrait1_t usize := {| - ChildTrait1_tChildTrait1_t_parent_clause_0 := usize_ParentTrait1Inst; +(** Trait implementation: [traits::{usize#10}] *) +Definition traits_ChildTrait1UsizeInst : ChildTrait1_t usize := {| + ChildTrait1_tChildTrait1_t_parent_clause_0 := traits_ParentTrait1UsizeInst; |}. (** Trait declaration: [traits::Iterator] *) @@ -456,31 +462,27 @@ Arguments mkChildTrait2_t { _ }. Arguments ChildTrait2_tChildTrait2_t_parent_clause_0 { _ }. Arguments ChildTrait2_t_convert { _ }. -(** Trait implementation: [traits::u32::{11}] *) -Definition u32_WithTargetInst : WithTarget_t u32 := {| +(** Trait implementation: [traits::{u32#11}] *) +Definition traits_WithTargetU32Inst : WithTarget_t u32 := {| WithTarget_tWithTarget_t_Target := u32; |}. -(** Trait implementation: [traits::u32::{12}] *) -Definition u32_ParentTrait2Inst : ParentTrait2_t u32 := {| +(** Trait implementation: [traits::{u32#12}] *) +Definition traits_ParentTrait2U32Inst : ParentTrait2_t u32 := {| ParentTrait2_tParentTrait2_t_U := u32; - ParentTrait2_tParentTrait2_t_U_clause_0 := u32_WithTargetInst; + ParentTrait2_tParentTrait2_t_U_clause_0 := traits_WithTargetU32Inst; |}. -(** [traits::u32::{13}::convert]: forward function *) +(** [traits::{u32#13}::convert]: forward function *) Definition u32_convert (x : u32) : result u32 := Return x. -(** Trait implementation: [traits::u32::{13}] *) -Definition u32_ChildTrait2Inst : ChildTrait2_t u32 := {| - ChildTrait2_tChildTrait2_t_parent_clause_0 := u32_ParentTrait2Inst; +(** Trait implementation: [traits::{u32#13}] *) +Definition traits_ChildTrait2U32Inst : ChildTrait2_t u32 := {| + ChildTrait2_tChildTrait2_t_parent_clause_0 := traits_ParentTrait2U32Inst; ChildTrait2_t_convert := u32_convert; |}. -(** [traits::incr_u32]: forward function *) -Definition incr_u32 (x : u32) : result u32 := - u32_add x 1%u32. - (** Trait declaration: [traits::CFnOnce] *) Record CFnOnce_t (Self Args : Type) := mkCFnOnce_t { CFnOnce_tCFnOnce_t_Output : Type; @@ -517,4 +519,8 @@ Arguments mkCFn_t { _ _ }. Arguments CFn_tCFn_t_parent_clause_0 { _ _ }. Arguments CFn_t_call_mut { _ _ }. +(** [traits::incr_u32]: forward function *) +Definition incr_u32 (x : u32) : result u32 := + u32_add x 1%u32. + End Traits . -- cgit v1.2.3 From 137cc7335e64fcb70c254e7fd2a6fa353fb43e61 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 21 Nov 2023 14:57:38 +0100 Subject: Regenerate the files --- tests/coq/traits/Traits.v | 219 ++++++++++++++++++++++++++++++---------------- 1 file changed, 146 insertions(+), 73 deletions(-) (limited to 'tests/coq/traits') diff --git a/tests/coq/traits/Traits.v b/tests/coq/traits/Traits.v index a25d5089..f0875a29 100644 --- a/tests/coq/traits/Traits.v +++ b/tests/coq/traits/Traits.v @@ -8,7 +8,8 @@ Import ListNotations. Local Open Scope Primitives_scope. Module Traits. -(** Trait declaration: [traits::BoolTrait] *) +(** Trait declaration: [traits::BoolTrait] + Source: 'src/traits.rs', lines 1:0-1:19 *) Record BoolTrait_t (Self : Type) := mkBoolTrait_t { BoolTrait_t_get_bool : Self -> result bool; }. @@ -16,39 +17,46 @@ Record BoolTrait_t (Self : Type) := mkBoolTrait_t { Arguments mkBoolTrait_t { _ }. Arguments BoolTrait_t_get_bool { _ }. -(** [traits::{bool}::get_bool]: forward function *) +(** [traits::{bool}::get_bool]: forward function + Source: 'src/traits.rs', lines 12:4-12:30 *) Definition bool_get_bool (self : bool) : result bool := Return self. -(** Trait implementation: [traits::{bool}] *) +(** Trait implementation: [traits::{bool}] + Source: 'src/traits.rs', lines 11:0-11:23 *) Definition traits_BoolTraitBoolInst : BoolTrait_t bool := {| BoolTrait_t_get_bool := bool_get_bool; |}. -(** [traits::BoolTrait::ret_true]: forward function *) +(** [traits::BoolTrait::ret_true]: forward function + Source: 'src/traits.rs', lines 6:4-6:30 *) Definition boolTrait_ret_true {Self : Type} (self_clause : BoolTrait_t Self) (self : Self) : result bool := Return true . -(** [traits::test_bool_trait_bool]: forward function *) +(** [traits::test_bool_trait_bool]: forward function + Source: 'src/traits.rs', lines 17:0-17:44 *) Definition test_bool_trait_bool (x : bool) : result bool := b <- bool_get_bool x; if b then boolTrait_ret_true traits_BoolTraitBoolInst x else Return false . -(** [traits::{core::option::Option#1}::get_bool]: forward function *) +(** [traits::{core::option::Option#1}::get_bool]: forward function + Source: 'src/traits.rs', lines 23:4-23:30 *) Definition option_get_bool (T : Type) (self : option T) : result bool := match self with | None => Return false | Some t => Return true end . -(** Trait implementation: [traits::{core::option::Option#1}] *) +(** Trait implementation: [traits::{core::option::Option#1}] + Source: 'src/traits.rs', lines 22:0-22:31 *) Definition traits_BoolTraitcoreoptionOptionTInst (T : Type) : BoolTrait_t (option T) := {| BoolTrait_t_get_bool := option_get_bool T; |}. -(** [traits::test_bool_trait_option]: forward function *) +(** [traits::test_bool_trait_option]: forward function + Source: 'src/traits.rs', lines 31:0-31:54 *) Definition test_bool_trait_option (T : Type) (x : option T) : result bool := b <- option_get_bool T x; if b @@ -56,13 +64,15 @@ Definition test_bool_trait_option (T : Type) (x : option T) : result bool := else Return false . -(** [traits::test_bool_trait]: forward function *) +(** [traits::test_bool_trait]: forward function + Source: 'src/traits.rs', lines 35:0-35:50 *) Definition test_bool_trait (T : Type) (inst : BoolTrait_t T) (x : T) : result bool := inst.(BoolTrait_t_get_bool) x . -(** Trait declaration: [traits::ToU64] *) +(** Trait declaration: [traits::ToU64] + Source: 'src/traits.rs', lines 39:0-39:15 *) Record ToU64_t (Self : Type) := mkToU64_t { ToU64_t_to_u64 : Self -> result u64; }. @@ -70,16 +80,19 @@ Record ToU64_t (Self : Type) := mkToU64_t { Arguments mkToU64_t { _ }. Arguments ToU64_t_to_u64 { _ }. -(** [traits::{u64#2}::to_u64]: forward function *) +(** [traits::{u64#2}::to_u64]: forward function + Source: 'src/traits.rs', lines 44:4-44:26 *) Definition u64_to_u64 (self : u64) : result u64 := Return self. -(** Trait implementation: [traits::{u64#2}] *) +(** Trait implementation: [traits::{u64#2}] + Source: 'src/traits.rs', lines 43:0-43:18 *) Definition traits_ToU64U64Inst : ToU64_t u64 := {| ToU64_t_to_u64 := u64_to_u64; |}. -(** [traits::{(A, A)#3}::to_u64]: forward function *) +(** [traits::{(A, A)#3}::to_u64]: forward function + Source: 'src/traits.rs', lines 50:4-50:26 *) Definition pair_to_u64 (A : Type) (inst : ToU64_t A) (self : (A * A)) : result u64 := let (t, t0) := self in @@ -88,55 +101,65 @@ Definition pair_to_u64 u64_add i i0 . -(** Trait implementation: [traits::{(A, A)#3}] *) +(** Trait implementation: [traits::{(A, A)#3}] + Source: 'src/traits.rs', lines 49:0-49:31 *) Definition traits_ToU64TupleAAInst (A : Type) (inst : ToU64_t A) : ToU64_t (A * A) := {| ToU64_t_to_u64 := pair_to_u64 A inst; |}. -(** [traits::f]: forward function *) +(** [traits::f]: forward function + Source: 'src/traits.rs', lines 55:0-55:36 *) Definition f (T : Type) (inst : ToU64_t T) (x : (T * T)) : result u64 := pair_to_u64 T inst x . -(** [traits::g]: forward function *) +(** [traits::g]: forward function + Source: 'src/traits.rs', lines 59:0-61:18 *) Definition g (T : Type) (inst : ToU64_t (T * T)) (x : (T * T)) : result u64 := inst.(ToU64_t_to_u64) x . -(** [traits::h0]: forward function *) +(** [traits::h0]: forward function + Source: 'src/traits.rs', lines 66:0-66:24 *) Definition h0 (x : u64) : result u64 := u64_to_u64 x. -(** [traits::Wrapper] *) +(** [traits::Wrapper] + Source: 'src/traits.rs', lines 70:0-70:21 *) Record Wrapper_t (T : Type) := mkWrapper_t { wrapper_x : T; }. Arguments mkWrapper_t { _ }. Arguments wrapper_x { _ }. -(** [traits::{traits::Wrapper#4}::to_u64]: forward function *) +(** [traits::{traits::Wrapper#4}::to_u64]: forward function + Source: 'src/traits.rs', lines 75:4-75:26 *) Definition wrapper_to_u64 (T : Type) (inst : ToU64_t T) (self : Wrapper_t T) : result u64 := inst.(ToU64_t_to_u64) self.(wrapper_x) . -(** Trait implementation: [traits::{traits::Wrapper#4}] *) +(** Trait implementation: [traits::{traits::Wrapper#4}] + Source: 'src/traits.rs', lines 74:0-74:35 *) Definition traits_ToU64traitsWrapperTInst (T : Type) (inst : ToU64_t T) : ToU64_t (Wrapper_t T) := {| ToU64_t_to_u64 := wrapper_to_u64 T inst; |}. -(** [traits::h1]: forward function *) +(** [traits::h1]: forward function + Source: 'src/traits.rs', lines 80:0-80:33 *) Definition h1 (x : Wrapper_t u64) : result u64 := wrapper_to_u64 u64 traits_ToU64U64Inst x . -(** [traits::h2]: forward function *) +(** [traits::h2]: forward function + Source: 'src/traits.rs', lines 84:0-84:41 *) Definition h2 (T : Type) (inst : ToU64_t T) (x : Wrapper_t T) : result u64 := wrapper_to_u64 T inst x . -(** Trait declaration: [traits::ToType] *) +(** Trait declaration: [traits::ToType] + Source: 'src/traits.rs', lines 88:0-88:19 *) Record ToType_t (Self T : Type) := mkToType_t { ToType_t_to_type : Self -> result T; }. @@ -144,16 +167,19 @@ Record ToType_t (Self T : Type) := mkToType_t { Arguments mkToType_t { _ _ }. Arguments ToType_t_to_type { _ _ }. -(** [traits::{u64#5}::to_type]: forward function *) +(** [traits::{u64#5}::to_type]: forward function + Source: 'src/traits.rs', lines 93:4-93:28 *) Definition u64_to_type (self : u64) : result bool := Return (self s> 0%u64). -(** Trait implementation: [traits::{u64#5}] *) +(** Trait implementation: [traits::{u64#5}] + Source: 'src/traits.rs', lines 92:0-92:25 *) Definition traits_ToTypeU64BoolInst : ToType_t u64 bool := {| ToType_t_to_type := u64_to_type; |}. -(** Trait declaration: [traits::OfType] *) +(** Trait declaration: [traits::OfType] + Source: 'src/traits.rs', lines 98:0-98:16 *) Record OfType_t (Self : Type) := mkOfType_t { OfType_t_of_type : forall (T : Type) (inst : ToType_t T Self), T -> result Self; @@ -162,7 +188,8 @@ Record OfType_t (Self : Type) := mkOfType_t { Arguments mkOfType_t { _ }. Arguments OfType_t_of_type { _ }. -(** [traits::h3]: forward function *) +(** [traits::h3]: forward function + Source: 'src/traits.rs', lines 104:0-104:50 *) Definition h3 (T1 T2 : Type) (inst : OfType_t T1) (inst0 : ToType_t T2 T1) (y : T2) : result T1 @@ -170,7 +197,8 @@ Definition h3 inst.(OfType_t_of_type) T2 inst0 y . -(** Trait declaration: [traits::OfTypeBis] *) +(** Trait declaration: [traits::OfTypeBis] + Source: 'src/traits.rs', lines 109:0-109:36 *) Record OfTypeBis_t (Self T : Type) := mkOfTypeBis_t { OfTypeBis_tOfTypeBis_t_parent_clause_0 : ToType_t T Self; OfTypeBis_t_of_type : T -> result Self; @@ -180,7 +208,8 @@ Arguments mkOfTypeBis_t { _ _ }. Arguments OfTypeBis_tOfTypeBis_t_parent_clause_0 { _ _ }. Arguments OfTypeBis_t_of_type { _ _ }. -(** [traits::h4]: forward function *) +(** [traits::h4]: forward function + Source: 'src/traits.rs', lines 118:0-118:57 *) Definition h4 (T1 T2 : Type) (inst : OfTypeBis_t T1 T2) (inst0 : ToType_t T2 T1) (y : T2) : result T1 @@ -188,20 +217,23 @@ Definition h4 inst.(OfTypeBis_t_of_type) y . -(** [traits::TestType] *) +(** [traits::TestType] + Source: 'src/traits.rs', lines 122:0-122:22 *) Record TestType_t (T : Type) := mkTestType_t { testType_0 : T; }. Arguments mkTestType_t { _ }. Arguments testType_0 { _ }. -(** [traits::{traits::TestType#6}::test::TestType1] *) +(** [traits::{traits::TestType#6}::test::TestType1] + Source: 'src/traits.rs', lines 127:8-127:24 *) Record TestType_test_TestType1_t := mkTestType_test_TestType1_t { testType_test_TestType1_0 : u64; } . -(** Trait declaration: [traits::{traits::TestType#6}::test::TestTrait] *) +(** Trait declaration: [traits::{traits::TestType#6}::test::TestTrait] + Source: 'src/traits.rs', lines 128:8-128:23 *) Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t { TestType_test_TestTrait_t_test : Self -> result bool; }. @@ -209,19 +241,22 @@ Record TestType_test_TestTrait_t (Self : Type) := mkTestType_test_TestTrait_t { Arguments mkTestType_test_TestTrait_t { _ }. Arguments TestType_test_TestTrait_t_test { _ }. -(** [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}::test]: forward function *) +(** [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}::test]: forward function + Source: 'src/traits.rs', lines 139:12-139:34 *) Definition testType_test_TestType1_test (self : TestType_test_TestType1_t) : result bool := Return (self.(testType_test_TestType1_0) s> 1%u64) . -(** Trait implementation: [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}] *) +(** Trait implementation: [traits::{traits::TestType#6}::test::{traits::{traits::TestType#6}::test::TestType1}] + Source: 'src/traits.rs', lines 138:8-138:36 *) Definition traits_TestType_test_TestTraittraitstraitsTestTypeTtestTestType1Inst : TestType_test_TestTrait_t TestType_test_TestType1_t := {| TestType_test_TestTrait_t_test := testType_test_TestType1_test; |}. -(** [traits::{traits::TestType#6}::test]: forward function *) +(** [traits::{traits::TestType#6}::test]: forward function + Source: 'src/traits.rs', lines 126:4-126:36 *) Definition testType_test (T : Type) (inst : ToU64_t T) (self : TestType_t T) (x : T) : result bool := x0 <- inst.(ToU64_t_to_u64) x; @@ -230,26 +265,31 @@ Definition testType_test else Return false . -(** [traits::BoolWrapper] *) +(** [traits::BoolWrapper] + Source: 'src/traits.rs', lines 150:0-150:22 *) Record BoolWrapper_t := mkBoolWrapper_t { boolWrapper_0 : bool; }. -(** [traits::{traits::BoolWrapper#7}::to_type]: forward function *) +(** [traits::{traits::BoolWrapper#7}::to_type]: forward function + Source: 'src/traits.rs', lines 156:4-156:25 *) Definition boolWrapper_to_type (T : Type) (inst : ToType_t bool T) (self : BoolWrapper_t) : result T := inst.(ToType_t_to_type) self.(boolWrapper_0) . -(** Trait implementation: [traits::{traits::BoolWrapper#7}] *) +(** Trait implementation: [traits::{traits::BoolWrapper#7}] + Source: 'src/traits.rs', lines 152:0-152:33 *) Definition traits_ToTypetraitsBoolWrapperTInst (T : Type) (inst : ToType_t bool T) : ToType_t BoolWrapper_t T := {| ToType_t_to_type := boolWrapper_to_type T inst; |}. -(** [traits::WithConstTy::LEN2] *) +(** [traits::WithConstTy::LEN2] + Source: 'src/traits.rs', lines 164:4-164:21 *) Definition with_const_ty_len2_body : result usize := Return 32%usize. Definition with_const_ty_len2_c : usize := with_const_ty_len2_body%global. -(** Trait declaration: [traits::WithConstTy] *) +(** Trait declaration: [traits::WithConstTy] + Source: 'src/traits.rs', lines 161:0-161:39 *) Record WithConstTy_t (Self : Type) (LEN : usize) := mkWithConstTy_t { WithConstTy_tWithConstTy_t_LEN1 : usize; WithConstTy_tWithConstTy_t_LEN2 : usize; @@ -268,16 +308,19 @@ Arguments WithConstTy_tWithConstTy_t_W { _ _ }. Arguments WithConstTy_tWithConstTy_t_W_clause_0 { _ _ }. Arguments WithConstTy_t_f { _ _ }. -(** [traits::{bool#8}::LEN1] *) +(** [traits::{bool#8}::LEN1] + Source: 'src/traits.rs', lines 175:4-175:21 *) Definition bool_len1_body : result usize := Return 12%usize. Definition bool_len1_c : usize := bool_len1_body%global. (** [traits::{bool#8}::f]: merged forward/backward function - (there is a single backward function, and the forward function returns ()) *) + (there is a single backward function, and the forward function returns ()) + Source: 'src/traits.rs', lines 180:4-180:39 *) Definition bool_f (i : u64) (a : array u8 32%usize) : result u64 := Return i. -(** Trait implementation: [traits::{bool#8}] *) +(** Trait implementation: [traits::{bool#8}] + Source: 'src/traits.rs', lines 174:0-174:29 *) Definition traits_WithConstTyBool32Inst : WithConstTy_t bool 32%usize := {| WithConstTy_tWithConstTy_t_LEN1 := bool_len1_c; WithConstTy_tWithConstTy_t_LEN2 := with_const_ty_len2_c; @@ -287,13 +330,15 @@ Definition traits_WithConstTyBool32Inst : WithConstTy_t bool 32%usize := {| WithConstTy_t_f := bool_f; |}. -(** [traits::use_with_const_ty1]: forward function *) +(** [traits::use_with_const_ty1]: forward function + Source: 'src/traits.rs', lines 183:0-183:75 *) Definition use_with_const_ty1 (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) : result usize := let i := inst.(WithConstTy_tWithConstTy_t_LEN1) in Return i . -(** [traits::use_with_const_ty2]: forward function *) +(** [traits::use_with_const_ty2]: forward function + Source: 'src/traits.rs', lines 187:0-187:73 *) Definition use_with_const_ty2 (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) (w : inst.(WithConstTy_tWithConstTy_t_W)) : @@ -302,7 +347,8 @@ Definition use_with_const_ty2 Return tt . -(** [traits::use_with_const_ty3]: forward function *) +(** [traits::use_with_const_ty3]: forward function + Source: 'src/traits.rs', lines 189:0-189:80 *) Definition use_with_const_ty3 (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) (x : inst.(WithConstTy_tWithConstTy_t_W)) : @@ -311,20 +357,24 @@ Definition use_with_const_ty3 inst.(WithConstTy_tWithConstTy_t_W_clause_0).(ToU64_t_to_u64) x . -(** [traits::test_where1]: forward function *) +(** [traits::test_where1]: forward function + Source: 'src/traits.rs', lines 193:0-193:40 *) Definition test_where1 (T : Type) (_x : T) : result unit := Return tt. -(** [traits::test_where2]: forward function *) +(** [traits::test_where2]: forward function + Source: 'src/traits.rs', lines 194:0-194:57 *) Definition test_where2 (T : Type) (inst : WithConstTy_t T 32%usize) (_x : u32) : result unit := Return tt . -(** [alloc::string::String] *) +(** [alloc::string::String] + Source: '/rustc/d59363ad0b6391b7fc5bbb02c9ccf9300eef3753/library/alloc/src/string.rs', lines 365:0-365:17 *) Axiom alloc_string_String_t : Type. -(** Trait declaration: [traits::ParentTrait0] *) +(** Trait declaration: [traits::ParentTrait0] + Source: 'src/traits.rs', lines 200:0-200:22 *) Record ParentTrait0_t (Self : Type) := mkParentTrait0_t { ParentTrait0_tParentTrait0_t_W : Type; ParentTrait0_t_get_name : Self -> result alloc_string_String_t; @@ -336,12 +386,14 @@ Arguments ParentTrait0_tParentTrait0_t_W { _ }. Arguments ParentTrait0_t_get_name { _ }. Arguments ParentTrait0_t_get_w { _ }. -(** Trait declaration: [traits::ParentTrait1] *) +(** Trait declaration: [traits::ParentTrait1] + Source: 'src/traits.rs', lines 205:0-205:22 *) Record ParentTrait1_t (Self : Type) := mkParentTrait1_t{}. Arguments mkParentTrait1_t { _ }. -(** Trait declaration: [traits::ChildTrait] *) +(** Trait declaration: [traits::ChildTrait] + Source: 'src/traits.rs', lines 206:0-206:49 *) Record ChildTrait_t (Self : Type) := mkChildTrait_t { ChildTrait_tChildTrait_t_parent_clause_0 : ParentTrait0_t Self; ChildTrait_tChildTrait_t_parent_clause_1 : ParentTrait1_t Self; @@ -351,13 +403,15 @@ Arguments mkChildTrait_t { _ }. Arguments ChildTrait_tChildTrait_t_parent_clause_0 { _ }. Arguments ChildTrait_tChildTrait_t_parent_clause_1 { _ }. -(** [traits::test_child_trait1]: forward function *) +(** [traits::test_child_trait1]: forward function + Source: 'src/traits.rs', lines 209:0-209:56 *) Definition test_child_trait1 (T : Type) (inst : ChildTrait_t T) (x : T) : result alloc_string_String_t := inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_name) x . -(** [traits::test_child_trait2]: forward function *) +(** [traits::test_child_trait2]: forward function + Source: 'src/traits.rs', lines 213:0-213:54 *) Definition test_child_trait2 (T : Type) (inst : ChildTrait_t T) (x : T) : result @@ -366,7 +420,8 @@ Definition test_child_trait2 inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_w) x . -(** [traits::order1]: forward function *) +(** [traits::order1]: forward function + Source: 'src/traits.rs', lines 219:0-219:59 *) Definition order1 (T U : Type) (inst : ParentTrait0_t T) (inst0 : ParentTrait0_t U) : result unit @@ -374,7 +429,8 @@ Definition order1 Return tt . -(** Trait declaration: [traits::ChildTrait1] *) +(** Trait declaration: [traits::ChildTrait1] + Source: 'src/traits.rs', lines 222:0-222:35 *) Record ChildTrait1_t (Self : Type) := mkChildTrait1_t { ChildTrait1_tChildTrait1_t_parent_clause_0 : ParentTrait1_t Self; }. @@ -382,16 +438,19 @@ Record ChildTrait1_t (Self : Type) := mkChildTrait1_t { Arguments mkChildTrait1_t { _ }. Arguments ChildTrait1_tChildTrait1_t_parent_clause_0 { _ }. -(** Trait implementation: [traits::{usize#9}] *) +(** Trait implementation: [traits::{usize#9}] + Source: 'src/traits.rs', lines 224:0-224:27 *) Definition traits_ParentTrait1UsizeInst : ParentTrait1_t usize := mkParentTrait1_t. -(** Trait implementation: [traits::{usize#10}] *) +(** Trait implementation: [traits::{usize#10}] + Source: 'src/traits.rs', lines 225:0-225:26 *) Definition traits_ChildTrait1UsizeInst : ChildTrait1_t usize := {| ChildTrait1_tChildTrait1_t_parent_clause_0 := traits_ParentTrait1UsizeInst; |}. -(** Trait declaration: [traits::Iterator] *) +(** Trait declaration: [traits::Iterator] + Source: 'src/traits.rs', lines 229:0-229:18 *) Record Iterator_t (Self : Type) := mkIterator_t { Iterator_tIterator_t_Item : Type; }. @@ -399,7 +458,8 @@ Record Iterator_t (Self : Type) := mkIterator_t { Arguments mkIterator_t { _ }. Arguments Iterator_tIterator_t_Item { _ }. -(** Trait declaration: [traits::IntoIterator] *) +(** Trait declaration: [traits::IntoIterator] + Source: 'src/traits.rs', lines 233:0-233:22 *) Record IntoIterator_t (Self : Type) := mkIntoIterator_t { IntoIterator_tIntoIterator_t_Item : Type; IntoIterator_tIntoIterator_t_IntoIter : Type; @@ -415,12 +475,14 @@ Arguments IntoIterator_tIntoIterator_t_IntoIter { _ }. Arguments IntoIterator_tIntoIterator_t_IntoIter_clause_0 { _ }. Arguments IntoIterator_t_into_iter { _ }. -(** Trait declaration: [traits::FromResidual] *) +(** Trait declaration: [traits::FromResidual] + Source: 'src/traits.rs', lines 250:0-250:21 *) Record FromResidual_t (Self T : Type) := mkFromResidual_t{}. Arguments mkFromResidual_t { _ _ }. -(** Trait declaration: [traits::Try] *) +(** Trait declaration: [traits::Try] + Source: 'src/traits.rs', lines 246:0-246:48 *) Record Try_t (Self : Type) := mkTry_t { Try_tTry_t_Residual : Type; Try_tTry_t_parent_clause_0 : FromResidual_t Self Try_tTry_t_Residual; @@ -430,7 +492,8 @@ Arguments mkTry_t { _ }. Arguments Try_tTry_t_Residual { _ }. Arguments Try_tTry_t_parent_clause_0 { _ }. -(** Trait declaration: [traits::WithTarget] *) +(** Trait declaration: [traits::WithTarget] + Source: 'src/traits.rs', lines 252:0-252:20 *) Record WithTarget_t (Self : Type) := mkWithTarget_t { WithTarget_tWithTarget_t_Target : Type; }. @@ -438,7 +501,8 @@ Record WithTarget_t (Self : Type) := mkWithTarget_t { Arguments mkWithTarget_t { _ }. Arguments WithTarget_tWithTarget_t_Target { _ }. -(** Trait declaration: [traits::ParentTrait2] *) +(** Trait declaration: [traits::ParentTrait2] + Source: 'src/traits.rs', lines 256:0-256:22 *) Record ParentTrait2_t (Self : Type) := mkParentTrait2_t { ParentTrait2_tParentTrait2_t_U : Type; ParentTrait2_tParentTrait2_t_U_clause_0 : WithTarget_t @@ -449,7 +513,8 @@ Arguments mkParentTrait2_t { _ }. Arguments ParentTrait2_tParentTrait2_t_U { _ }. Arguments ParentTrait2_tParentTrait2_t_U_clause_0 { _ }. -(** Trait declaration: [traits::ChildTrait2] *) +(** Trait declaration: [traits::ChildTrait2] + Source: 'src/traits.rs', lines 260:0-260:35 *) Record ChildTrait2_t (Self : Type) := mkChildTrait2_t { ChildTrait2_tChildTrait2_t_parent_clause_0 : ParentTrait2_t Self; ChildTrait2_t_convert : @@ -462,28 +527,33 @@ Arguments mkChildTrait2_t { _ }. Arguments ChildTrait2_tChildTrait2_t_parent_clause_0 { _ }. Arguments ChildTrait2_t_convert { _ }. -(** Trait implementation: [traits::{u32#11}] *) +(** Trait implementation: [traits::{u32#11}] + Source: 'src/traits.rs', lines 264:0-264:23 *) Definition traits_WithTargetU32Inst : WithTarget_t u32 := {| WithTarget_tWithTarget_t_Target := u32; |}. -(** Trait implementation: [traits::{u32#12}] *) +(** Trait implementation: [traits::{u32#12}] + Source: 'src/traits.rs', lines 268:0-268:25 *) Definition traits_ParentTrait2U32Inst : ParentTrait2_t u32 := {| ParentTrait2_tParentTrait2_t_U := u32; ParentTrait2_tParentTrait2_t_U_clause_0 := traits_WithTargetU32Inst; |}. -(** [traits::{u32#13}::convert]: forward function *) +(** [traits::{u32#13}::convert]: forward function + Source: 'src/traits.rs', lines 273:4-273:29 *) Definition u32_convert (x : u32) : result u32 := Return x. -(** Trait implementation: [traits::{u32#13}] *) +(** Trait implementation: [traits::{u32#13}] + Source: 'src/traits.rs', lines 272:0-272:24 *) Definition traits_ChildTrait2U32Inst : ChildTrait2_t u32 := {| ChildTrait2_tChildTrait2_t_parent_clause_0 := traits_ParentTrait2U32Inst; ChildTrait2_t_convert := u32_convert; |}. -(** Trait declaration: [traits::CFnOnce] *) +(** Trait declaration: [traits::CFnOnce] + Source: 'src/traits.rs', lines 286:0-286:23 *) Record CFnOnce_t (Self Args : Type) := mkCFnOnce_t { CFnOnce_tCFnOnce_t_Output : Type; CFnOnce_t_call_once : Self -> Args -> result CFnOnce_tCFnOnce_t_Output; @@ -493,7 +563,8 @@ Arguments mkCFnOnce_t { _ _ }. Arguments CFnOnce_tCFnOnce_t_Output { _ _ }. Arguments CFnOnce_t_call_once { _ _ }. -(** Trait declaration: [traits::CFnMut] *) +(** Trait declaration: [traits::CFnMut] + Source: 'src/traits.rs', lines 292:0-292:37 *) Record CFnMut_t (Self Args : Type) := mkCFnMut_t { CFnMut_tCFnMut_t_parent_clause_0 : CFnOnce_t Self Args; CFnMut_t_call_mut : Self -> Args -> result @@ -508,7 +579,8 @@ Arguments CFnMut_tCFnMut_t_parent_clause_0 { _ _ }. Arguments CFnMut_t_call_mut { _ _ }. Arguments CFnMut_t_call_mut_back { _ _ }. -(** Trait declaration: [traits::CFn] *) +(** Trait declaration: [traits::CFn] + Source: 'src/traits.rs', lines 296:0-296:33 *) Record CFn_t (Self Args : Type) := mkCFn_t { CFn_tCFn_t_parent_clause_0 : CFnMut_t Self Args; CFn_t_call_mut : Self -> Args -> result @@ -519,7 +591,8 @@ Arguments mkCFn_t { _ _ }. Arguments CFn_tCFn_t_parent_clause_0 { _ _ }. Arguments CFn_t_call_mut { _ _ }. -(** [traits::incr_u32]: forward function *) +(** [traits::incr_u32]: forward function + Source: 'src/traits.rs', lines 300:0-300:30 *) Definition incr_u32 (x : u32) : result u32 := u32_add x 1%u32. -- cgit v1.2.3 From 184e27bce209f7a852c2adc7e0598ed75ac8452d Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 21 Nov 2023 18:58:04 +0100 Subject: Regenerate the files --- tests/coq/traits/Traits.v | 58 +++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 27 deletions(-) (limited to 'tests/coq/traits') diff --git a/tests/coq/traits/Traits.v b/tests/coq/traits/Traits.v index f0875a29..93ff9fe3 100644 --- a/tests/coq/traits/Traits.v +++ b/tests/coq/traits/Traits.v @@ -200,12 +200,12 @@ Definition h3 (** Trait declaration: [traits::OfTypeBis] Source: 'src/traits.rs', lines 109:0-109:36 *) Record OfTypeBis_t (Self T : Type) := mkOfTypeBis_t { - OfTypeBis_tOfTypeBis_t_parent_clause_0 : ToType_t T Self; + OfTypeBis_tOfTypeBis_t_ToTypeTSelfInst : ToType_t T Self; OfTypeBis_t_of_type : T -> result Self; }. Arguments mkOfTypeBis_t { _ _ }. -Arguments OfTypeBis_tOfTypeBis_t_parent_clause_0 { _ _ }. +Arguments OfTypeBis_tOfTypeBis_t_ToTypeTSelfInst { _ _ }. Arguments OfTypeBis_t_of_type { _ _ }. (** [traits::h4]: forward function @@ -395,19 +395,20 @@ Arguments mkParentTrait1_t { _ }. (** Trait declaration: [traits::ChildTrait] Source: 'src/traits.rs', lines 206:0-206:49 *) Record ChildTrait_t (Self : Type) := mkChildTrait_t { - ChildTrait_tChildTrait_t_parent_clause_0 : ParentTrait0_t Self; - ChildTrait_tChildTrait_t_parent_clause_1 : ParentTrait1_t Self; + ChildTrait_tChildTrait_t_ParentTrait0SelfInst : ParentTrait0_t Self; + ChildTrait_tChildTrait_t_ParentTrait1SelfInst : ParentTrait1_t Self; }. Arguments mkChildTrait_t { _ }. -Arguments ChildTrait_tChildTrait_t_parent_clause_0 { _ }. -Arguments ChildTrait_tChildTrait_t_parent_clause_1 { _ }. +Arguments ChildTrait_tChildTrait_t_ParentTrait0SelfInst { _ }. +Arguments ChildTrait_tChildTrait_t_ParentTrait1SelfInst { _ }. (** [traits::test_child_trait1]: forward function Source: 'src/traits.rs', lines 209:0-209:56 *) Definition test_child_trait1 (T : Type) (inst : ChildTrait_t T) (x : T) : result alloc_string_String_t := - inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_name) x + inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_name) + x . (** [traits::test_child_trait2]: forward function @@ -415,9 +416,9 @@ Definition test_child_trait1 Definition test_child_trait2 (T : Type) (inst : ChildTrait_t T) (x : T) : result - inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_tParentTrait0_t_W) + inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_tParentTrait0_t_W) := - inst.(ChildTrait_tChildTrait_t_parent_clause_0).(ParentTrait0_t_get_w) x + inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_w) x . (** [traits::order1]: forward function @@ -432,11 +433,11 @@ Definition order1 (** Trait declaration: [traits::ChildTrait1] Source: 'src/traits.rs', lines 222:0-222:35 *) Record ChildTrait1_t (Self : Type) := mkChildTrait1_t { - ChildTrait1_tChildTrait1_t_parent_clause_0 : ParentTrait1_t Self; + ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst : ParentTrait1_t Self; }. Arguments mkChildTrait1_t { _ }. -Arguments ChildTrait1_tChildTrait1_t_parent_clause_0 { _ }. +Arguments ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst { _ }. (** Trait implementation: [traits::{usize#9}] Source: 'src/traits.rs', lines 224:0-224:27 *) @@ -446,7 +447,8 @@ Definition traits_ParentTrait1UsizeInst : ParentTrait1_t usize (** Trait implementation: [traits::{usize#10}] Source: 'src/traits.rs', lines 225:0-225:26 *) Definition traits_ChildTrait1UsizeInst : ChildTrait1_t usize := {| - ChildTrait1_tChildTrait1_t_parent_clause_0 := traits_ParentTrait1UsizeInst; + ChildTrait1_tChildTrait1_t_ParentTrait1SelfInst := + traits_ParentTrait1UsizeInst; |}. (** Trait declaration: [traits::Iterator] @@ -485,12 +487,13 @@ Arguments mkFromResidual_t { _ _ }. Source: 'src/traits.rs', lines 246:0-246:48 *) Record Try_t (Self : Type) := mkTry_t { Try_tTry_t_Residual : Type; - Try_tTry_t_parent_clause_0 : FromResidual_t Self Try_tTry_t_Residual; + Try_tTry_t_FromResidualSelftraitsTrySelfResidualInst : FromResidual_t Self + Try_tTry_t_Residual; }. Arguments mkTry_t { _ }. Arguments Try_tTry_t_Residual { _ }. -Arguments Try_tTry_t_parent_clause_0 { _ }. +Arguments Try_tTry_t_FromResidualSelftraitsTrySelfResidualInst { _ }. (** Trait declaration: [traits::WithTarget] Source: 'src/traits.rs', lines 252:0-252:20 *) @@ -516,15 +519,15 @@ Arguments ParentTrait2_tParentTrait2_t_U_clause_0 { _ }. (** Trait declaration: [traits::ChildTrait2] Source: 'src/traits.rs', lines 260:0-260:35 *) Record ChildTrait2_t (Self : Type) := mkChildTrait2_t { - ChildTrait2_tChildTrait2_t_parent_clause_0 : ParentTrait2_t Self; + ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst : ParentTrait2_t Self; ChildTrait2_t_convert : - (ChildTrait2_tChildTrait2_t_parent_clause_0).(ParentTrait2_tParentTrait2_t_U) + (ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst).(ParentTrait2_tParentTrait2_t_U) -> result - (ChildTrait2_tChildTrait2_t_parent_clause_0).(ParentTrait2_tParentTrait2_t_U_clause_0).(WithTarget_tWithTarget_t_Target); + (ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst).(ParentTrait2_tParentTrait2_t_U_clause_0).(WithTarget_tWithTarget_t_Target); }. Arguments mkChildTrait2_t { _ }. -Arguments ChildTrait2_tChildTrait2_t_parent_clause_0 { _ }. +Arguments ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst { _ }. Arguments ChildTrait2_t_convert { _ }. (** Trait implementation: [traits::{u32#11}] @@ -548,7 +551,8 @@ Definition u32_convert (x : u32) : result u32 := (** Trait implementation: [traits::{u32#13}] Source: 'src/traits.rs', lines 272:0-272:24 *) Definition traits_ChildTrait2U32Inst : ChildTrait2_t u32 := {| - ChildTrait2_tChildTrait2_t_parent_clause_0 := traits_ParentTrait2U32Inst; + ChildTrait2_tChildTrait2_t_ParentTrait2SelfInst := + traits_ParentTrait2U32Inst; ChildTrait2_t_convert := u32_convert; |}. @@ -566,29 +570,29 @@ Arguments CFnOnce_t_call_once { _ _ }. (** Trait declaration: [traits::CFnMut] Source: 'src/traits.rs', lines 292:0-292:37 *) Record CFnMut_t (Self Args : Type) := mkCFnMut_t { - CFnMut_tCFnMut_t_parent_clause_0 : CFnOnce_t Self Args; + CFnMut_tCFnMut_t_CFnOnceSelfArgsInst : CFnOnce_t Self Args; CFnMut_t_call_mut : Self -> Args -> result - (CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output); + (CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output); CFnMut_t_call_mut_back : Self -> Args -> - (CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output) -> result - Self; + (CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output) -> + result Self; }. Arguments mkCFnMut_t { _ _ }. -Arguments CFnMut_tCFnMut_t_parent_clause_0 { _ _ }. +Arguments CFnMut_tCFnMut_t_CFnOnceSelfArgsInst { _ _ }. Arguments CFnMut_t_call_mut { _ _ }. Arguments CFnMut_t_call_mut_back { _ _ }. (** Trait declaration: [traits::CFn] Source: 'src/traits.rs', lines 296:0-296:33 *) Record CFn_t (Self Args : Type) := mkCFn_t { - CFn_tCFn_t_parent_clause_0 : CFnMut_t Self Args; + CFn_tCFn_t_CFnMutSelfArgsInst : CFnMut_t Self Args; CFn_t_call_mut : Self -> Args -> result - (CFn_tCFn_t_parent_clause_0).(CFnMut_tCFnMut_t_parent_clause_0).(CFnOnce_tCFnOnce_t_Output); + (CFn_tCFn_t_CFnMutSelfArgsInst).(CFnMut_tCFnMut_t_CFnOnceSelfArgsInst).(CFnOnce_tCFnOnce_t_Output); }. Arguments mkCFn_t { _ _ }. -Arguments CFn_tCFn_t_parent_clause_0 { _ _ }. +Arguments CFn_tCFn_t_CFnMutSelfArgsInst { _ _ }. Arguments CFn_t_call_mut { _ _ }. (** [traits::incr_u32]: forward function -- cgit v1.2.3 From 84a505ed9f193885175308ecc837922a41176b5b Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 22 Nov 2023 09:11:06 +0100 Subject: Regenerate the test files --- tests/coq/traits/Traits.v | 107 +++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 45 deletions(-) (limited to 'tests/coq/traits') diff --git a/tests/coq/traits/Traits.v b/tests/coq/traits/Traits.v index 93ff9fe3..0952a1df 100644 --- a/tests/coq/traits/Traits.v +++ b/tests/coq/traits/Traits.v @@ -67,8 +67,8 @@ Definition test_bool_trait_option (T : Type) (x : option T) : result bool := (** [traits::test_bool_trait]: forward function Source: 'src/traits.rs', lines 35:0-35:50 *) Definition test_bool_trait - (T : Type) (inst : BoolTrait_t T) (x : T) : result bool := - inst.(BoolTrait_t_get_bool) x + (T : Type) (boolTraitTInst : BoolTrait_t T) (x : T) : result bool := + boolTraitTInst.(BoolTrait_t_get_bool) x . (** Trait declaration: [traits::ToU64] @@ -94,30 +94,31 @@ Definition traits_ToU64U64Inst : ToU64_t u64 := {| (** [traits::{(A, A)#3}::to_u64]: forward function Source: 'src/traits.rs', lines 50:4-50:26 *) Definition pair_to_u64 - (A : Type) (inst : ToU64_t A) (self : (A * A)) : result u64 := + (A : Type) (toU64AInst : ToU64_t A) (self : (A * A)) : result u64 := let (t, t0) := self in - i <- inst.(ToU64_t_to_u64) t; - i0 <- inst.(ToU64_t_to_u64) t0; + i <- toU64AInst.(ToU64_t_to_u64) t; + i0 <- toU64AInst.(ToU64_t_to_u64) t0; u64_add i i0 . (** Trait implementation: [traits::{(A, A)#3}] Source: 'src/traits.rs', lines 49:0-49:31 *) -Definition traits_ToU64TupleAAInst (A : Type) (inst : ToU64_t A) : ToU64_t (A * - A) := {| - ToU64_t_to_u64 := pair_to_u64 A inst; +Definition traits_ToU64TupleAAInst (A : Type) (toU64AInst : ToU64_t A) : + ToU64_t (A * A) := {| + ToU64_t_to_u64 := pair_to_u64 A toU64AInst; |}. (** [traits::f]: forward function Source: 'src/traits.rs', lines 55:0-55:36 *) -Definition f (T : Type) (inst : ToU64_t T) (x : (T * T)) : result u64 := - pair_to_u64 T inst x +Definition f (T : Type) (toU64TInst : ToU64_t T) (x : (T * T)) : result u64 := + pair_to_u64 T toU64TInst x . (** [traits::g]: forward function Source: 'src/traits.rs', lines 59:0-61:18 *) -Definition g (T : Type) (inst : ToU64_t (T * T)) (x : (T * T)) : result u64 := - inst.(ToU64_t_to_u64) x +Definition g + (T : Type) (toU64TupleTTInst : ToU64_t (T * T)) (x : (T * T)) : result u64 := + toU64TupleTTInst.(ToU64_t_to_u64) x . (** [traits::h0]: forward function @@ -135,15 +136,15 @@ Arguments wrapper_x { _ }. (** [traits::{traits::Wrapper#4}::to_u64]: forward function Source: 'src/traits.rs', lines 75:4-75:26 *) Definition wrapper_to_u64 - (T : Type) (inst : ToU64_t T) (self : Wrapper_t T) : result u64 := - inst.(ToU64_t_to_u64) self.(wrapper_x) + (T : Type) (toU64TInst : ToU64_t T) (self : Wrapper_t T) : result u64 := + toU64TInst.(ToU64_t_to_u64) self.(wrapper_x) . (** Trait implementation: [traits::{traits::Wrapper#4}] Source: 'src/traits.rs', lines 74:0-74:35 *) -Definition traits_ToU64traitsWrapperTInst (T : Type) (inst : ToU64_t T) : +Definition traits_ToU64traitsWrapperTInst (T : Type) (toU64TInst : ToU64_t T) : ToU64_t (Wrapper_t T) := {| - ToU64_t_to_u64 := wrapper_to_u64 T inst; + ToU64_t_to_u64 := wrapper_to_u64 T toU64TInst; |}. (** [traits::h1]: forward function @@ -154,8 +155,9 @@ Definition h1 (x : Wrapper_t u64) : result u64 := (** [traits::h2]: forward function Source: 'src/traits.rs', lines 84:0-84:41 *) -Definition h2 (T : Type) (inst : ToU64_t T) (x : Wrapper_t T) : result u64 := - wrapper_to_u64 T inst x +Definition h2 + (T : Type) (toU64TInst : ToU64_t T) (x : Wrapper_t T) : result u64 := + wrapper_to_u64 T toU64TInst x . (** Trait declaration: [traits::ToType] @@ -181,8 +183,8 @@ Definition traits_ToTypeU64BoolInst : ToType_t u64 bool := {| (** Trait declaration: [traits::OfType] Source: 'src/traits.rs', lines 98:0-98:16 *) Record OfType_t (Self : Type) := mkOfType_t { - OfType_t_of_type : forall (T : Type) (inst : ToType_t T Self), T -> result - Self; + OfType_t_of_type : forall (T : Type) (toTypeTSelfInst : ToType_t T Self), T + -> result Self; }. Arguments mkOfType_t { _ }. @@ -191,10 +193,11 @@ Arguments OfType_t_of_type { _ }. (** [traits::h3]: forward function Source: 'src/traits.rs', lines 104:0-104:50 *) Definition h3 - (T1 T2 : Type) (inst : OfType_t T1) (inst0 : ToType_t T2 T1) (y : T2) : + (T1 T2 : Type) (ofTypeT1Inst : OfType_t T1) (toTypeT2T1Inst : ToType_t T2 T1) + (y : T2) : result T1 := - inst.(OfType_t_of_type) T2 inst0 y + ofTypeT1Inst.(OfType_t_of_type) T2 toTypeT2T1Inst y . (** Trait declaration: [traits::OfTypeBis] @@ -211,10 +214,11 @@ Arguments OfTypeBis_t_of_type { _ _ }. (** [traits::h4]: forward function Source: 'src/traits.rs', lines 118:0-118:57 *) Definition h4 - (T1 T2 : Type) (inst : OfTypeBis_t T1 T2) (inst0 : ToType_t T2 T1) (y : T2) : + (T1 T2 : Type) (ofTypeBisT1T2Inst : OfTypeBis_t T1 T2) (toTypeT2T1Inst : + ToType_t T2 T1) (y : T2) : result T1 := - inst.(OfTypeBis_t_of_type) y + ofTypeBisT1T2Inst.(OfTypeBis_t_of_type) y . (** [traits::TestType] @@ -258,8 +262,10 @@ Definition traits_TestType_test_TestTraittraitstraitsTestTypeTtestTestType1Inst (** [traits::{traits::TestType#6}::test]: forward function Source: 'src/traits.rs', lines 126:4-126:36 *) Definition testType_test - (T : Type) (inst : ToU64_t T) (self : TestType_t T) (x : T) : result bool := - x0 <- inst.(ToU64_t_to_u64) x; + (T : Type) (toU64TInst : ToU64_t T) (self : TestType_t T) (x : T) : + result bool + := + x0 <- toU64TInst.(ToU64_t_to_u64) x; if x0 s> 0%u64 then testType_test_TestType1_test {| testType_test_TestType1_0 := 0%u64 |} else Return false @@ -272,15 +278,17 @@ Record BoolWrapper_t := mkBoolWrapper_t { boolWrapper_0 : bool; }. (** [traits::{traits::BoolWrapper#7}::to_type]: forward function Source: 'src/traits.rs', lines 156:4-156:25 *) Definition boolWrapper_to_type - (T : Type) (inst : ToType_t bool T) (self : BoolWrapper_t) : result T := - inst.(ToType_t_to_type) self.(boolWrapper_0) + (T : Type) (toTypeBoolTInst : ToType_t bool T) (self : BoolWrapper_t) : + result T + := + toTypeBoolTInst.(ToType_t_to_type) self.(boolWrapper_0) . (** Trait implementation: [traits::{traits::BoolWrapper#7}] Source: 'src/traits.rs', lines 152:0-152:33 *) -Definition traits_ToTypetraitsBoolWrapperTInst (T : Type) (inst : ToType_t bool - T) : ToType_t BoolWrapper_t T := {| - ToType_t_to_type := boolWrapper_to_type T inst; +Definition traits_ToTypetraitsBoolWrapperTInst (T : Type) (toTypeBoolTInst : + ToType_t bool T) : ToType_t BoolWrapper_t T := {| + ToType_t_to_type := boolWrapper_to_type T toTypeBoolTInst; |}. (** [traits::WithConstTy::LEN2] @@ -333,15 +341,17 @@ Definition traits_WithConstTyBool32Inst : WithConstTy_t bool 32%usize := {| (** [traits::use_with_const_ty1]: forward function Source: 'src/traits.rs', lines 183:0-183:75 *) Definition use_with_const_ty1 - (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) : result usize := - let i := inst.(WithConstTy_tWithConstTy_t_LEN1) in Return i + (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN) : + result usize + := + let i := withConstTyHLENInst.(WithConstTy_tWithConstTy_t_LEN1) in Return i . (** [traits::use_with_const_ty2]: forward function Source: 'src/traits.rs', lines 187:0-187:73 *) Definition use_with_const_ty2 - (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) - (w : inst.(WithConstTy_tWithConstTy_t_W)) : + (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN) + (w : withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W)) : result unit := Return tt @@ -350,11 +360,12 @@ Definition use_with_const_ty2 (** [traits::use_with_const_ty3]: forward function Source: 'src/traits.rs', lines 189:0-189:80 *) Definition use_with_const_ty3 - (H : Type) (LEN : usize) (inst : WithConstTy_t H LEN) - (x : inst.(WithConstTy_tWithConstTy_t_W)) : + (H : Type) (LEN : usize) (withConstTyHLENInst : WithConstTy_t H LEN) + (x : withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W)) : result u64 := - inst.(WithConstTy_tWithConstTy_t_W_clause_0).(ToU64_t_to_u64) x + withConstTyHLENInst.(WithConstTy_tWithConstTy_t_W_clause_0).(ToU64_t_to_u64) + x . (** [traits::test_where1]: forward function @@ -365,7 +376,9 @@ Definition test_where1 (T : Type) (_x : T) : result unit := (** [traits::test_where2]: forward function Source: 'src/traits.rs', lines 194:0-194:57 *) Definition test_where2 - (T : Type) (inst : WithConstTy_t T 32%usize) (_x : u32) : result unit := + (T : Type) (withConstTyT32Inst : WithConstTy_t T 32%usize) (_x : u32) : + result unit + := Return tt . @@ -406,25 +419,29 @@ Arguments ChildTrait_tChildTrait_t_ParentTrait1SelfInst { _ }. (** [traits::test_child_trait1]: forward function Source: 'src/traits.rs', lines 209:0-209:56 *) Definition test_child_trait1 - (T : Type) (inst : ChildTrait_t T) (x : T) : result alloc_string_String_t := - inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_name) + (T : Type) (childTraitTInst : ChildTrait_t T) (x : T) : + result alloc_string_String_t + := + childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_name) x . (** [traits::test_child_trait2]: forward function Source: 'src/traits.rs', lines 213:0-213:54 *) Definition test_child_trait2 - (T : Type) (inst : ChildTrait_t T) (x : T) : + (T : Type) (childTraitTInst : ChildTrait_t T) (x : T) : result - inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_tParentTrait0_t_W) + childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_tParentTrait0_t_W) := - inst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_w) x + childTraitTInst.(ChildTrait_tChildTrait_t_ParentTrait0SelfInst).(ParentTrait0_t_get_w) + x . (** [traits::order1]: forward function Source: 'src/traits.rs', lines 219:0-219:59 *) Definition order1 - (T U : Type) (inst : ParentTrait0_t T) (inst0 : ParentTrait0_t U) : + (T U : Type) (parentTrait0TInst : ParentTrait0_t T) (parentTrait0UInst : + ParentTrait0_t U) : result unit := Return tt -- cgit v1.2.3