diff --git a/Source/DafnyCore/Compilers/Compiler-Csharp.cs b/Source/DafnyCore/Compilers/Compiler-Csharp.cs index 45a003b94f6..9431e46afdb 100644 --- a/Source/DafnyCore/Compilers/Compiler-Csharp.cs +++ b/Source/DafnyCore/Compilers/Compiler-Csharp.cs @@ -3390,7 +3390,7 @@ public override bool RunTargetProgram(string dafnyProgramName, string targetProg } private void AddTestCheckerIfNeeded(string name, Declaration decl, ConcreteSyntaxTree wr) { - if (DafnyOptions.O.RunAllTests || !Attributes.Contains(decl.Attributes, "test")) { + if (DafnyOptions.O.Compile || DafnyOptions.O.RunAllTests || !Attributes.Contains(decl.Attributes, "test")) { return; } diff --git a/Source/DafnyCore/Options/DeveloperOptionBag.cs b/Source/DafnyCore/Options/DeveloperOptionBag.cs index 64949a23d6d..df4cf86fdfb 100644 --- a/Source/DafnyCore/Options/DeveloperOptionBag.cs +++ b/Source/DafnyCore/Options/DeveloperOptionBag.cs @@ -5,13 +5,18 @@ namespace Microsoft.Dafny; public class DeveloperOptionBag { + public static readonly Option SpillTranslation = new("--spill-translation", + @"In case the Dafny source code is translated to another language, emit that translation.") { + IsHidden = true + }; + public static readonly Option UseBaseFileName = new("--use-basename-for-filename", "When parsing use basename of file for tokens instead of the path supplied on the command line") { IsHidden = true }; public static readonly Option BoogiePrint = new("--bprint", - @" + @" Print Boogie program translated from Dafny (use - as to print to console)".TrimStart()) { IsHidden = true, @@ -33,6 +38,8 @@ Print Dafny program after resolving it. }; static DeveloperOptionBag() { + DafnyOptions.RegisterLegacyBinding(SpillTranslation, (o, f) => o.SpillTargetCode = f ? 1U : 0U); + DafnyOptions.RegisterLegacyBinding(ResolvedPrint, (options, value) => { options.DafnyPrintResolvedFile = value; options.ExpandFilename(options.DafnyPrintResolvedFile, x => options.DafnyPrintResolvedFile = x, options.LogPrefix, diff --git a/Source/DafnyCore/Options/ICommandSpec.cs b/Source/DafnyCore/Options/ICommandSpec.cs index 3033445dde9..36d52f0848c 100644 --- a/Source/DafnyCore/Options/ICommandSpec.cs +++ b/Source/DafnyCore/Options/ICommandSpec.cs @@ -34,7 +34,8 @@ static ICommandSpec() { }.Concat(VerificationOptions).ToList(); public static IReadOnlyList