-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: Change MultiKeyring.children to a seq<Keyring> #223
Merged
robin-aws
merged 34 commits into
aws:develop
from
robin-aws:multi-keyring-children-as-sequence
Mar 10, 2020
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
922746a
Merge pull request #2 from awslabs/develop
robin-aws a4cdbe0
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 9fb3319
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws eaf2cb4
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws f906c20
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 696a046
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 6ba8586
Partial work
robin-aws a011d18
More partial work
robin-aws 6fc72f8
Partial termination solution using decreases Repr
robin-aws 277102c
Fix AsKeyring.Valid()
robin-aws a87a306
Use ExternalKeyring in shim
robin-aws fb3d009
Added externally-sound MakeKMSKeyring factory method
robin-aws 87fab5e
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 2d2d21e
Remove reads clause from Valid()
robin-aws 4c5130a
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 0d9c094
Make Keyring/Defs.dfy validate again
robin-aws 2713a7d
More experimentation
robin-aws c7ebd85
Eliminated ExternalKeyring.Valid()
robin-aws 4d4d23c
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 97c8b57
Add FailUnless to replace Require
robin-aws a9e15f5
Backing up more partial work
robin-aws 6f68b93
Update shim code to use Dafny.ISequence
robin-aws 7826a3d
More decreases *, sequences in MultiKeyring tests
robin-aws 10e0e09
Switch MakeMultiKeyring to take an IList
robin-aws 71faf52
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 32124a3
Undo Keyring/ExternalKeyring refactoring
robin-aws 228a289
Update Dafny commit hash to pick up seq<trait> support
robin-aws c5886e4
Merge branch 'develop' of github.com:awslabs/aws-encryption-sdk-dafny…
robin-aws 7d4d022
Fix commit hash
robin-aws 1ab23d5
Lock down RawRSAKeyring.Valid() as well
robin-aws d3b80e3
And for a couple more keyrings
robin-aws 8bbeb18
Fix spacing caused by sloppy merge resolution
robin-aws 359a8d8
Reverted irrelevant changes for now, minor PR feedback
robin-aws f802648
Merge branch 'develop' into multi-keyring-children-as-sequence
robin-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using ibyteseq = Dafny.ISequence<byte>; | ||
using byteseq = Dafny.Sequence<byte>; | ||
|
||
namespace MessageHeader { | ||
|
||
public partial class __default { | ||
|
||
public static Dafny.Map<byteseq,byteseq> KVPairSequenceToMap(Dafny.Sequence<_System.Tuple2<byteseq,byteseq>> kvPairs) { | ||
Dictionary<byteseq, byteseq> dict = kvPairs.Elements.ToDictionary( | ||
public static Dafny.Map<ibyteseq,ibyteseq> KVPairSequenceToMap(Dafny.ISequence<_System.Tuple2<ibyteseq,ibyteseq>> kvPairs) { | ||
Dictionary<ibyteseq, ibyteseq> dict = kvPairs.Elements.ToDictionary( | ||
item => item._0, | ||
item => item._1); | ||
List<Dafny.Pair<byteseq, byteseq>> pairs = new List<Dafny.Pair<byteseq, byteseq>>(); | ||
List<Dafny.Pair<ibyteseq, ibyteseq>> pairs = new List<Dafny.Pair<ibyteseq, ibyteseq>>(); | ||
|
||
foreach(KeyValuePair<byteseq, byteseq> entry in dict) { | ||
pairs.Add(new Dafny.Pair<byteseq, byteseq>(entry.Key, entry.Value)); | ||
foreach(KeyValuePair<ibyteseq, ibyteseq> entry in dict) { | ||
pairs.Add(new Dafny.Pair<ibyteseq, ibyteseq>(entry.Key, entry.Value)); | ||
} | ||
return Dafny.Map<byteseq,byteseq>.FromCollection(pairs); | ||
return Dafny.Map<ibyteseq,ibyteseq>.FromCollection(pairs); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove
{children}
? Is there anything other than idiom that enforces thatRepr
containsthis
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
children
is now a sequence and therefore not an object, so it can't be part ofRepr
any more! :)