Whiley / WhileyCompiler

The Whiley Compiler (WyC)
http://whiley.org
Apache License 2.0
217 stars 36 forks source link

Negative Range Failure #1142

Closed DavePearce closed 2 years ago

DavePearce commented 2 years ago

Test 001115 includes the following:

function f(int[] ls) -> bool
requires all { i in -1..4 | (i < 0) || (i >= |ls|) || (ls[i] >= 0) }:
    return true

This does not generate a boogie violation, but does generate an interpreter violation. My feeling is that the interpreter is wrong here.