summaryrefslogtreecommitdiff
path: root/Source/Houdini/Houdini.cs
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2014-07-15 20:25:37 +0100
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2014-07-15 20:25:37 +0100
commit2212c8ea826dfbbc65beef73c7ee50814175c176 (patch)
treefc27acb5b0c795e5d6444f7f313667903bf5356e /Source/Houdini/Houdini.cs
parent74090e6fc892db326c6f98b8adb790f1f09fba41 (diff)
Fix nasty bug introduced by commit 61a94f409975.
There were many calls in the code to ``` new TokenTextWriter("<buffer>", buffer, false) ``` Prior to 61a94f409975 this was a call to the following constructor ``` TokenTextWriter(string filename, TextWriter writer, bool setTokens) ``` After that commit these then became calls to ``` TokenTextWriter(string filename, TextWriter writer, bool pretty) ``` An example of where this would cause issues was if ToString() was called on an AbsyCmd then the its token would be modified because the setTokens parameter was effectively set to True when the original intention was for it to be set to false! To fix this I've * Removed the default parameter value for pretty and fixed all uses so that we pass false where it was implicitly being set before * Where the intention was to set setTokens to false this has been fixed so it is actually set to false! Unfortunately I couldn't find a way of observing this bug from the Boogie executable so I couldn't create a test case. I could only observe it when I was using Boogie's APIs.
Diffstat (limited to 'Source/Houdini/Houdini.cs')
-rw-r--r--Source/Houdini/Houdini.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Houdini/Houdini.cs b/Source/Houdini/Houdini.cs
index adb86598..af1bd8ad 100644
--- a/Source/Houdini/Houdini.cs
+++ b/Source/Houdini/Houdini.cs
@@ -747,7 +747,7 @@ namespace Microsoft.Boogie.Houdini {
cexWriter.WriteLine("Counter example for " + refutedAnnotation.Constant);
cexWriter.Write(error.ToString());
cexWriter.WriteLine();
- using (var writer = new Microsoft.Boogie.TokenTextWriter(cexWriter))
+ using (var writer = new Microsoft.Boogie.TokenTextWriter(cexWriter, /*pretty=*/ false))
foreach (Microsoft.Boogie.Block blk in error.Trace)
blk.Emit(writer, 15);
//cexWriter.WriteLine();