summaryrefslogtreecommitdiff
path: root/Source/ExecutionEngine
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-10-15 23:49:55 +0200
committerGravatar wuestholz <unknown>2014-10-15 23:49:55 +0200
commit4a722d4576f4afdb578552a48da948d1010733e6 (patch)
tree58afe3e3a87eebed240e610fbbecfe2414359f28 /Source/ExecutionEngine
parent2be6834c03da69c9500b24799c604dc45e868964 (diff)
Worked on the verification result caching.
Diffstat (limited to 'Source/ExecutionEngine')
-rw-r--r--Source/ExecutionEngine/VerificationResultCache.cs14
1 files changed, 11 insertions, 3 deletions
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)