about summary refs log tree commit diff
path: root/src/comp/middle/tstate/tritv.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-308/+0
2012-01-19rustc: ";" to "," in enumsPatrick Walton-1/+1
2012-01-19rustc: "tag" -> "enum"Patrick Walton-1/+1
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-26/+26
Does what it says on the tin. The next commit will remove support for this syntax.
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-0/+7
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-13/+20
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-02Reformat. Issue #855Brian Anderson-5/+12
2011-08-27Convert the rest of rustc::middle to istrs. Issue #855Brian Anderson-5/+5
2011-08-20ReformatBrian Anderson-14/+21
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-15Add operator 'copy', translates as fall-through.Graydon Hoare-2/+2
2011-08-09Port the compiler to the ivec type [T] syntax.Erick Tryzelaar-2/+2
2011-08-05Initialize all constraints to FalseTim Chevalier-0/+6
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
2011-07-27Reformat for new syntaxMarijn Haverbeke-158/+168
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-2/+2
2011-07-12rustc: Simplify tritv::copy; shaves a couple of seconds off typestate.Patrick Walton-17/+4
2011-07-06rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to ↵Patrick Walton-3/+3
interior vectors
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-3/+3
2011-07-06rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to ↵Patrick Walton-3/+3
interior vectors
2011-06-27Tests for while loops that may invalidate constraintsTim Chevalier-7/+21
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.
2011-06-25Remove variable name 'res' from test suiteMarijn Haverbeke-3/+3
2011-06-24Invalidate constraints correctly after an assignment expressionTim Chevalier-16/+34
Modified typestate to throw away any constraints mentioning a variable on the LHS of an assignment, recv, assign_op, or on either side of a swap. Some code cleanup as well.
2011-06-24Remove uses of variable name 'res' from rustcMarijn Haverbeke-3/+3
This in preparation of making 'res' a keyword for defining resources. Please don't introduce too many new ones in the meantime...
2011-06-22Compute typestate properly for moveTim Chevalier-0/+246
typestate now drops constraints correctly in the post-state of a move expression or a declaration whose op is a move. It doesn't yet drop constraints mentioning variables that get updated. To do this, I had to change typestate to use trit-vectors instead of bit-vectors, because for every constraint, there are three possible values: known-to-be-false (e.g. after x <- y, init(y) is known-to-be-false), known-to-be-true, and unknown. Before, we conflated known-to-be-false with unknown. But move requires them to be treated differently. Consider: (program a) (a1) x = 1; (a2) y <- x; (a3) log x; (program b) (b1) x = 1; (b2) y <- z; (b3) log x; With only two values, the postcondition of statement a2 for constraint init(x) is the same as that of b2: 0. But in (a2)'s postcondition, init(x) *must* be false, but in (b2)'s condition, it's just whatever it was in the postcondition of the preceding statement.