From 32c2f3b0da12cb1790014a12c3b84665682f6c4b Mon Sep 17 00:00:00 2001 From: Rustan Leino Date: Mon, 24 Mar 2014 08:57:50 -0700 Subject: Reduced noise in BVD display of temporary variables of the translation --- Source/Dafny/Translator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Dafny/Translator.cs') diff --git a/Source/Dafny/Translator.cs b/Source/Dafny/Translator.cs index ff706f37..e4472f67 100644 --- a/Source/Dafny/Translator.cs +++ b/Source/Dafny/Translator.cs @@ -3574,7 +3574,9 @@ namespace Microsoft.Dafny { Dictionary substMap = new Dictionary(); for (int i = 0; i < e.Function.Formals.Count; i++) { Formal p = e.Function.Formals[i]; - LocalVariable local = new LocalVariable(p.tok, p.tok, p.Name, p.Type, p.IsGhost); + // Note, in the following, the "##" makes the variable invisible in BVD. An alternative would be to communicate + // to BVD what this variable stands for and display it as such to the user. + LocalVariable local = new LocalVariable(p.tok, p.tok, "##" + p.Name, p.Type, p.IsGhost); local.type = local.OptionalType; // resolve local here IdentifierExpr ie = new IdentifierExpr(local.Tok, local.AssignUniqueName(currentDeclaration)); ie.Var = local; ie.Type = ie.Var.Type; // resolve ie here -- cgit v1.2.3