diff options
author | Unknown <leino@LEINO6.redmond.corp.microsoft.com> | 2012-08-29 18:11:49 -0700 |
---|---|---|
committer | Unknown <leino@LEINO6.redmond.corp.microsoft.com> | 2012-08-29 18:11:49 -0700 |
commit | 4a522f9458decdf7865be79596788c50e9145faf (patch) | |
tree | 3ee69980ad3fea1690997b57ba58b633ef74eabe /Dafny | |
parent | 4f26cc2a956771717d21285d9bb527a0602c3e0a (diff) |
Dafny: fixed bug in checking postconditions of functions that mention the result the function itself
Diffstat (limited to 'Dafny')
-rw-r--r-- | Dafny/Translator.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Dafny/Translator.cs b/Dafny/Translator.cs index 1b8a23ee..c8cc11f6 100644 --- a/Dafny/Translator.cs +++ b/Dafny/Translator.cs @@ -1605,8 +1605,10 @@ namespace Microsoft.Dafny { // check that postconditions hold
var ens = new Bpl.EnsuresSeq();
foreach (Expression p in f.Ens) {
- bool splitHappened; // we actually don't care
- foreach (var s in TrSplitExpr(p, etran, out splitHappened)) {
+ var functionHeight = currentModule.CallGraph.GetSCCRepresentativeId(f);
+ var splits = new List<SplitExprInfo>();
+ bool splitHappened/*we actually don't care*/ = TrSplitExpr(p, splits, true, functionHeight, etran);
+ foreach (var s in splits) {
if (!s.IsFree) {
ens.Add(Ensures(s.E.tok, s.IsFree, s.E, null, null));
}
|