1
Fork 0

Tests for while loops that may invalidate constraints

Wrote some small test cases that use while loops and moves, to
make sure the poststate for the loop body gets propagated into the
new prestate and deinitialization gets reflected.

Along with that, rewrite the code for intersecting states. I still
find it dodgy, but I guess I'll continue trying to add more tests.
Also, I'll probably feel better about it once I start formalizing
the algorithm.
This commit is contained in:
Tim Chevalier 2011-06-27 18:12:37 -07:00
parent 6d1050b1c7
commit 85b5b2a8e4
9 changed files with 200 additions and 96 deletions

View file

@ -0,0 +1,17 @@
// xfail-stage0
// error-pattern: Unsatisfied precondition constraint (for example, init(y
fn main() {
let int y = 42;
let int x;
do {
log y;
do {
do {
do {
x <- y;
} while (true);
} while (true);
} while (true);
} while (true);
}