Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Commented Unassigned: Soundness issue with

$
0
0
The following code proves false:

```
predicate P(i:int) { true }

lemma Tester()
{
// forall i ensures false ==> P(i) {}
forall i ensures P(i) <== false {}
assert forall i :: P(i) ==> false;
assert P(0);
assert false;
}
```

There may be a translation issue with <== in some situations, because the equivalent version with ==> (commented out in the code above) fails, as it should.
Comments: Chris notes that the problem is that the resolver handles left implication (explication) by swapping the arguments and then treating it like a regular implication. The problem above appears to be caused by the Cloner, which swaps the arguments again, leaving the implication going in the wrong direction.

Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>