summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar MichalMoskal <unknown>2011-01-14 19:17:13 +0000
committerGravatar MichalMoskal <unknown>2011-01-14 19:17:13 +0000
commitd95ace9aad0fc7a9fc5dbf43ed713db7f3625b2f (patch)
treeda8ed3f2c26ede7cdbd33d4e5a89484075f05f61
parent99381d4e2267325289a6a209c134a1d29ea6469a (diff)
Don't use local variable names as canonical names
-rw-r--r--Source/ModelViewer/Namer.cs11
1 files 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<string, Model.Element> invCanonicalName = new Dictionary<string, Model.Element>();
protected Dictionary<Model.Element, string> localValue = new Dictionary<Model.Element, string>();
+ 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 "";
}