summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2015-01-26 22:30:01 +0100
committerGravatar wuestholz <unknown>2015-01-26 22:30:01 +0100
commit6b938bcca366f0ef388294b6808f7ea883aba1eb (patch)
tree94b0fec50651ed5002cc4955bdd37da98e9bcf28 /Source/Core
parent34a68b3dca1fff4cabc86bc692b22b4a88c5152c (diff)
Minor change
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/LambdaHelper.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/LambdaHelper.cs b/Source/Core/LambdaHelper.cs
index 603f7e72..d07eaac6 100644
--- a/Source/Core/LambdaHelper.cs
+++ b/Source/Core/LambdaHelper.cs
@@ -65,6 +65,12 @@ namespace Microsoft.Boogie {
int lambdaid = 0;
+ string FreshLambdaFunctionName()
+ {
+ // TODO(wuestholz): Should we use a counter per top-level declaration?
+ return string.Format("lambda#{0}", lambdaid++);
+ }
+
public override Expr VisitLambdaExpr(LambdaExpr lambda) {
var baseResult = base.VisitLambdaExpr(lambda);
lambda = baseResult as LambdaExpr;
@@ -168,7 +174,7 @@ namespace Microsoft.Boogie {
if (CommandLineOptions.Clo.TraceVerify) {
Console.WriteLine("New lambda: {0}", lam_str);
}
- Function fn = new Function(tok, "lambda#" + lambdaid++, freshTypeVars, formals, res, "auto-generated lambda function",
+ Function fn = new Function(tok, FreshLambdaFunctionName(), freshTypeVars, formals, res, "auto-generated lambda function",
Substituter.Apply(Substituter.SubstitutionFromHashtable(substFnAttrs), lambdaAttrs));
fcall = new FunctionCall(new IdentifierExpr(tok, fn.Name));