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

Created Unassigned: Var such-that for non-primitive types [161]

$
0
0
The following should verify, but fails. If t is changed to "int", it does verify. This seems to have something to do with the treatment of :| for non-primitive types like seq<int>.

```
type t = seq<int>

predicate P(x:t)
function F(x:t) : int
function C() : int { assume (exists x :: P(x)); var x :| P(x); F(x) }

lemma L(x:t)
{
assume P(x);
assume forall y :: P(y) ==> y == x;
assert F(x) == C(); // FAILS
}
```

Viewing all articles
Browse latest Browse all 1106

Trending Articles



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