Opaque insufficiently revealing - Verification issue #3995
Labels
incompleteness
Things that Dafny should be able to prove, but can't
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: verifier
Translation from Dafny to Boogie (translator)
Failing code
Steps to reproduce the issue
Expected behavior
I've made two sets of two parallel functions across a trait and a class
depends_on_not_opaque()'s postcondition depends on the return value of the not_opaque() function
depends_on_iam_opaque()'s postcondition is exactly the same,
except that it depends on the return value iam_opaque() function, which is opaque.
I put in "reveal iam_opaque()" everywhere I could think of at the time...
I expected both opaque and nonopaque versions would behave the same
Actual behavior
the not_opaque version works; the iam_opaque version doesn't, complaining that
even though the postconditions is textually identical..
adding in a postcondition on the opaque version (uncommentiung the commented line
//ensures rv == 42
)means everything works. I sort-of understand why, but I think I should be able to do this with reveals...
Here's what may be a related issue:
in an attempt to get to a single-class version I tried the above.
This has a different problem: it does not verify if
iam_opaque();
is revealed in the postcondition; (or in a separate ensures clause);Error is
It does verify if
iam_opaque();
is revealed as a separate preconditionrequires reveal iam_opaque(); true
or in the body
{ reveal iam_opaque(); true }
.The text was updated successfully, but these errors were encountered: