@@ -67,7 +67,8 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
67
67
nameonly version: VersionNumber ,
68
68
nameonly keyring: AwsCryptographyMaterialProvidersTypes .IKeyring ,
69
69
nameonly standardBeacons: Option <StandardBeaconList > ,
70
- nameonly compoundBeacons: Option <CompoundBeaconList >
70
+ nameonly compoundBeacons: Option <CompoundBeaconList > ,
71
+ nameonly virtualFields: Option <VirtualFieldList >
71
72
)
72
73
type BeaconVersionList = x: seq < BeaconVersion> | IsValid_BeaconVersionList (x) witness *
73
74
predicate method IsValid_BeaconVersionList (x: seq <BeaconVersion >) {
@@ -771,6 +772,31 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
771
772
)
772
773
datatype GetItemOutputTransformOutput = | GetItemOutputTransformOutput (
773
774
nameonly transformedOutput: ComAmazonawsDynamodbTypes .GetItemOutput
775
+ )
776
+ datatype GetPrefix = | GetPrefix (
777
+ nameonly length: int32
778
+ )
779
+ datatype GetSegment = | GetSegment (
780
+ nameonly split: Char ,
781
+ nameonly index: int32
782
+ )
783
+ datatype GetSegments = | GetSegments (
784
+ nameonly split: Char ,
785
+ nameonly low: int32 ,
786
+ nameonly high: int32
787
+ )
788
+ datatype GetSubstring = | GetSubstring (
789
+ nameonly low: int32 ,
790
+ nameonly high: int32
791
+ )
792
+ datatype GetSuffix = | GetSuffix (
793
+ nameonly length: int32
794
+ )
795
+ datatype Insert = | Insert (
796
+ nameonly literal: string
797
+ )
798
+ datatype Lower = | Lower (
799
+
774
800
)
775
801
datatype NonSensitivePart = | NonSensitivePart (
776
802
nameonly name: string ,
@@ -902,10 +928,42 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
902
928
)
903
929
datatype UpdateTableOutputTransformOutput = | UpdateTableOutputTransformOutput (
904
930
nameonly transformedOutput: ComAmazonawsDynamodbTypes .UpdateTableOutput
931
+ )
932
+ datatype Upper = | Upper (
933
+
905
934
)
906
935
type VersionNumber = x: int32 | IsValid_VersionNumber (x) witness *
907
936
predicate method IsValid_VersionNumber (x: int32 ) {
908
937
( 1 <= x )
938
+ }
939
+ datatype VirtualField = | VirtualField (
940
+ nameonly name: string ,
941
+ nameonly parts: VirtualPartList
942
+ )
943
+ type VirtualFieldList = x: seq < VirtualField> | IsValid_VirtualFieldList (x) witness *
944
+ predicate method IsValid_VirtualFieldList (x: seq <VirtualField >) {
945
+ ( 1 <= |x| )
946
+ }
947
+ datatype VirtualPart = | VirtualPart (
948
+ nameonly loc: TerminalLocation ,
949
+ nameonly trans: Option <VirtualTransformList >
950
+ )
951
+ type VirtualPartList = x: seq < VirtualPart> | IsValid_VirtualPartList (x) witness *
952
+ predicate method IsValid_VirtualPartList (x: seq <VirtualPart >) {
953
+ ( 1 <= |x| )
954
+ }
955
+ datatype VirtualTransform =
956
+ | upper (upper: Upper )
957
+ | lower (lower: Lower )
958
+ | insert (insert: Insert )
959
+ | prefix (prefix: GetPrefix )
960
+ | suffix (suffix: GetSuffix )
961
+ | substring (substring: GetSubstring )
962
+ | segment (segment: GetSegment )
963
+ | segments (segments: GetSegments )
964
+ type VirtualTransformList = x: seq < VirtualTransform> | IsValid_VirtualTransformList (x) witness *
965
+ predicate method IsValid_VirtualTransformList (x: seq <VirtualTransform >) {
966
+ ( 1 <= |x| )
909
967
}
910
968
datatype Error =
911
969
// Local Error structures are listed here
@@ -955,7 +1013,9 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
955
1013
function method DefaultDynamoDbEncryptionConfig (): DynamoDbEncryptionConfig
956
1014
method DynamoDbEncryption (config: DynamoDbEncryptionConfig := DefaultDynamoDbEncryptionConfig())
957
1015
returns (res: Result< DynamoDbEncryptionClient, Error> )
958
- // TODO smithy->Dafny needs to generate the following
1016
+ // TODO smithy->Dafny correctly generates something equivalent the following
1017
+ // but as a result DynamoDbEncryption.DynamoDbEncryption and TestFixtures.GetDynamoDbEncryption
1018
+ // take too long to verify
959
1019
// /// MANUAL UPDATE STARTS HERE
960
1020
requires
961
1021
var cmms := set cfg | cfg in config. tableEncryptionConfigs. Values && cfg. cmm. Some? :: cfg. cmm. value;
0 commit comments