Using __CPROVER_is_fresh in disjunctions #8560
Labels
aws-high
bug
Code Contracts
Function and loop contracts
soundness
Soundness bug? Review and add "aws" if it is, or remove "soundness" if it isn't.
(We ran into this issue in practice for mlkem-native, where a bad spec led to a successful proof)
It seems that using
__CPROVER_is_fresh
in disjunctive preconditions is problematic. When__CPROVER_is_fresh
is evaluated for a contract verification, it seems to always succeed, leading to the alternative precondition to be ignored. When applying the contract, however, the alternative precondition can be used.An ad-hoc workaround is to reorder the clauses to use
__CPROVER_is_fresh
as late as possible, but a more robust approach should be sought?The text was updated successfully, but these errors were encountered: