Skip to content

Commit e7801ec

Browse files
authored
chore: bump dafny verification version to 4.7 (#1181)
* chore: bump dafny verification version to 4.7
1 parent 862420e commit e7801ec

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

.github/workflows/ci_verification.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: dafny-lang/[email protected]
5151
with:
5252
# A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports.
53-
dafny-version: ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.6.0' }}
53+
dafny-version: ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.7.0' }}
5454

5555
- name: Regenerate code using smithy-dafny if necessary
5656
if: ${{ github.event_name == 'schedule' || inputs.nightly }}

DynamoDbEncryption/dafny/StructuredEncryption/src/Canonize.dfy

+16-18
Original file line numberDiff line numberDiff line change
@@ -658,28 +658,26 @@ module {:options "/functionSyntax:4" } Canonize {
658658
}
659659
}
660660

661-
// command line tools that say /vcsSplitOnEveryAssert fail without the {:vcs_split_on_every_assert false}
662-
lemma {:vcs_split_on_every_assert false} InputIsInput(origData : AuthList, input : CanonCryptoList)
663-
requires forall val <- input :: exists x :: x in origData && Updated2(x, val, DoDecrypt)
664-
ensures forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt)
661+
ghost predicate Updated2Exists(origData : AuthList, item : CanonCryptoItem)
665662
{
666-
assert forall i | 0 <= i < |input| :: input[i] in input;
667-
forall i | 0 <= i < |input| ensures exists x :: x in origData && Updated2(x, input[i], DoDecrypt) {
668-
var x :| x in origData && Updated2(x, input[i], DoDecrypt);
669-
}
670-
assert forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt);
663+
exists x :: x in origData && Updated2(x, item, DoDecrypt)
671664
}
672665

673-
// command line tools that say /vcsSplitOnEveryAssert fail without the {:vcs_split_on_every_assert false}
674-
lemma {:vcs_split_on_every_assert false} InputIsInput2(origData : CryptoList, input : CanonCryptoList)
675-
requires forall val <- input :: exists x :: x in origData && Updated5(x, val, DoEncrypt)
676-
ensures forall i | 0 <= i < |input| :: exists x :: x in origData && Updated5(x, input[i], DoEncrypt)
666+
ghost predicate Updated5Exists(origData : CryptoList, item : CanonCryptoItem)
667+
{
668+
exists x :: x in origData && Updated5(x, item, DoEncrypt)
669+
}
670+
671+
lemma InputIsInput(origData : AuthList, input : CanonCryptoList)
672+
requires forall val <- input :: Updated2Exists(origData, val)
673+
ensures forall i | 0 <= i < |input| :: Updated2Exists(origData, input[i])
674+
{
675+
}
676+
677+
lemma InputIsInput2(origData : CryptoList, input : CanonCryptoList)
678+
requires forall val <- input :: Updated5Exists(origData, val)
679+
ensures forall i | 0 <= i < |input| :: Updated5Exists(origData, input[i])
677680
{
678-
assert forall i | 0 <= i < |input| :: input[i] in input;
679-
forall i | 0 <= i < |input| ensures exists x :: x in origData && Updated5(x, input[i], DoEncrypt) {
680-
var x :| x in origData && Updated5(x, input[i], DoEncrypt);
681-
}
682-
assert forall i | 0 <= i < |input| :: exists x :: x in origData && Updated5(x, input[i], DoEncrypt);
683681
}
684682

685683
lemma CryptoUpdatedAuthMaps(origData : AuthList, input : CanonCryptoList, output : CryptoList)

0 commit comments

Comments
 (0)