From d95ace9aad0fc7a9fc5dbf43ed713db7f3625b2f Mon Sep 17 00:00:00 2001 From: MichalMoskal Date: Fri, 14 Jan 2011 19:17:13 +0000 Subject: Don't use local variable names as canonical names --- Source/ModelViewer/Namer.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/ModelViewer/Namer.cs b/Source/ModelViewer/Namer.cs index fb6a9372..983ccb2f 100644 --- a/Source/ModelViewer/Namer.cs +++ b/Source/ModelViewer/Namer.cs @@ -19,6 +19,11 @@ namespace Microsoft.Boogie.ModelViewer protected Dictionary invCanonicalName = new Dictionary(); protected Dictionary localValue = new Dictionary(); + protected virtual bool UseLocalsForCanonicalNames + { + get { return false; } + } + public readonly ViewOptions viewOpts; public LanguageModel(ViewOptions opts) { @@ -46,8 +51,10 @@ namespace Microsoft.Boogie.ModelViewer return elt.ToString(); } suff = NameSeqSuffix.Always; - if (localValue.TryGetValue(elt, out res)) - return res; + if (UseLocalsForCanonicalNames) { + if (localValue.TryGetValue(elt, out res)) + return res; + } return ""; } -- cgit v1.2.3