about summary refs log tree commit diff
path: root/src/rt/rust_chan.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2011-08-05 15:23:44 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2011-08-05 15:25:52 -0700
commit1c786bcc82424b9218f1ca52fa99a12ce353e590 (patch)
tree880c3f8d01ec2d6652b78f2d65a60ce55d032cd3 /src/rt/rust_chan.cpp
parente76efbc43a39ad035a29d6e1abc2a86b16123a03 (diff)
downloadrust-1c786bcc82424b9218f1ca52fa99a12ce353e590.tar.gz
rust-1c786bcc82424b9218f1ca52fa99a12ce353e590.zip
Initialize all constraints to False
Previously, typestate was initializing the init constraint for
a declared-but-not-initialized variable (like x in "let x;") to False,
but other constraints to Don't-know. This led to over-lenient results
when a variable was used before declaration (see the included test
case). Now, everything gets initialized to False in the prestate/poststate-
finding phase, and Don't-know should only be used in pre/postconditions.

This aspect of the algorithm really needs formalization (just on paper),
but for now, this closes #700
Diffstat (limited to 'src/rt/rust_chan.cpp')
0 files changed, 0 insertions, 0 deletions