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

Commented Unassigned: newtype vs sequences [50]

$
0
0
It appears there are some issues with the new numeric types and sequences.

As shown in this example:
http://rise4fun.com/Dafny/aULt
Dafny can’t see that an element of a byte sequence should be within a byte’s bounds (i.e., between 0 and 256), though it can see it for an individual variable of type byte.

This may be related to the fact that Dafny can’t seem to see that elements of a byte sequence are part of the sequence, as shown here:
http://rise4fun.com/Dafny/Kapt
Notice that it works fine for sequences of ints, but not for bytes.

As a related example of this disconnect, see:
http://rise4fun.com/Dafny/DRv9g

Comments: Here's one more, possibly related example. Instead of forgetting newtype bounds, Dafny appears to forget sequence axioms when the sequences consist of newtypes instead of ints: http://rise4fun.com/Dafny/traY

Viewing all articles
Browse latest Browse all 1106

Trending Articles



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