Using the current tip of test-gen-support (7cbe566), the following program fails verification when invoked with --lazy-methods and succeeds otherwise. The full command-line is cbmc Main.class (--lazy-methods).
class Problem {
private static final Object[] DEFAULT = {};
private Object data;
Problem() {
this.data = DEFAULT;
}
void checkInvariant() {
assert data != null;
}
}
public class Main {
public static void main(String[] args) {
new Problem().checkInvariant();
}
}
@smowton, do you know why this might be?