Skip to content

Commit aa28788

Browse files
committed
m
1 parent 7ba8315 commit aa28788

File tree

1 file changed

+16
-18
lines changed
  • DynamoDbEncryption/dafny/StructuredEncryption/src

1 file changed

+16
-18
lines changed

DynamoDbEncryption/dafny/StructuredEncryption/src/Canonize.dfy

Lines changed: 16 additions & 18 deletions
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-
assume {:axiom} 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)