summaryrefslogtreecommitdiff
path: root/Source/Core/LambdaHelper.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-03-17 20:39:02 +0100
committerGravatar wuestholz <unknown>2014-03-17 20:39:02 +0100
commit58f1b20a54deeb28b3fc58e298b8c283ecc443be (patch)
tree2a733a77cdf111ffb3d4b09baa82b3997c8039da /Source/Core/LambdaHelper.cs
parente0b47c8c100070b232c3c0387802ead99f28ac5e (diff)
Change class 'LambdaVisitor' to attach checksum to expanded lambda functions.
Diffstat (limited to 'Source/Core/LambdaHelper.cs')
-rw-r--r--Source/Core/LambdaHelper.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/LambdaHelper.cs b/Source/Core/LambdaHelper.cs
index a727dc95..51c9ee23 100644
--- a/Source/Core/LambdaHelper.cs
+++ b/Source/Core/LambdaHelper.cs
@@ -93,6 +93,20 @@ namespace Microsoft.Boogie {
Substituter.SubstitutionFromHashtable(oldSubst),
lambda.Attributes);
+ if (CommandLineOptions.Clo.VerifySnapshots && QKeyValue.FindStringAttribute(lambdaAttrs, "checksum") == null)
+ {
+ // Attach a dummy checksum to avoid issues in the dependency analysis.
+ var checksumAttr = new QKeyValue(lambda.tok, "checksum", new List<object> { "dummy" }, null);
+ if (lambdaAttrs == null)
+ {
+ lambdaAttrs = checksumAttr;
+ }
+ else
+ {
+ lambdaAttrs.AddLast(checksumAttr);
+ }
+ }
+
// this is ugly, the output will depend on hashing order
var subst = new Dictionary<Variable, Expr>();
var substFnAttrs = new Dictionary<Variable, Expr>();