summaryrefslogtreecommitdiff
path: root/Source/VCGeneration/ConditionGeneration.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-07-07 03:20:23 +0200
committerGravatar wuestholz <unknown>2014-07-07 03:20:23 +0200
commit15279d479f3d97952a7345043a1e50b36c88c189 (patch)
tree1772a324ba6d2000dc250a508657d2ec63c36d51 /Source/VCGeneration/ConditionGeneration.cs
parent03ddba11bfb066c2fc2b0f73aaa8d958e6a9d190 (diff)
Worked on adding support for "canned errors".
Diffstat (limited to 'Source/VCGeneration/ConditionGeneration.cs')
-rw-r--r--Source/VCGeneration/ConditionGeneration.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/VCGeneration/ConditionGeneration.cs b/Source/VCGeneration/ConditionGeneration.cs
index abbcf4aa..33f36a31 100644
--- a/Source/VCGeneration/ConditionGeneration.cs
+++ b/Source/VCGeneration/ConditionGeneration.cs
@@ -1513,7 +1513,7 @@ namespace VC {
&& currentImplementation.InjectedAssumptionVariables.Any()
&& ac.Checksum != null
&& (currentImplementation.AssertionChecksumsInPreviousSnapshot != null && currentImplementation.AssertionChecksumsInPreviousSnapshot.Contains(ac.Checksum))
- && !currentImplementation.ErrorChecksumsInCachedSnapshot.Contains(ac.Checksum))))
+ && !currentImplementation.ErrorChecksumToCachedError.ContainsKey(ac.Checksum))))
{
// Bind the assertion expression to a local variable.
var incarnation = CreateIncarnation(CurrentTemporaryVariableForAssertions, new IdentifierExpr(Token.NoToken, CurrentTemporaryVariableForAssertions));
@@ -1529,10 +1529,11 @@ namespace VC {
&& currentImplementation.AnyErrorsInCachedSnapshot
&& ac.Checksum != null
&& (currentImplementation.AssertionChecksumsInPreviousSnapshot != null && currentImplementation.AssertionChecksumsInPreviousSnapshot.Contains(ac.Checksum))
- && currentImplementation.ErrorChecksumsInCachedSnapshot.Contains(ac.Checksum)
+ && currentImplementation.ErrorChecksumToCachedError.ContainsKey(ac.Checksum)
&& (currentImplementation.InjectedAssumptionVariables == null || !currentImplementation.InjectedAssumptionVariables.Any(v => incarnationMap.ContainsKey(v))))
{
- // TODO(wuestholz): Uncomment this once the canned errors are reported.
+ // Turn it into an assume statement.
+ // TODO(wuestholz): Uncomment this once the canned errors are reported.
// pc = new AssumeCmd(ac.tok, copy);
pc.Attributes = new QKeyValue(Token.NoToken, "canned_failing_assertion", new List<object>(), pc.Attributes);
currentImplementation.AddCannedFailingAssertion(ac);
@@ -1552,7 +1553,7 @@ namespace VC {
|| (currentImplementation.AnyErrorsInCachedSnapshot
&& pc.Checksum != null
&& (currentImplementation.AssertionChecksumsInPreviousSnapshot != null && currentImplementation.AssertionChecksumsInPreviousSnapshot.Contains(pc.Checksum))
- && !currentImplementation.ErrorChecksumsInCachedSnapshot.Contains(pc.Checksum)))
+ && !currentImplementation.ErrorChecksumToCachedError.ContainsKey(pc.Checksum)))
{
passiveCmds.Add(pc);
}