From 47e3c9e215f1c5f51d35a974fccb5bd612eaa8be Mon Sep 17 00:00:00 2001 From: wuestholz Date: Mon, 18 May 2015 23:41:08 +0200 Subject: DafnyExtension: Added experimental support for diagnosing timeouts. --- Source/DafnyMenu/PkgCmdID.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/DafnyMenu/PkgCmdID.cs') diff --git a/Source/DafnyMenu/PkgCmdID.cs b/Source/DafnyMenu/PkgCmdID.cs index b6f30145..427dd888 100644 --- a/Source/DafnyMenu/PkgCmdID.cs +++ b/Source/DafnyMenu/PkgCmdID.cs @@ -13,5 +13,6 @@ namespace DafnyLanguage.DafnyMenu public static uint cmdidToggleSnapshotVerification = 0x103; public const uint cmdidToggleBVD = 0x104; public static uint cmdidToggleMoreAdvancedSnapshotVerification = 0x105; + public static uint cmdidDiagnoseTimeouts = 0x106; }; } \ No newline at end of file -- cgit v1.2.3 From 5e4bcf8e63a3351dc3f0f9bc6cbff8176adddd8b Mon Sep 17 00:00:00 2001 From: wuestholz Date: Mon, 26 Oct 2015 17:36:25 -0500 Subject: DafnyExtension: Add menu item for automatic induction (mainly developed by Rustan). --- Source/DafnyExtension/DafnyDriver.cs | 7 +++++++ Source/DafnyExtension/MenuProxy.cs | 8 ++++++++ Source/DafnyMenu/DafnyMenu.vsct | 14 ++++++++++++-- Source/DafnyMenu/DafnyMenuPackage.cs | 31 ++++++++++++++++++++++++++++++- Source/DafnyMenu/PkgCmdID.cs | 3 ++- 5 files changed, 59 insertions(+), 4 deletions(-) (limited to 'Source/DafnyMenu/PkgCmdID.cs') diff --git a/Source/DafnyExtension/DafnyDriver.cs b/Source/DafnyExtension/DafnyDriver.cs index 2ad05e85..27471d56 100644 --- a/Source/DafnyExtension/DafnyDriver.cs +++ b/Source/DafnyExtension/DafnyDriver.cs @@ -251,6 +251,13 @@ namespace DafnyLanguage return Dafny.DafnyOptions.Clo.VerifySnapshots; } + public static bool ChangeAutomaticInduction() { + var old = Dafny.DafnyOptions.O.Induction; + // toggle between modes 1 and 3 + Dafny.DafnyOptions.O.Induction = old == 1 ? 3 : 1; + return Dafny.DafnyOptions.O.Induction == 3; + } + public static bool Verify(Dafny.Program dafnyProgram, ResolverTagger resolver, string uniqueIdPrefix, string requestId, ErrorReporterDelegate er) { Dafny.Translator translator = new Dafny.Translator(dafnyProgram.reporter); translator.InsertChecksums = true; diff --git a/Source/DafnyExtension/MenuProxy.cs b/Source/DafnyExtension/MenuProxy.cs index 9ddc8344..0e061cd3 100644 --- a/Source/DafnyExtension/MenuProxy.cs +++ b/Source/DafnyExtension/MenuProxy.cs @@ -33,6 +33,14 @@ namespace DafnyLanguage && 0 < DafnyDriver.IncrementalVerificationMode(); } + public bool ToggleAutomaticInduction(IWpfTextView activeTextView) { + return DafnyDriver.ChangeAutomaticInduction(); + } + + public bool AutomaticInductionCommandEnabled(IWpfTextView activeTextView) { + return activeTextView != null; + } + public bool StopVerifierCommandEnabled(IWpfTextView activeTextView) { DafnyLanguage.ProgressTagger tagger; diff --git a/Source/DafnyMenu/DafnyMenu.vsct b/Source/DafnyMenu/DafnyMenu.vsct index 4c9a4913..02ffcf48 100644 --- a/Source/DafnyMenu/DafnyMenu.vsct +++ b/Source/DafnyMenu/DafnyMenu.vsct @@ -112,6 +112,15 @@ + + -