diff options
author | 2014-10-15 23:49:55 +0200 | |
---|---|---|
committer | 2014-10-15 23:49:55 +0200 | |
commit | 4a722d4576f4afdb578552a48da948d1010733e6 (patch) | |
tree | 58afe3e3a87eebed240e610fbbecfe2414359f28 | |
parent | 2be6834c03da69c9500b24799c604dc45e868964 (diff) |
Worked on the verification result caching.
-rw-r--r-- | Source/Core/AbsyCmd.cs | 4 | ||||
-rw-r--r-- | Source/ExecutionEngine/VerificationResultCache.cs | 14 | ||||
-rw-r--r-- | Test/snapshots/runtest.snapshot.expect | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/Source/Core/AbsyCmd.cs b/Source/Core/AbsyCmd.cs index d9176ca9..ddb3a607 100644 --- a/Source/Core/AbsyCmd.cs +++ b/Source/Core/AbsyCmd.cs @@ -2573,10 +2573,6 @@ namespace Microsoft.Boogie { result = c;
}
}
- if (result == null)
- {
- result = new LiteralExpr(Token.NoToken, true);
- }
return result;
}
diff --git a/Source/ExecutionEngine/VerificationResultCache.cs b/Source/ExecutionEngine/VerificationResultCache.cs index bc529849..eed92d31 100644 --- a/Source/ExecutionEngine/VerificationResultCache.cs +++ b/Source/ExecutionEngine/VerificationResultCache.cs @@ -223,9 +223,10 @@ namespace Microsoft.Boogie if (DependencyCollector.AllFunctionDependenciesAreDefinedAndUnchanged(oldProc, Program))
{
var before = new List<Cmd>();
- if (oldProc.Requires.Any())
+ var pre = node.CheckedPrecondition(oldProc, Program);
+ if (pre != null)
{
- var pre = node.CheckedPrecondition(oldProc, Program);
+
var assume = new AssumeCmd(Token.NoToken, pre, new QKeyValue(Token.NoToken, "precondition_previous_snapshot", new List<object>(), null));
before.Add(assume);
}
@@ -241,7 +242,14 @@ namespace Microsoft.Boogie new List<AssignLhs> { new SimpleAssignLhs(Token.NoToken, new IdentifierExpr(Token.NoToken, mPre)) },
new List<Expr> { new IdentifierExpr(Token.NoToken, m.Decl) }));
var eq = LiteralExpr.Eq(new IdentifierExpr(Token.NoToken, mPre), new IdentifierExpr(Token.NoToken, m.Decl));
- post = LiteralExpr.And(post, eq);
+ if (post == null)
+ {
+ post = eq;
+ }
+ else
+ {
+ post = LiteralExpr.And(post, eq);
+ }
}
if (post != null)
diff --git a/Test/snapshots/runtest.snapshot.expect b/Test/snapshots/runtest.snapshot.expect index 899cd914..db470ef3 100644 --- a/Test/snapshots/runtest.snapshot.expect +++ b/Test/snapshots/runtest.snapshot.expect @@ -120,7 +120,7 @@ Boogie program verifier finished with 0 verified, 2 errors Snapshots19.v0.bpl(7,5): Error BP5001: This assertion might not hold.
Boogie program verifier finished with 0 verified, 1 error
-Snapshots19.v1.bpl(7,5): Error BP5001: This assertion might not hold.
+Snapshots19.v0.bpl(7,5): Error BP5001: This assertion might not hold.
Boogie program verifier finished with 0 verified, 1 error
Snapshots20.v0.bpl(13,9): Error BP5001: This assertion might not hold.
|