summaryrefslogtreecommitdiff
path: root/Source/Dafny/Rewriter.cs
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2014-10-27 13:26:43 -0700
committerGravatar Bryan Parno <parno@microsoft.com>2014-10-27 13:26:43 -0700
commit5f5f709c8f3924ddbfbb48f52b7875eac143503a (patch)
tree827691a1ae5c2b819da84a16a2da30a47c1ad138 /Source/Dafny/Rewriter.cs
parent29c8ee79b916f15e1c4b46e09e43153b990cddcc (diff)
Add an option to allow automatically generated requirements to be printed
to a file, making them easier to inspect and manipulate.
Diffstat (limited to 'Source/Dafny/Rewriter.cs')
-rw-r--r--Source/Dafny/Rewriter.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Dafny/Rewriter.cs b/Source/Dafny/Rewriter.cs
index 6921522c..56e28047 100644
--- a/Source/Dafny/Rewriter.cs
+++ b/Source/Dafny/Rewriter.cs
@@ -759,6 +759,12 @@ namespace Microsoft.Dafny
if (!tip.Equals("")) {
resolver.ReportAdditionalInformation(f.tok, tip, f.tok.val.Length);
+ if (DafnyOptions.O.AutoReqPrintFile != null) {
+ using (System.IO.TextWriter writer = new System.IO.StreamWriter(DafnyOptions.O.AutoReqPrintFile, true)) {
+ writer.WriteLine(f.Name);
+ writer.WriteLine("\t" + tip);
+ }
+ }
}
}