diff options
author | jansmans <unknown> | 2009-10-02 15:00:11 +0000 |
---|---|---|
committer | jansmans <unknown> | 2009-10-02 15:00:11 +0000 |
commit | bdaa9996170aed0b2638962014fe80777b98d5c7 (patch) | |
tree | 4f317bacabe5d937a92a07410c952e82716b47f6 /Chalice/src/Translator.scala | |
parent | b63ea1d301407ea0b7e1c7d23a243a9c9cc836b9 (diff) |
- where clauses are now properly type-checked
- all credits must be consumed on entry to a loop by the invariant (to avoid getting the wrong maxlock)
Diffstat (limited to 'Chalice/src/Translator.scala')
-rw-r--r-- | Chalice/src/Translator.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Chalice/src/Translator.scala b/Chalice/src/Translator.scala index 50ffca51..46805d59 100644 --- a/Chalice/src/Translator.scala +++ b/Chalice/src/Translator.scala @@ -853,6 +853,7 @@ class Translator { (loopEtran.oldEtran.Credits := loopEtran.Credits) :: // is oldCredits?
// check invariant on entry to the loop
Exhale(invs map { inv => (inv, ErrorMessage(inv.pos, "The loop invariant might not hold on entry to the loop."))}, "loop invariant, initially") :::
+ List(bassert(DebtCheck, w.pos, "Loop invariant must consume all debt on entry to the loop.")) :::
// save values of local-variable loop targets
(for (sv <- saveLocalsV) yield BLocal(Variable2BVarWhere(sv))) :::
(for ((v,sv) <- w.LoopTargetsList zip saveLocalsV) yield
|