summaryrefslogtreecommitdiff
path: root/Source/ModelViewer/Namer.cs
diff options
context:
space:
mode:
authorGravatar MichalMoskal <unknown>2011-01-26 23:30:07 +0000
committerGravatar MichalMoskal <unknown>2011-01-26 23:30:07 +0000
commit34e214d35927c2cf49efdab79d111c67ae283ce7 (patch)
treeb9e86c3996c13b9cfb192dfa22d434a59d781283 /Source/ModelViewer/Namer.cs
parent950c133dba480d0ff4e99fe56096feeee95172ae (diff)
Allow the provider to skip some states when generating SourceLocations
Diffstat (limited to 'Source/ModelViewer/Namer.cs')
-rw-r--r--Source/ModelViewer/Namer.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/ModelViewer/Namer.cs b/Source/ModelViewer/Namer.cs
index 621f3837..f6858003 100644
--- a/Source/ModelViewer/Namer.cs
+++ b/Source/ModelViewer/Namer.cs
@@ -18,7 +18,7 @@ namespace Microsoft.Boogie.ModelViewer
protected Dictionary<Model.Element, string> canonicalName = new Dictionary<Model.Element, string>();
protected Dictionary<string, Model.Element> invCanonicalName = new Dictionary<string, Model.Element>();
protected Dictionary<Model.Element, string> localValue = new Dictionary<Model.Element, string>();
- protected Dictionary<string, SourceLocation> sourceLocations; // initialized lazily by GetSourceLocation()
+ protected Dictionary<string, SourceLocation> sourceLocations = new Dictionary<string, SourceLocation>();
public readonly Model model;
protected virtual bool UseLocalsForCanonicalNames
@@ -248,10 +248,6 @@ namespace Microsoft.Boogie.ModelViewer
public SourceLocation GetSourceLocation(Model.CapturedState s)
{
- if (sourceLocations == null) {
- GenerateSourceLocations();
- }
-
SourceLocation res;
sourceLocations.TryGetValue(s.Name, out res);
return res;
@@ -329,7 +325,7 @@ namespace Microsoft.Boogie.ModelViewer
sb.Append(@"{\cf6 ").Append(n).Append("}");
}
- protected virtual void GenerateSourceLocations()
+ protected virtual void GenerateSourceLocations(IEnumerable<NamedState> states)
{
sourceLocations = new Dictionary<string, SourceLocation>();