github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library@v0.2.0/StandardLibrary_Sequence/StandardLibrary_Sequence.go (about) 1 // Package StandardLibrary_Sequence 2 // Dafny module StandardLibrary_Sequence compiled into Go 3 4 package StandardLibrary_Sequence 5 6 import ( 7 os "os" 8 9 m_BoundedInts "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/BoundedInts" 10 m_DivInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternals" 11 m_DivInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternalsNonlinear" 12 m_DivMod "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivMod" 13 m_FileIO "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/FileIO" 14 m_Functions "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Functions" 15 m_GeneralInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/GeneralInternals" 16 m_Logarithm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Logarithm" 17 m__Math "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Math_" 18 m_ModInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternals" 19 m_ModInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternalsNonlinear" 20 m_Mul "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Mul" 21 m_MulInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternals" 22 m_MulInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternalsNonlinear" 23 m_Power "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Power" 24 m_Relations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Relations" 25 m_Seq "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq" 26 m_Seq_MergeSort "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq_MergeSort" 27 m_StandardLibraryInterop "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibraryInterop" 28 m_StandardLibrary_UInt "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibrary_UInt" 29 m_UnicodeStrings "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/UnicodeStrings" 30 m__Unicode "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Unicode_" 31 m_Utf16EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf16EncodingForm" 32 m_Utf8EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf8EncodingForm" 33 m_Wrappers "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Wrappers" 34 m__System "github.com/dafny-lang/DafnyRuntimeGo/v4/System_" 35 _dafny "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny" 36 ) 37 38 var _ = os.Args 39 var _ _dafny.Dummy__ 40 var _ m__System.Dummy__ 41 var _ m_Wrappers.Dummy__ 42 var _ m_Relations.Dummy__ 43 var _ m_Seq_MergeSort.Dummy__ 44 var _ m__Math.Dummy__ 45 var _ m_Seq.Dummy__ 46 var _ m_BoundedInts.Dummy__ 47 var _ m__Unicode.Dummy__ 48 var _ m_Functions.Dummy__ 49 var _ m_Utf8EncodingForm.Dummy__ 50 var _ m_Utf16EncodingForm.Dummy__ 51 var _ m_UnicodeStrings.Dummy__ 52 var _ m_FileIO.Dummy__ 53 var _ m_GeneralInternals.Dummy__ 54 var _ m_MulInternalsNonlinear.Dummy__ 55 var _ m_MulInternals.Dummy__ 56 var _ m_Mul.Dummy__ 57 var _ m_ModInternalsNonlinear.Dummy__ 58 var _ m_DivInternalsNonlinear.Dummy__ 59 var _ m_ModInternals.Dummy__ 60 var _ m_DivInternals.Dummy__ 61 var _ m_DivMod.Dummy__ 62 var _ m_Power.Dummy__ 63 var _ m_Logarithm.Dummy__ 64 var _ m_StandardLibraryInterop.Dummy__ 65 var _ m_StandardLibrary_UInt.Dummy__ 66 67 type Dummy__ struct{} 68 69 // Definition of class Default__ 70 type Default__ struct { 71 dummy byte 72 } 73 74 func New_Default___() *Default__ { 75 _this := Default__{} 76 77 return &_this 78 } 79 80 type CompanionStruct_Default___ struct { 81 } 82 83 var Companion_Default___ = CompanionStruct_Default___{} 84 85 func (_this *Default__) Equals(other *Default__) bool { 86 return _this == other 87 } 88 89 func (_this *Default__) EqualsGeneric(x interface{}) bool { 90 other, ok := x.(*Default__) 91 return ok && _this.Equals(other) 92 } 93 94 func (*Default__) String() string { 95 return "StandardLibrary_Sequence.Default__" 96 } 97 func (_this *Default__) ParentTraits_() []*_dafny.TraitID { 98 return [](*_dafny.TraitID){} 99 } 100 101 var _ _dafny.TraitOffspring = &Default__{} 102 103 func (_static *CompanionStruct_Default___) SequenceEqualNat(seq1 _dafny.Sequence, seq2 _dafny.Sequence, start1 _dafny.Int, start2 _dafny.Int, size _dafny.Int) bool { 104 if ((_dafny.IntOfUint32((seq1).Cardinality())).Cmp(m_StandardLibrary_UInt.Companion_Default___.UINT64__MAX__LIMIT()) > 0) || ((_dafny.IntOfUint32((seq2).Cardinality())).Cmp(m_StandardLibrary_UInt.Companion_Default___.UINT64__MAX__LIMIT()) > 0) { 105 return _dafny.Companion_Sequence_.Equal((seq1).Subsequence((start1).Uint32(), ((start1).Plus(size)).Uint32()), (seq2).Subsequence((start2).Uint32(), ((start2).Plus(size)).Uint32())) 106 } else { 107 return Companion_Default___.SequenceEqual(seq1, seq2, (start1).Uint64(), (start2).Uint64(), (size).Uint64()) 108 } 109 } 110 func (_static *CompanionStruct_Default___) SequenceEqual(seq1 _dafny.Sequence, seq2 _dafny.Sequence, start1 uint64, start2 uint64, size uint64) bool { 111 var ret bool = false 112 _ = ret 113 var _0_j uint64 114 _ = _0_j 115 _0_j = start2 116 var _hi0 uint64 = (start1) + (size) 117 _ = _hi0 118 for _1_i := start1; _1_i < _hi0; _1_i++ { 119 if !_dafny.AreEqual((seq1).Select(uint32(_1_i)).(interface{}), (seq2).Select(uint32(_0_j)).(interface{})) { 120 ret = false 121 return ret 122 } 123 _0_j = (_0_j) + (uint64(1)) 124 } 125 ret = true 126 return ret 127 return ret 128 } 129 130 // End of class Default__