Skip to content
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

Dafny 4.4 verification #634

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions AwsEncryptionSDK/dafny/AwsEncryptionSdk/src/MessageBody.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ module MessageBody {
==>
&& res.value.data.finalFrame.header == header
{
reveal CorrectlyReadRange();
var sequenceNumber :- ReadUInt32(continuation);

//= compliance/client-apis/decrypt.txt#2.7.4
Expand Down Expand Up @@ -1034,6 +1033,12 @@ module MessageBody {
assert CorrectlyRead(buffer, Success(SuccessfulRead(nextRegularFrames, regularFrame.tail)), WriteMessageRegularFrames) by {
reveal CorrectlyReadRange();
}
assert buffer.start <= regularFrame.tail.start by {
reveal CorrectlyReadRange();
}
assert CorrectlyReadRange(buffer, regularFrame.tail, buffer.bytes[buffer.start..regularFrame.tail.start]) by {
reveal CorrectlyReadRange();
}

ReadFramedMessageBody(
buffer,
Expand All @@ -1058,8 +1063,6 @@ module MessageBody {
);

assert {:split_here} true;
assert MessageFramesAreMonotonic(regularFrames + [finalFrame.data]);
assert MessageFramesAreForTheSameMessage(regularFrames + [finalFrame.data]);

var body: FramedMessage := FramedMessageBody(
regularFrames := regularFrames,
Expand All @@ -1069,6 +1072,11 @@ module MessageBody {
assert {:split_here} true;
assert CorrectlyRead(continuation, Success(finalFrame), Frames.WriteFinalFrame);
assert {:split_here} true;
assert CorrectlyRead(buffer, Success(SuccessfulRead(body, finalFrame.tail)), WriteFramedMessageBody) by {
assert MessageFramesAreMonotonic(regularFrames + [finalFrame.data]);
assert MessageFramesAreForTheSameMessage(regularFrames + [finalFrame.data]);
reveal CorrectlyReadRange();
}
Success(SuccessfulRead(body, finalFrame.tail))
}

Expand Down
2 changes: 1 addition & 1 deletion mpl
Submodule mpl updated from cce342 to ccf972
Loading