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

[PRERELEASE REGRESSION] Dafny prerelease regression from aws/aws-database-encryption-sdk-dynamodb #5462

Open
robin-aws opened this issue May 17, 2024 · 2 comments
Labels
breaking-change Any change that will cause existing Dafny codebases to break (excluding verification instability)

Comments

@robin-aws
Copy link
Member

(Manually cutting this since the automatic cutting is not yet hooked up on this repo)

See https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/runs/9131391027.

Note the other Java-related nightly builds will be fixed by aws/aws-database-encryption-sdk-dynamodb#1029. It's only the verification builds that need attention now.

@fabiomadge fabiomadge closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
@fabiomadge fabiomadge reopened this May 24, 2024
@MikaelMayer MikaelMayer added the breaking-change Any change that will cause existing Dafny codebases to break (excluding verification instability) label May 26, 2024
@stefan-aws
Copy link
Collaborator

https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/runs/9469437383/job/26088100707:

dafny/StructuredEncryption/src/Canonize.dfy(665,2): Error: a postcondition could not be proved on this return path
dafny/StructuredEncryption/src/Canonize.dfy(664,12): Related location: this is the postcondition that could not be proved
dafny/StructuredEncryption/src/Canonize.dfy(670,11): Error: assertion might not hold

@keyboardDrummer
Copy link
Member

Failure is in

  lemma {:vcs_split_on_every_assert} InputIsInput(origData : AuthList, input : CanonCryptoList)
    requires forall val <- input :: exists x :: x in origData && Updated2(x, val, DoDecrypt)
    ensures forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt)
  {
    assert forall i | 0 <= i < |input| :: input[i] in input;
    forall i | 0 <= i < |input| ensures exists x :: x in origData && Updated2(x, input[i], DoDecrypt) {
      var x :| x in origData && Updated2(x, input[i], DoDecrypt);
    }
    assert forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt);
  }

Weird thing is that the final assertion fails right after the forall which should prove the same thing.

Even if I write:

  lemma {:vcs_split_on_every_assert} InputIsInput(origData : AuthList, input : CanonCryptoList)
    requires forall val <- input :: exists x :: x in origData && Updated2(x, val, DoDecrypt)
    ensures forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt)
  {
    assert forall i | 0 <= i < |input| :: input[i] in input;
    forall i | 0 <= i < |input| ensures exists x :: x in origData && Updated2(x, input[i], DoDecrypt) {
      var x :| x in origData && Updated2(x, input[i], DoDecrypt);
    }
    assume forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt);
    assert forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt);
  }

then the last assert fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Any change that will cause existing Dafny codebases to break (excluding verification instability)
Projects
None yet
Development

No branches or pull requests

5 participants