diff options
author | wuestholz <unknown> | 2014-10-19 19:39:35 +0200 |
---|---|---|
committer | wuestholz <unknown> | 2014-10-19 19:39:35 +0200 |
commit | 039629ed61cd9537a7b99e0e2993d8d641d79d76 (patch) | |
tree | b6f832c96897e455aaf8ae5980d570c1640f2e58 /Source/VCGeneration | |
parent | 92aa9a93dd286f10cebd2e10e2bdd2065d51b1aa (diff) |
Worked on the verification result caching.
Diffstat (limited to 'Source/VCGeneration')
-rw-r--r-- | Source/VCGeneration/ConditionGeneration.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/VCGeneration/ConditionGeneration.cs b/Source/VCGeneration/ConditionGeneration.cs index dd7e1eac..cbdacfda 100644 --- a/Source/VCGeneration/ConditionGeneration.cs +++ b/Source/VCGeneration/ConditionGeneration.cs @@ -1298,7 +1298,7 @@ namespace VC { Dictionary<Variable, Expr> preHavocIncarnationMap = null; // null = the previous command was not an HashCmd. Otherwise, a *copy* of the map before the havoc statement
- protected void TurnIntoPassiveBlock(Block b, Dictionary<Variable, Expr> incarnationMap, ModelViewInfo mvInfo, Substitution oldFrameSubst, byte[] currentChecksum = null) {
+ protected void TurnIntoPassiveBlock(Block b, Dictionary<Variable, Expr> incarnationMap, ModelViewInfo mvInfo, Substitution oldFrameSubst, VariableCollector variableCollector, byte[] currentChecksum = null) {
Contract.Requires(b != null);
Contract.Requires(incarnationMap != null);
Contract.Requires(mvInfo != null);
@@ -1308,7 +1308,8 @@ namespace VC { List<Cmd> passiveCmds = new List<Cmd>();
foreach (Cmd c in b.Cmds) {
Contract.Assert(c != null); // walk forward over the commands because the map gets modified in a forward direction
- ChecksumHelper.ComputeChecksums(c, currentImplementation, incarnationMap, currentChecksum);
+ ChecksumHelper.ComputeChecksums(c, currentImplementation, variableCollector.usedVars, currentChecksum);
+ variableCollector.Visit(c);
currentChecksum = c.Checksum;
TurnIntoPassiveCmd(c, incarnationMap, oldFrameSubst, passiveCmds, mvInfo, b);
}
@@ -1408,6 +1409,7 @@ namespace VC { Dictionary<Block, Dictionary<Variable, Expr>> block2Incarnation = new Dictionary<Block, Dictionary<Variable, Expr>>();
Block exitBlock = null;
Dictionary<Variable, Expr> exitIncarnationMap = null;
+ var variableCollector = new VariableCollector();
foreach (Block b in sortedNodes) {
Contract.Assert(b != null);
Contract.Assert(!block2Incarnation.ContainsKey(b));
@@ -1442,7 +1444,7 @@ namespace VC { }
#endregion Each block's map needs to be available to successor blocks
- TurnIntoPassiveBlock(b, incarnationMap, mvInfo, oldFrameSubst, currentChecksum);
+ TurnIntoPassiveBlock(b, incarnationMap, mvInfo, oldFrameSubst, variableCollector, currentChecksum);
exitBlock = b;
exitIncarnationMap = incarnationMap;
}
|