From c79cb5e55aa45ce584e12dd308251f799163f5b3 Mon Sep 17 00:00:00 2001 From: Remy Willems Date: Thu, 9 Jan 2025 20:24:57 +0100 Subject: [PATCH 01/16] Set a default verification time limit (#6028) Fixes https://github.com/dafny-lang/ide-vscode/issues/514 ### What was changed? Set a default verification time limit ### How has this been tested? Added a CLI test that checks there is a default time-out By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- Source/DafnyCore/Options/BoogieOptionBag.cs | 4 +- Source/DafnyCore/Pipeline/Compilation.cs | 96 +++++++++++++++++-- .../LitTests/LitTest/cli/defaultTimeLimit.dfy | 17 ++++ .../LitTest/cli/defaultTimeLimit.dfy.expect | 7 ++ .../git-issues/git-issue-3855.dfy.expect | 2 +- docs/DafnyRef/UserGuide.md | 2 +- docs/news/{fix.6006 => 6006.fix} | 0 docs/news/6028.feat | 1 + 8 files changed, 117 insertions(+), 12 deletions(-) create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy.expect rename docs/news/{fix.6006 => 6006.fix} (100%) create mode 100644 docs/news/6028.feat diff --git a/Source/DafnyCore/Options/BoogieOptionBag.cs b/Source/DafnyCore/Options/BoogieOptionBag.cs index 2983c3dbf3b..59ffe8bfcbe 100644 --- a/Source/DafnyCore/Options/BoogieOptionBag.cs +++ b/Source/DafnyCore/Options/BoogieOptionBag.cs @@ -51,8 +51,8 @@ public static class BoogieOptionBag { IsHidden = true }; - public static readonly Option VerificationTimeLimit = new("--verification-time-limit", - "Limit the number of seconds spent trying to verify each procedure") { + public static readonly Option VerificationTimeLimit = new("--verification-time-limit", () => 30, + "Limit the number of seconds spent trying to verify each assertion batch. A value of 0 indicates no limit") { ArgumentHelpName = "seconds", }; diff --git a/Source/DafnyCore/Pipeline/Compilation.cs b/Source/DafnyCore/Pipeline/Compilation.cs index d89a6b973fd..0ecaadeae78 100644 --- a/Source/DafnyCore/Pipeline/Compilation.cs +++ b/Source/DafnyCore/Pipeline/Compilation.cs @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.CommandLine; +using System.CommandLine.Help; using System.IO; using System.Linq; using System.Reactive; @@ -560,17 +561,96 @@ public static void ReportDiagnosticsInResult(DafnyOptions options, string name, errorReporter.ReportBoogieError(errorInformation, dafnyCounterExampleModel); } - // This reports problems that are not captured by counter-examples, like a time-out - // The Boogie API forces us to create a temporary engine here to report the outcome, even though it only uses the options. - var boogieEngine = new ExecutionEngine(options, new EmptyVerificationResultCache(), - CustomStackSizePoolTaskScheduler.Create(0, 0)); - boogieEngine.ReportOutcome(null, outcome, outcomeError => errorReporter.ReportBoogieError(outcomeError, null, false), - name, token, null, TextWriter.Null, - timeLimit, result.CounterExamples); + var outcomeError = ReportOutcome(options, outcome, name, token, timeLimit, result.CounterExamples); + if (outcomeError != null) { + errorReporter.ReportBoogieError(outcomeError, null, false); + } + } + + private static ErrorInformation? ReportOutcome(DafnyOptions options, + VcOutcome vcOutcome, string name, + IToken token, uint timeLimit, List errors) { + ErrorInformation? errorInfo = null; + + switch (vcOutcome) { + case VcOutcome.Correct: + break; + case VcOutcome.Errors: + case VcOutcome.TimedOut: { + if (vcOutcome != VcOutcome.TimedOut && + (!errors.Any(e => e.IsAuxiliaryCexForDiagnosingTimeouts))) { + break; + } + + string msg = string.Format("Verification of '{1}' timed out after {0} seconds. (the limit can be increased using --verification-time-limit)", timeLimit, name); + errorInfo = ErrorInformation.Create(token, msg); + + // Report timed out assertions as auxiliary info. + var comparer = new CounterexampleComparer(); + var timedOutAssertions = errors.Where(e => e.IsAuxiliaryCexForDiagnosingTimeouts).Distinct(comparer) + .OrderBy(x => x, comparer).ToList(); + if (0 < timedOutAssertions.Count) { + errorInfo!.Msg += $" with {timedOutAssertions.Count} check(s) that timed out individually"; + } + + foreach (Counterexample error in timedOutAssertions) { + IToken tok; + string auxMsg = null!; + switch (error) { + case CallCounterexample callCounterexample: + tok = callCounterexample.FailingCall.tok; + auxMsg = callCounterexample.FailingCall.Description.FailureDescription; + break; + case ReturnCounterexample returnCounterexample: + tok = returnCounterexample.FailingReturn.tok; + auxMsg = returnCounterexample.FailingReturn.Description.FailureDescription; + break; + case AssertCounterexample assertError: { + tok = assertError.FailingAssert.tok; + if (!(assertError.FailingAssert.ErrorMessage == null || + ((ExecutionEngineOptions)options).ForceBplErrors)) { + auxMsg = assertError.FailingAssert.ErrorMessage; + } + + auxMsg ??= assertError.FailingAssert.Description.FailureDescription; + break; + } + default: throw new Exception(); + } + + errorInfo.AddAuxInfo(tok, auxMsg, "Unverified check due to timeout"); + } + + break; + } + case VcOutcome.OutOfResource: { + string msg = "Verification out of resource (" + name + ")"; + errorInfo = ErrorInformation.Create(token, msg); + } + break; + case VcOutcome.OutOfMemory: { + string msg = "Verification out of memory (" + name + ")"; + errorInfo = ErrorInformation.Create(token, msg); + } + break; + case VcOutcome.SolverException: { + string msg = "Verification encountered solver exception (" + name + ")"; + errorInfo = ErrorInformation.Create(token, msg); + } + break; + + case VcOutcome.Inconclusive: { + string msg = "Verification inconclusive (" + name + ")"; + errorInfo = ErrorInformation.Create(token, msg); + } + break; + } + + return errorInfo; } private static void AddAssertedExprToCounterExampleErrorInfo( - DafnyOptions options, Counterexample counterExample, ErrorInformation errorInformation) { + DafnyOptions options, Counterexample counterExample, ErrorInformation errorInformation) { Boogie.ProofObligationDescription? boogieProofObligationDesc = null; switch (errorInformation.Kind) { case ErrorKind.Assertion: diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy b/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy new file mode 100644 index 00000000000..e91e3331f33 --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy @@ -0,0 +1,17 @@ +// RUN: ! %baredafny verify --use-basename-for-filename "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +method Foo() { + // Assert something that takes a long time to verify + assert Ack(4, 2) == 1; +} + +function Ack(m: nat, n: nat): nat +{ + if m == 0 then + n + 1 + else if n == 0 then + Ack(m - 1, 1) + else + Ack(m - 1, Ack(m, n - 1)) +} \ No newline at end of file diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy.expect new file mode 100644 index 00000000000..b7677c39850 --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.dfy.expect @@ -0,0 +1,7 @@ +defaultTimeLimit.dfy(4,7): Error: Verification of 'Foo' timed out after 30 seconds. (the limit can be increased using --verification-time-limit) + | +4 | method Foo() { + | ^^^ + + +Dafny program verifier finished with 1 verified, 0 errors, 1 time out diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.dfy.expect index e7965e56414..2c2bc4bc249 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.dfy.expect @@ -1,5 +1,5 @@ git-issue-3855.dfy(799,0): Warning: attribute :ignore is deprecated -git-issue-3855.dfy(799,11): Error: Verification of 'Memory.dynMove' timed out after seconds +git-issue-3855.dfy(799,11): Error: Verification of 'Memory.dynMove' timed out after seconds. (the limit can be increased using --verification-time-limit) git-issue-3855.dfy(942,17): Error: a precondition for this call could not be proved git-issue-3855.dfy(430,29): Related location: this is the precondition that could not be proved git-issue-3855.dfy(942,17): Error: a precondition for this call could not be proved diff --git a/docs/DafnyRef/UserGuide.md b/docs/DafnyRef/UserGuide.md index 578b63c6924..8fd4ce1c5dc 100644 --- a/docs/DafnyRef/UserGuide.md +++ b/docs/DafnyRef/UserGuide.md @@ -2769,7 +2769,7 @@ The following options are also commonly used: but a large positive number reports more errors per run * `--verification-time-limit:` (was `-timeLimit:`) - limits - the number of seconds spent trying to verify each procedure. + the number of seconds spent trying to verify each assertion batch. ### 13.9.11. Controlling test generation {#sec-controlling-test-gen} diff --git a/docs/news/fix.6006 b/docs/news/6006.fix similarity index 100% rename from docs/news/fix.6006 rename to docs/news/6006.fix diff --git a/docs/news/6028.feat b/docs/news/6028.feat new file mode 100644 index 00000000000..2bfb7957467 --- /dev/null +++ b/docs/news/6028.feat @@ -0,0 +1 @@ +Change the default value for --verification-time-limit to 30 seconds instead of 0 (no limit) \ No newline at end of file From 0edf705ee7a5a53cc496d1718aa36351d10fb3d2 Mon Sep 17 00:00:00 2001 From: Remy Willems Date: Fri, 10 Jan 2025 15:20:59 +0100 Subject: [PATCH 02/16] Attempt at fixing nightly. (#6035) ### What was changed? - Remove the `$(RUNTIME_IDENTIFIER)` property from csproj files that was needed as a workaround but may break things in .NET 8 according to SO - Remove references from DafnyDriver to DafnyServer, that prevented publishing correctly with .NET 8 - Stop publishing DafnyLanguageServer since it's not used directly. ### How has this been tested? Tested by existing tests By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- .github/workflows/integration-tests-reusable.yml | 5 +++++ Scripts/package.py | 1 - Source/DafnyDriver/Commands/ServerCommand.cs | 2 -- Source/DafnyDriver/DafnyDriver.csproj | 12 +----------- .../Legacy/LegacyJsonVerificationLogger.cs | 1 - .../DafnyLanguageServer/DafnyLanguageServer.csproj | 1 - Source/DafnyServer/DafnyServer.csproj | 10 ---------- .../DafnyTestGeneration/DafnyTestGeneration.csproj | 1 - 8 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/integration-tests-reusable.yml b/.github/workflows/integration-tests-reusable.yml index 3109c167ccb..79d72f30dcf 100644 --- a/.github/workflows/integration-tests-reusable.yml +++ b/.github/workflows/integration-tests-reusable.yml @@ -72,6 +72,11 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.dotnet-version }} + # Setup dotnet 6.0 for running Boogie. Alternatively we could try running Boogie with a roll forward policy, or updating Boogie. + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 6.0.x - name: C++ for ubuntu 20.04 if: matrix.os == 'ubuntu-20.04' run: | diff --git a/Scripts/package.py b/Scripts/package.py index f543d37715c..aaffbfe4e20 100755 --- a/Scripts/package.py +++ b/Scripts/package.py @@ -161,7 +161,6 @@ def build(self): if path.exists(self.buildDirectory): shutil.rmtree(self.buildDirectory) run(["make", "--quiet", "clean"]) - self.run_publish("DafnyLanguageServer") self.run_publish("DafnyServer") self.run_publish("DafnyRuntime", "netstandard2.0") self.run_publish("DafnyRuntime", "net452") diff --git a/Source/DafnyDriver/Commands/ServerCommand.cs b/Source/DafnyDriver/Commands/ServerCommand.cs index a4cdf8c92b3..51381672ef5 100644 --- a/Source/DafnyDriver/Commands/ServerCommand.cs +++ b/Source/DafnyDriver/Commands/ServerCommand.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; using System.CommandLine; -using DafnyCore; using Microsoft.Dafny.LanguageServer.Language; using Microsoft.Dafny.LanguageServer.Language.Symbols; using Microsoft.Dafny.LanguageServer.Workspace; diff --git a/Source/DafnyDriver/DafnyDriver.csproj b/Source/DafnyDriver/DafnyDriver.csproj index f928e3f5043..0236f2ce5f6 100644 --- a/Source/DafnyDriver/DafnyDriver.csproj +++ b/Source/DafnyDriver/DafnyDriver.csproj @@ -13,16 +13,6 @@ true - - - false - false - - - - - $(RUNTIME_IDENTIFIER) - @@ -42,8 +32,8 @@ + - diff --git a/Source/DafnyDriver/Legacy/LegacyJsonVerificationLogger.cs b/Source/DafnyDriver/Legacy/LegacyJsonVerificationLogger.cs index 93087fe8e5d..e6e27c8b151 100644 --- a/Source/DafnyDriver/Legacy/LegacyJsonVerificationLogger.cs +++ b/Source/DafnyDriver/Legacy/LegacyJsonVerificationLogger.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Text.Json.Nodes; using DafnyCore.Verifier; -using DafnyServer; using Microsoft.Boogie; using VC; diff --git a/Source/DafnyLanguageServer/DafnyLanguageServer.csproj b/Source/DafnyLanguageServer/DafnyLanguageServer.csproj index 67513425d4e..92f1fad7dff 100644 --- a/Source/DafnyLanguageServer/DafnyLanguageServer.csproj +++ b/Source/DafnyLanguageServer/DafnyLanguageServer.csproj @@ -6,7 +6,6 @@ enable Microsoft.Dafny.LanguageServer ..\..\Binaries\ - true false MIT README.md diff --git a/Source/DafnyServer/DafnyServer.csproj b/Source/DafnyServer/DafnyServer.csproj index d736ee1074e..f9cd46eb532 100644 --- a/Source/DafnyServer/DafnyServer.csproj +++ b/Source/DafnyServer/DafnyServer.csproj @@ -10,16 +10,6 @@ MIT - - false - false - - - - - $(RUNTIME_IDENTIFIER) - - diff --git a/Source/DafnyTestGeneration/DafnyTestGeneration.csproj b/Source/DafnyTestGeneration/DafnyTestGeneration.csproj index 016cf01c491..f4f2f78ffd1 100644 --- a/Source/DafnyTestGeneration/DafnyTestGeneration.csproj +++ b/Source/DafnyTestGeneration/DafnyTestGeneration.csproj @@ -15,7 +15,6 @@ - From 8ede38cda6543763c3d6684f7f01ffbd9df492dc Mon Sep 17 00:00:00 2001 From: Remy Willems Date: Fri, 10 Jan 2025 21:14:55 +0100 Subject: [PATCH 03/16] Delete test for legacy CLI that tests broken behavior (#6037) ### What was changed? The Dafny legacy CLI shows part of a .NET error message as part of it UI. This can not be tested well since the specific error message is not defined as part of .NET, and can be different across .NET versions and platforms. On Windows it returns: `Invalid filename: The value cannot be an empty string. (Parameter 'path')` On other platforms it is: `Invalid filename: The path is empty. (Parameter 'path')` Instead of fixing the legacy CLI to remove the ambiguity, I'm removing the test for that ambiguous behavior since the old CLI is deprecated. ### How has this been tested? Removed a test By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- .../TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy | 2 -- .../LitTests/LitTest/git-issues/git-issue-3549a.dfy.expect | 1 - 2 files changed, 3 deletions(-) delete mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy delete mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy.expect diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy deleted file mode 100644 index 9ce07b0f267..00000000000 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy +++ /dev/null @@ -1,2 +0,0 @@ -// RUN: %exits-with 1 %baredafny "" 2> "%t" -// RUN: %diff "%s.expect" "%t" diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy.expect deleted file mode 100644 index 3ccac32363e..00000000000 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549a.dfy.expect +++ /dev/null @@ -1 +0,0 @@ -Invalid filename: The value cannot be an empty string. (Parameter 'path') From 0a335458a75701a93c42a0a68d5fb1e9a6896d87 Mon Sep 17 00:00:00 2001 From: olivier-aws Date: Fri, 10 Jan 2025 19:28:57 -0500 Subject: [PATCH 04/16] Fix name clash in generated CS files when module and types have same name (#6019) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What was changed? This change updates the CS code generated from Dafny to fix name clashes between namespace and class when a module defines a datatype with the same name. On the example for https://github.com/dafny-lang/dafny/issues/6014, we have: ``` module A { datatype A = Foo. // Notice the name of the datatype is the name of the module } module B { import opened A const bar: A method Main() { print "Hello!\n"; } } ``` which generated the code (simlified for readability) ``` namespace A { public interface _IA { bool is_Foo { get; } _IA DowncastClone(); } public class A : _IA { public A() { } // [...] public static _IA create() { return new A(); } private static readonly A._IA theDefault = create(); // [...] } } } // end of namespace A namespace B { public partial class __default { public static void _Main(Dafny.ISequence> __noArgsParameter) { Dafny.Helpers.Print((Dafny.Sequence.UnicodeFromString("Hello!\n")).ToVerbatimString(false)); } public static A._IA bar { get { return A.A.Default(); } } } } // end of namespace B ``` The expression `A._IA theDefault` does not compile in C#, as the first A. is resolved to be the name of the class and not the name of the namespace. One solution could be to ensure we have `_IA` here instead of `A._IA` as for the `create` method, but the code to generate this type name is used at other places where the `A._IA` is required (e.g in ` bar` method in `namespace B`). This change changes the name of the namespace `A` to `_NA` when there is a name clash with a datatype declared in `A`. ### How has this been tested? Updated test gith-issues-6014.dfy By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --------- Co-authored-by: Mikaël Mayer --- .../Backends/CSharp/CsharpCodeGenerator.cs | 48 +++++++++++++----- .../Backends/Cplusplus/CppCodeGenerator.cs | 41 ++++++++++------ .../Backends/Dafny/DafnyCodeGenerator.cs | 4 +- .../Backends/GoLang/GoCodeGenerator.cs | 14 +++--- .../Backends/Java/JavaCodeGenerator.cs | 7 +-- .../JavaScript/JavaScriptCodeGenerator.cs | 9 ++-- .../Backends/Python/PythonCodeGenerator.cs | 7 +-- .../SinglePassCodeGenerator.cs | 9 ++-- .../git-issues/git-issue-4449.dfy.cs.check | 1 - .../git-issues/git-issue-4449.dfy.cs.expect | 3 ++ .../git-issues/git-issue-4449.dfy.java.check | 1 - .../LitTest/git-issues/git-issue-6014.dfy | 49 +++++++++++++++++-- .../git-issues/git-issue-6014.dfy.expect | 2 - docs/news/fix.5746 | 1 + docs/news/fix.6014 | 1 + 15 files changed, 136 insertions(+), 61 deletions(-) delete mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.check create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.expect delete mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.java.check create mode 100644 docs/news/fix.5746 create mode 100644 docs/news/fix.6014 diff --git a/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs b/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs index 9bbc493116e..dbfb67041ad 100644 --- a/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs +++ b/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs @@ -265,15 +265,27 @@ protected override ConcreteSyntaxTree CreateStaticMain(IClassWriter cw, string a return wr.NewBlock($"public static void _StaticMain(Dafny.ISequence> {argsParameterName})"); } + /// + /// Compute the name of the class to use to translate a data-type or a class + /// + private string protectedTypeName(TopLevelDecl dt) { + var protectedName = IdName(dt); + if (dt.EnclosingModuleDefinition is { Name: var moduleName } && moduleName == protectedName) { + return $"_{protectedName}"; + } + return protectedName; + } + string IdProtectModule(string moduleName) { + Contract.Requires(moduleName != null); return string.Join(".", moduleName.Split(".").Select(IdProtect)); } protected override ConcreteSyntaxTree CreateModule(ModuleDefinition module, string moduleName, bool isDefault, ModuleDefinition externModule, string libraryName /*?*/, Attributes moduleAttributes, ConcreteSyntaxTree wr) { - moduleName = IdProtectModule(moduleName); - return wr.NewBlock($"namespace {moduleName}", " // end of " + $"namespace {moduleName}"); + var protectedModuleName = IdProtectModule(moduleName); + return wr.NewBlock($"namespace {protectedModuleName}", " // end of " + $"namespace {protectedModuleName}"); } protected override string GetHelperModuleName() => DafnyHelpersClass; @@ -305,8 +317,9 @@ string PrintVariance(TypeParameter.TPVariance variance) { return $"<{targs.Comma(PrintTypeParameter)}>"; } - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string /*?*/ fullPrintName, + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string /*?*/ fullPrintName, List typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { + var name = protectedTypeName(cls); var wBody = WriteTypeHeader("partial class", name, typeParameters, superClasses, tok, wr); ConcreteSyntaxTree/*?*/ wCtorBody = null; @@ -442,7 +455,7 @@ protected override ConcreteSyntaxTree CreateIterator(IteratorDecl iter, Concrete // } // } - var cw = (ClassWriter)CreateClass(IdProtect(iter.EnclosingModuleDefinition.GetCompileName(Options)), IdName(iter), iter, wr); + var cw = (ClassWriter)CreateClass(IdProtect(iter.EnclosingModuleDefinition.GetCompileName(Options)), iter, wr); var w = cw.InstanceMemberWriter; // here come the fields @@ -559,7 +572,7 @@ IClassWriter CompileDatatypeBase(DatatypeDecl dt, ConcreteSyntaxTree wr) { // } var nonGhostTypeArgs = SelectNonGhost(dt, dt.TypeArgs); var DtT_TypeArgs = TypeParameters(nonGhostTypeArgs); - var DtT_protected = IdName(dt) + DtT_TypeArgs; + var DtT_protected = protectedTypeName(dt) + DtT_TypeArgs; var simplifiedType = DatatypeWrapperEraser.SimplifyType(Options, UserDefinedType.FromTopLevelDecl(dt.Origin, dt)); var simplifiedTypeName = TypeName(simplifiedType, wr, dt.Origin); @@ -581,7 +594,7 @@ IClassWriter CompileDatatypeBase(DatatypeDecl dt, ConcreteSyntaxTree wr) { } else { EmitTypeDescriptorsForClass(dt.TypeArgs, dt, out var wTypeFields, out var wCtorParams, out _, out var wCtorBody); wr.Append(wTypeFields); - wr.Format($"public {IdName(dt)}({wCtorParams})").NewBlock().Append(wCtorBody); + wr.Format($"public {protectedTypeName(dt)}({wCtorParams})").NewBlock().Append(wCtorBody); } var wDefault = new ConcreteSyntaxTree(); @@ -995,7 +1008,7 @@ private void CompileDatatypeConstructors(DatatypeDecl dt, ConcreteSyntaxTree wrx // public override _IDt _Get() { if (c != null) { d = c(); c = null; } return d; } // public override string ToString() { return _Get().ToString(); } // } - var w = wrx.NewNamedBlock($"public class {dt.GetCompileName(Options)}__Lazy{typeParams} : {IdName(dt)}{typeParams}"); + var w = wrx.NewNamedBlock($"public class {dt.GetCompileName(Options)}__Lazy{typeParams} : {protectedTypeName(dt)}{typeParams}"); w.WriteLine($"public {NeedsNew(dt, "Computer")}delegate {DtTypeName(dt)} Computer();"); w.WriteLine($"{NeedsNew(dt, "c")}Computer c;"); w.WriteLine($"{NeedsNew(dt, "d")}{DtTypeName(dt)} d;"); @@ -1017,7 +1030,7 @@ private void CompileDatatypeConstructors(DatatypeDecl dt, ConcreteSyntaxTree wrx int constructorIndex = 0; // used to give each constructor a different name foreach (var ctor in dt.Ctors.Where(ctor => !ctor.IsGhost)) { var wr = wrx.NewNamedBlock( - $"public class {DtCtorDeclarationName(ctor)}{TypeParameters(nonGhostTypeArgs)} : {IdName(dt)}{typeParams}"); + $"public class {DtCtorDeclarationName(ctor)}{TypeParameters(nonGhostTypeArgs)} : {protectedTypeName(dt)}{typeParams}"); DatatypeFieldsAndConstructor(ctor, constructorIndex, wr); constructorIndex++; } @@ -1191,7 +1204,7 @@ string DtCtorDeclarationName(DatatypeCtor ctor) { Contract.Ensures(Contract.Result() != null); var dt = ctor.EnclosingDatatype; - return dt.IsRecordType ? IdName(dt) : dt.GetCompileName(Options) + "_" + ctor.GetCompileName(Options); + return dt.IsRecordType ? protectedTypeName(dt) : dt.GetCompileName(Options) + "_" + ctor.GetCompileName(Options); } /// @@ -1217,7 +1230,7 @@ string DtCtorName(DatatypeCtor ctor) { Contract.Ensures(Contract.Result() != null); var dt = ctor.EnclosingDatatype; - var dtName = IdName(dt); + var dtName = protectedTypeName(dt); if (!dt.EnclosingModuleDefinition.TryToAvoidName) { dtName = IdProtectModule(dt.EnclosingModuleDefinition.GetCompileName(Options)) + "." + dtName; } @@ -1235,7 +1248,7 @@ string DtCreateName(DatatypeCtor ctor) { } protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), IdName(nt), nt, wr); + var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), nt, wr); var w = cw.StaticMemberWriter; if (nt.NativeType != null) { var wEnum = w.NewBlock($"public static System.Collections.Generic.IEnumerable<{GetNativeTypeName(nt.NativeType)}> IntegerRange(BigInteger lo, BigInteger hi)"); @@ -1304,7 +1317,7 @@ void DeclareBoxedNewtype(NewtypeDecl nt, ConcreteSyntaxTree wr) { } protected override void DeclareSubsetType(SubsetTypeDecl sst, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), IdName(sst), sst, wr); + var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), sst, wr); if (sst.WitnessKind == SubsetTypeDecl.WKind.Compiled) { var sw = new ConcreteSyntaxTree(cw.InstanceMemberWriter.RelativeIndentLevel); var wStmts = cw.InstanceMemberWriter.Fork(); @@ -2507,6 +2520,10 @@ private string FullTypeName(UserDefinedType udt, MemberDecl/*?*/ member = null, return (cl.EnclosingModuleDefinition.TryToAvoidName ? "" : IdProtectModule(cl.EnclosingModuleDefinition.GetCompileName(Options)) + ".") + DtTypeName(cl, false); } + if (cl is DatatypeDecl) { + return (cl.EnclosingModuleDefinition.TryToAvoidName ? "" : IdProtectModule(cl.EnclosingModuleDefinition.GetCompileName(Options)) + ".") + protectedTypeName(cl as DatatypeDecl); + } + if (cl.EnclosingModuleDefinition.TryToAvoidName) { return IdProtect(cl.GetCompileName(Options)); } @@ -2514,6 +2531,11 @@ private string FullTypeName(UserDefinedType udt, MemberDecl/*?*/ member = null, if (cl.IsExtern(Options, out _, out _)) { return cl.EnclosingModuleDefinition.GetCompileName(Options) + "." + cl.GetCompileName(Options); } + + if (cl is ClassDecl) { + return (cl.EnclosingModuleDefinition.TryToAvoidName ? "" : IdProtectModule(cl.EnclosingModuleDefinition.GetCompileName(Options)) + ".") + protectedTypeName(cl as ClassDecl); + } + return IdProtectModule(cl.EnclosingModuleDefinition.GetCompileName(Options)) + "." + IdProtect(cl.GetCompileName(Options)); } @@ -2528,7 +2550,7 @@ protected override void EmitThis(ConcreteSyntaxTree wr, bool callToInheritedMemb protected override void EmitDatatypeValue(DatatypeValue dtv, string typeDescriptorArguments, string arguments, ConcreteSyntaxTree wr) { var dt = dtv.Ctor.EnclosingDatatype; - var dtName = IdProtectModule(dt.EnclosingModuleDefinition.GetCompileName(Options)) + "." + IdName(dt); + var dtName = IdProtectModule(dt.EnclosingModuleDefinition.GetCompileName(Options)) + "." + protectedTypeName(dt); var nonGhostInferredTypeArgs = SelectNonGhost(dt, dtv.InferredTypeArgs); var typeParams = nonGhostInferredTypeArgs.Count == 0 ? "" : $"<{TypeNames(nonGhostInferredTypeArgs, wr, dtv.Origin)}>"; diff --git a/Source/DafnyCore/Backends/Cplusplus/CppCodeGenerator.cs b/Source/DafnyCore/Backends/Cplusplus/CppCodeGenerator.cs index 04f08c8794f..dc8d8715169 100644 --- a/Source/DafnyCore/Backends/Cplusplus/CppCodeGenerator.cs +++ b/Source/DafnyCore/Backends/Cplusplus/CppCodeGenerator.cs @@ -149,7 +149,7 @@ protected override void EmitFooter(Program program, ConcreteSyntaxTree wr) { public override void EmitCallToMain(Method mainMethod, string baseName, ConcreteSyntaxTree wr) { var w = wr.NewBlock("int main(int argc, char *argv[])"); var tryWr = w.NewBlock("try"); - tryWr.WriteLine(string.Format("{0}::{1}::{2}(dafny_get_args(argc, argv));", mainMethod.EnclosingClass.EnclosingModuleDefinition.GetCompileName(Options), mainMethod.EnclosingClass.GetCompileName(Options), mainMethod.Name)); + tryWr.WriteLine(string.Format("{0}::{1}::{2}(dafny_get_args(argc, argv));", mainMethod.EnclosingClass.EnclosingModuleDefinition.GetCompileName(Options), clName(mainMethod.EnclosingClass), mainMethod.Name)); var catchWr = w.NewBlock("catch (DafnyHaltException & e)"); catchWr.WriteLine("std::cout << \"Program halted: \" << e.what() << std::endl;"); } @@ -226,9 +226,18 @@ private string InstantiateTemplate(List typeArgs) { protected override string GetHelperModuleName() => "_dafny"; - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string/*?*/ fullPrintName, List/*?*/ typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { + private string clName(TopLevelDecl cl) { + var className = IdName(cl); + if (cl is ClassDecl || cl is DefaultClassDecl) { + return className; + } + return "class_" + className; + } + + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string/*?*/ fullPrintName, List/*?*/ typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { + var className = clName(cls); if (isExtern) { - throw new UnsupportedFeatureException(tok, Feature.ExternalClasses, String.Format("extern in class {0}", name)); + throw new UnsupportedFeatureException(tok, Feature.ExternalClasses, String.Format("extern in class {0}", className)); } if (superClasses != null && superClasses.Any(trait => !trait.IsObject)) { throw new UnsupportedFeatureException(tok, Feature.Traits); @@ -242,17 +251,17 @@ protected override IClassWriter CreateClass(string moduleName, string name, bool classDefWriter.WriteLine(DeclareTemplate(typeParameters)); } - var methodDeclWriter = classDefWriter.NewBlock(string.Format("class {0}", name), ";"); + var methodDeclWriter = classDefWriter.NewBlock(string.Format("class {0}", className), ";"); var methodDefWriter = wr; - classDeclWriter.WriteLine("class {0};", name); + classDeclWriter.WriteLine("class {0};", className); methodDeclWriter.Write("public:\n"); methodDeclWriter.WriteLine("// Default constructor"); - methodDeclWriter.WriteLine("{0}() {{}}", name); + methodDeclWriter.WriteLine("{0}() {{}}", className); // Create the code for the specialization of get_default - var fullName = moduleName + "::" + name; + var fullName = moduleName + "::" + className; var getDefaultStr = String.Format("template <{0}>\nstruct get_default > {{\n", TypeParameters(typeParameters), fullName, @@ -266,7 +275,7 @@ protected override IClassWriter CreateClass(string moduleName, string name, bool var fieldWriter = methodDeclWriter; - return new ClassWriter(name, this, methodDeclWriter, methodDefWriter, fieldWriter, wr); + return new ClassWriter(className, this, methodDeclWriter, methodDefWriter, fieldWriter, wr); } protected override bool SupportsProperties { get => false; } @@ -615,8 +624,8 @@ protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTre } else { throw new UnsupportedFeatureException(nt.Origin, Feature.NonNativeNewtypes); } - var className = "class_" + IdName(nt); - var cw = CreateClass(nt.EnclosingModuleDefinition.GetCompileName(Options), className, nt, wr) as ClassWriter; + var cw = CreateClass(nt.EnclosingModuleDefinition.GetCompileName(Options), nt, wr) as ClassWriter; + var className = clName(nt); var w = cw.MethodDeclWriter; if (nt.WitnessKind == SubsetTypeDecl.WKind.Compiled) { var witness = new ConcreteSyntaxTree(w.RelativeIndentLevel); @@ -653,8 +662,8 @@ protected override void DeclareSubsetType(SubsetTypeDecl sst, ConcreteSyntaxTree this.modDeclWr.WriteLine("{0} using {1} = {2};", templateDecl, IdName(sst), TypeName(sst.Var.Type, wr, sst.Origin)); - var className = "class_" + IdName(sst); - var cw = CreateClass(sst.EnclosingModuleDefinition.GetCompileName(Options), className, sst, wr) as ClassWriter; + var cw = CreateClass(sst.EnclosingModuleDefinition.GetCompileName(Options), sst, wr) as ClassWriter; + var className = clName(sst); var w = cw.MethodDeclWriter; if (sst.WitnessKind == SubsetTypeDecl.WKind.Compiled) { @@ -785,7 +794,7 @@ public void Finish() { } wr.Write("{0} {1}{2}::{3}", targetReturnTypeReplacement ?? "void", - m.EnclosingClass.GetCompileName(Options), + clName(m.EnclosingClass), InstantiateTemplate(m.EnclosingClass.TypeArgs), IdName(m)); @@ -1043,7 +1052,7 @@ protected override string TypeInitializationValue(Type type, ConcreteSyntaxTree } else if (cl is NewtypeDecl) { var td = (NewtypeDecl)cl; if (td.Witness != null) { - return td.EnclosingModuleDefinition.GetCompileName(Options) + "::class_" + td.GetCompileName(Options) + "::Witness"; + return td.EnclosingModuleDefinition.GetCompileName(Options) + "::" + clName(td) + "::Witness"; } else if (td.NativeType != null) { return "0"; } else { @@ -1052,7 +1061,7 @@ protected override string TypeInitializationValue(Type type, ConcreteSyntaxTree } else if (cl is SubsetTypeDecl) { var td = (SubsetTypeDecl)cl; if (td.WitnessKind == SubsetTypeDecl.WKind.Compiled) { - return td.EnclosingModuleDefinition.GetCompileName(Options) + "::class_" + td.GetCompileName(Options) + "::Witness"; + return td.EnclosingModuleDefinition.GetCompileName(Options) + "::" + clName(td) + "::Witness"; } else if (td.WitnessKind == SubsetTypeDecl.WKind.Special) { // WKind.Special is only used with -->, ->, and non-null types: Contract.Assert(ArrowType.IsPartialArrowTypeName(td.Name) || ArrowType.IsTotalArrowTypeName(td.Name) || td is NonNullTypeDecl); @@ -1762,7 +1771,7 @@ protected override ILvalue EmitMemberSelect(Action obj, Type // This used to work, but now obj comes in wanting to use TypeName on the class, which results in (std::shared_ptr<_module::MyClass>)::c; //return SuffixLvalue(obj, "::{0}", member.CompileName); return SimpleLvalue(wr => { - wr.Write("{0}::{1}::{2}", IdProtect(member.EnclosingClass.EnclosingModuleDefinition.GetCompileName(Options)), IdProtect(member.EnclosingClass.GetCompileName(Options)), IdProtect(member.GetCompileName(Options))); + wr.Write("{0}::{1}::{2}", IdProtect(member.EnclosingClass.EnclosingModuleDefinition.GetCompileName(Options)), IdProtect(clName(member.EnclosingClass)), IdProtect(member.GetCompileName(Options))); }); } else if (member is DatatypeDestructor dtor && dtor.EnclosingClass is TupleTypeDecl) { return SuffixLvalue(obj, ".get<{0}>()", dtor.Name); diff --git a/Source/DafnyCore/Backends/Dafny/DafnyCodeGenerator.cs b/Source/DafnyCore/Backends/Dafny/DafnyCodeGenerator.cs index 05b0ba6a851..ba17c4a4d15 100644 --- a/Source/DafnyCore/Backends/Dafny/DafnyCodeGenerator.cs +++ b/Source/DafnyCore/Backends/Dafny/DafnyCodeGenerator.cs @@ -193,13 +193,13 @@ protected override ConcreteSyntaxTree EmitCoercionIfNecessary(Type from, Type to } } - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string fullPrintName, + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string fullPrintName, List typeParameters, TopLevelDecl cls, List superClasses, IOrigin tok, ConcreteSyntaxTree wr) { if (currentBuilder is ClassContainer builder) { List typeParams = typeParameters.Select(tp => GenTypeArgDecl(tp)).ToList(); return new ClassWriter(this, typeParams.Count > 0, builder.Class( - name, moduleName, typeParams, superClasses.Select(t => GenType(t)).ToList(), + IdName(cls), moduleName, typeParams, superClasses.Select(t => GenType(t)).ToList(), ParseAttributes(cls.Attributes), GetDocString(cls)) ); } else { diff --git a/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs b/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs index edbeb76c7c0..953f7d43470 100644 --- a/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs +++ b/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs @@ -329,16 +329,16 @@ private void EmitImport(Import import, ConcreteSyntaxTree importWriter, Concrete private string HelperModulePrefix => ModuleName == "dafny" ? "" : $"{GetHelperModuleName()}."; - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string/*?*/ fullPrintName, + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string/*?*/ fullPrintName, List typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { var isDefaultClass = cls is DefaultClassDecl; bool isSequence = superClasses.Any(superClass => superClass is UserDefinedType udt && IsDafnySequence(udt.ResolvedClass)); - return CreateClass(cls, name, isExtern, fullPrintName, typeParameters, superClasses, tok, wr, includeRtd: !isDefaultClass, includeEquals: !isSequence, includeString: !isSequence); + return CreateClass(cls, isExtern, fullPrintName, typeParameters, superClasses, tok, wr, includeRtd: !isDefaultClass, includeEquals: !isSequence, includeString: !isSequence); } // TODO Consider splitting this into two functions; most things seem to be passing includeRtd: false, includeEquals: false and includeString: true. - private GoCodeGenerator.ClassWriter CreateClass(TopLevelDecl classContext, string name, bool isExtern, string/*?*/ fullPrintName, List/*?*/ typeParameters, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr, bool includeRtd, bool includeEquals, bool includeString) { + private GoCodeGenerator.ClassWriter CreateClass(TopLevelDecl classContext, bool isExtern, string/*?*/ fullPrintName, List/*?*/ typeParameters, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr, bool includeRtd, bool includeEquals, bool includeString) { // See docs/Compilation/ReferenceTypes.md for a description of how instance members of classes and traits are compiled into Go. // // func New_Class_(Type0 _dafny.TypeDescriptor, Type1 _dafny.TypeDescriptor) *Class { @@ -382,7 +382,7 @@ private GoCodeGenerator.ClassWriter CreateClass(TopLevelDecl classContext, strin // return "module.Class" // } // - name = Capitalize(name); + var name = Capitalize(IdName(classContext)); var w = CreateDescribedSection("class {0}", wr, name); @@ -586,7 +586,7 @@ protected override ConcreteSyntaxTree CreateIterator(IteratorDecl iter, Concrete // // break becomes: // return // }() - var cw = CreateClass(iter, IdName(iter), false, null, iter.TypeArgs, null, null, wr, includeRtd: false, includeEquals: false, includeString: true); + var cw = CreateClass(iter, false, null, iter.TypeArgs, null, null, wr, includeRtd: false, includeEquals: false, includeString: true); cw.InstanceFieldWriter.WriteLine("cont chan<- struct{}"); cw.InstanceFieldWriter.WriteLine("yielded <-chan struct{}"); @@ -1084,7 +1084,7 @@ string StructOfCtor(DatatypeCtor ctor) { } protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTree wr) { - var cw = CreateClass(nt, IdName(nt), false, null, nt.TypeArgs, + var cw = CreateClass(nt, false, null, nt.TypeArgs, nt.ParentTypeInformation.UniqueParentTraits(), null, wr, includeRtd: false, includeEquals: false, includeString: true); var w = cw.ConcreteMethodWriter; var nativeType = nt.NativeType != null ? GetNativeTypeName(nt.NativeType) : null; @@ -1130,7 +1130,7 @@ protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTre } protected override void DeclareSubsetType(SubsetTypeDecl sst, ConcreteSyntaxTree wr) { - var cw = CreateClass(sst, IdName(sst), false, null, sst.TypeArgs, null, null, wr, includeRtd: false, includeEquals: false, includeString: true); + var cw = CreateClass(sst, false, null, sst.TypeArgs, null, null, wr, includeRtd: false, includeEquals: false, includeString: true); var w = cw.ConcreteMethodWriter; if (sst.WitnessKind == SubsetTypeDecl.WKind.Compiled) { var witness = new ConcreteSyntaxTree(w.RelativeIndentLevel); diff --git a/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs b/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs index 868393dc65b..88a80e524e6 100644 --- a/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs +++ b/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs @@ -373,7 +373,7 @@ protected override void FinishModule() { } protected override void DeclareSubsetType(SubsetTypeDecl sst, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), IdName(sst), sst, wr); + var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), sst, wr); if (sst.WitnessKind == SubsetTypeDecl.WKind.Compiled) { var sw = new ConcreteSyntaxTree(cw.InstanceMemberWriter.RelativeIndentLevel); var wStmts = cw.InstanceMemberWriter.Fork(); @@ -870,8 +870,9 @@ protected override string TypeName_UDT(string fullCompileName, List typeParameters, TopLevelDecl cls, List /*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { + var name = IdName(cls); var javaName = isExtern ? FormatExternBaseClassName(name) : name; var filename = $"{ModulePath}/{javaName}.java"; var w = wr.NewFile(filename); @@ -3601,7 +3602,7 @@ protected override void EmitHalt(IOrigin tok, Expression messageExpr, ConcreteSy } protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), IdName(nt), nt, wr); + var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), nt, wr); var w = cw.StaticMemberWriter; if (nt.NativeType != null) { var nativeType = GetBoxedNativeTypeName(nt.NativeType); diff --git a/Source/DafnyCore/Backends/JavaScript/JavaScriptCodeGenerator.cs b/Source/DafnyCore/Backends/JavaScript/JavaScriptCodeGenerator.cs index 5593c745011..a75fd312f41 100644 --- a/Source/DafnyCore/Backends/JavaScript/JavaScriptCodeGenerator.cs +++ b/Source/DafnyCore/Backends/JavaScript/JavaScriptCodeGenerator.cs @@ -90,8 +90,9 @@ protected override ConcreteSyntaxTree CreateModule(ModuleDefinition module, stri protected override string GetHelperModuleName() => "_dafny"; - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string/*?*/ fullPrintName, + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string/*?*/ fullPrintName, List typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr) { + var name = IdName(cls); var w = wr.NewBlock(string.Format("$module.{0} = class {0}" + (isExtern ? " extends $module.{0}" : ""), name), ";"); w.Write("constructor ("); var sep = ""; @@ -160,7 +161,7 @@ protected override ConcreteSyntaxTree CreateIterator(IteratorDecl iter, Concrete // } // } - var cw = CreateClass(IdProtect(iter.EnclosingModuleDefinition.GetCompileName(Options)), IdName(iter), iter, wr) as JavaScriptCodeGenerator.ClassWriter; + var cw = CreateClass(IdProtect(iter.EnclosingModuleDefinition.GetCompileName(Options)), iter, wr) as JavaScriptCodeGenerator.ClassWriter; var w = cw.MethodWriter; var instanceFieldsWriter = cw.FieldWriter; // here come the fields @@ -575,7 +576,7 @@ protected override ConcreteSyntaxTree CreateIterator(IteratorDecl iter, Concrete } protected override IClassWriter DeclareNewtype(NewtypeDecl nt, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), IdName(nt), nt, wr); + var cw = (ClassWriter)CreateClass(IdProtect(nt.EnclosingModuleDefinition.GetCompileName(Options)), nt, wr); var w = cw.MethodWriter; if (nt.NativeType != null) { var wIntegerRangeBody = w.NewBlock("static *IntegerRange(lo, hi)"); @@ -638,7 +639,7 @@ void GenerateIsMethod(RedirectingTypeDecl declWithConstraints, ConcreteSyntaxTre } protected override void DeclareSubsetType(SubsetTypeDecl sst, ConcreteSyntaxTree wr) { - var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), IdName(sst), sst, wr); + var cw = (ClassWriter)CreateClass(IdProtect(sst.EnclosingModuleDefinition.GetCompileName(Options)), sst, wr); var w = cw.MethodWriter; var udt = UserDefinedType.FromTopLevelDecl(sst.Origin, sst); string d; diff --git a/Source/DafnyCore/Backends/Python/PythonCodeGenerator.cs b/Source/DafnyCore/Backends/Python/PythonCodeGenerator.cs index 7654c96ec0e..e95837a998b 100644 --- a/Source/DafnyCore/Backends/Python/PythonCodeGenerator.cs +++ b/Source/DafnyCore/Backends/Python/PythonCodeGenerator.cs @@ -231,12 +231,13 @@ private static string MangleName(string name) { return name; } - protected override IClassWriter CreateClass(string moduleName, string name, bool isExtern, string/*?*/ fullPrintName, + protected override IClassWriter CreateClass(string moduleName, bool isExtern, string/*?*/ fullPrintName, List typeParameters, TopLevelDecl cls, List superClasses, IOrigin tok, ConcreteSyntaxTree wr) { var realSuperClasses = superClasses?.Where(trait => !trait.IsObject).ToList() ?? new List(); var baseClasses = realSuperClasses.Any() ? $"({realSuperClasses.Comma(trait => TypeName(trait, wr, tok))})" : ""; + var name = IdName(cls); var methodWriter = wr.NewBlockPy(header: $"class {IdProtect(name)}{baseClasses}:"); var relevantTypeParameters = typeParameters.Where(NeedsTypeDescriptor).ToList(); @@ -276,7 +277,7 @@ protected override IClassWriter CreateTrait(string name, bool isExtern, List true; protected virtual bool TraitRepeatsInheritedDeclarations => false; protected virtual bool InstanceMethodsAllowedToCallTraitMethods => true; - protected IClassWriter CreateClass(string moduleName, string name, TopLevelDecl cls, ConcreteSyntaxTree wr) { - return CreateClass(moduleName, name, false, null, cls.TypeArgs, + protected IClassWriter CreateClass(string moduleName, TopLevelDecl cls, ConcreteSyntaxTree wr) { + return CreateClass(moduleName, false, null, cls.TypeArgs, cls, (cls as TopLevelDeclWithMembers)?.ParentTypeInformation.UniqueParentTraits(), null, wr); } /// /// "tok" can be "null" if "superClasses" is. /// - protected abstract IClassWriter CreateClass(string moduleName, string name, bool isExtern, string/*?*/ fullPrintName, + protected abstract IClassWriter CreateClass(string moduleName, bool isExtern, string/*?*/ fullPrintName, List typeParameters, TopLevelDecl cls, List/*?*/ superClasses, IOrigin tok, ConcreteSyntaxTree wr); /// @@ -1685,7 +1685,6 @@ private void EmitModule(Program program, ConcreteSyntaxTree programNode, ModuleD if (include) { var cw = CreateClass(IdProtect(d.EnclosingModuleDefinition.GetCompileName(Options)), - IdName(defaultClassDecl), classIsExtern, defaultClassDecl.FullName, defaultClassDecl.TypeArgs, defaultClassDecl, defaultClassDecl.ParentTypeInformation.UniqueParentTraits(), defaultClassDecl.Origin, wr); @@ -1700,7 +1699,7 @@ private void EmitModule(Program program, ConcreteSyntaxTree programNode, ModuleD var (classIsExtern, include) = GetIsExternAndIncluded(cl); if (include) { - var cw = CreateClass(IdProtect(d.EnclosingModuleDefinition.GetCompileName(Options)), IdName(cl), + var cw = CreateClass(IdProtect(d.EnclosingModuleDefinition.GetCompileName(Options)), classIsExtern, cl.FullName, cl.TypeArgs, cl, cl.ParentTypeInformation.UniqueParentTraits(), cl.Origin, wr); CompileClassMembers(program, cl, cw); diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.check b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.check deleted file mode 100644 index a8dfdf5ec16..00000000000 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.check +++ /dev/null @@ -1 +0,0 @@ -CHECK: Failed to compile C# source code .* \ No newline at end of file diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.expect new file mode 100644 index 00000000000..dcab703fd3b --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.cs.expect @@ -0,0 +1,3 @@ +AnyName.B +AnyName._AnyName +done diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.java.check b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.java.check deleted file mode 100644 index 6d927bd7912..00000000000 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4449.dfy.java.check +++ /dev/null @@ -1 +0,0 @@ -CHECK: error: cannot find symbol \ No newline at end of file diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy index 38f582328fa..b43e78bfeb9 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy @@ -1,6 +1,4 @@ -// NONUNIFORM: Test still fails on CS (https://github.com/dafny-lang/dafny/issues/5746) -// RUN: %run --target java "%s" > "%t" -// RUN: %diff "%s.expect" "%t" +// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" module State { @@ -17,4 +15,47 @@ module Foo { method Main() { print "Hello!\n"; } -} \ No newline at end of file +} + +module Enclosing { + + module A { + datatype A = Whatever + } + +} + +module UsingEnclosing { + + import opened Enclosing + + const bar: A.A + + method Main2() { + print "Hello!\n"; + } +} + +module A { + + trait T { + var a: X + } + + class A extends T { + var x : int + constructor() {x := 0;} + } + +} + +module UsingA { + + import opened A + + method Main3() { + var b := new A(); + + print "Hello!\n"; + } +} diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy.expect index 3b538928db8..10ddd6d257e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy.expect @@ -1,3 +1 @@ - -Dafny program verifier finished with 0 verified, 0 errors Hello! diff --git a/docs/news/fix.5746 b/docs/news/fix.5746 new file mode 100644 index 00000000000..19e1b00b370 --- /dev/null +++ b/docs/news/fix.5746 @@ -0,0 +1 @@ +Fix C# generated code when a module contains a type with the same name diff --git a/docs/news/fix.6014 b/docs/news/fix.6014 new file mode 100644 index 00000000000..614d71f3329 --- /dev/null +++ b/docs/news/fix.6014 @@ -0,0 +1 @@ +Fix Java generated code when a module contains a type with the same name From 803d79462cc42760c28d55242fe366bebefa41f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Mayer?= Date: Fri, 10 Jan 2025 19:39:00 -0600 Subject: [PATCH 05/16] Feat: Ensure Dafny chars support the Copy trait (#6033) ### What was changed? In the Dafny Runtime for Rust, implemented the Copy trait for char types so that we ensure they support the copy trait, which makes resulting code efficient. ### How has this been tested? * Tests added to the test/mod.rs of the runtime By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs | 4 ++-- .../DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs b/Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs index fc267756b73..5e7e3a67e82 100644 --- a/Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs +++ b/Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs @@ -2106,7 +2106,7 @@ impl DafnyPrint for () { } } -#[derive(Clone)] +#[derive(Clone, Copy)] pub struct DafnyCharUTF16(pub u16); pub type DafnyStringUTF16 = Sequence; @@ -2182,7 +2182,7 @@ impl Sub for DafnyCharUTF16 { } } -#[derive(Clone)] +#[derive(Clone, Copy)] pub struct DafnyChar(pub char); pub type DafnyString = Sequence; diff --git a/Source/DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs b/Source/DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs index 6f04042bd62..f3ce7796c7f 100644 --- a/Source/DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs +++ b/Source/DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs @@ -1022,6 +1022,18 @@ mod tests { assert_eq!(gtsgt._as_Datatype(), x); assert_eq!(gtsgt._as_Datatype(), x); } + + #[test] + fn test_chars_copy() { + let c = DafnyChar('a'); + let c2 = c; + let c3 = c; + assert_eq!(c3, c2); + let c = DafnyCharUTF16(213); + let c2 = c; + let c3 = c; + assert_eq!(c3, c2); + } /*impl GeneralTrait for Rc { fn _clone(&self) -> Box { Box::new(self.as_ref().clone()) From c42b70699f70fab39b5fb98c1cb9dc877ebc6c2a Mon Sep 17 00:00:00 2001 From: Jatin Arora Date: Sat, 11 Jan 2025 00:36:54 -0500 Subject: [PATCH 06/16] Regression fix can call (#6041) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PR fixes the this [git issue](https://github.com/dafny-lang/dafny/issues/6038) which describes how verification fails when repeating the method specification from trait. This completeness bug which arose because can calls were not emitted for modifies clauses of methods during their override checks. ### How has this been tested? By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- .../Verifier/BoogieGenerator.Methods.cs | 6 ++++- .../LitTest/git-issues/git-issue-6038.dfy | 22 +++++++++++++++++++ .../git-issues/git-issue-6038.dfy.expect | 2 ++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy.expect diff --git a/Source/DafnyCore/Verifier/BoogieGenerator.Methods.cs b/Source/DafnyCore/Verifier/BoogieGenerator.Methods.cs index 0177973871e..bbe45a1e715 100644 --- a/Source/DafnyCore/Verifier/BoogieGenerator.Methods.cs +++ b/Source/DafnyCore/Verifier/BoogieGenerator.Methods.cs @@ -1665,9 +1665,13 @@ private void AddMethodOverrideFrameSubsetChk(Method m, bool isModifies, BoogieSt } } - var kv = etran.TrAttributes(m.Attributes, null); + var kv = etran.TrAttributes(m.Attributes, null); var tok = m.Origin; + var canCalls = traitFrameExps.Concat(classFrameExps) + .Select(e => etran.CanCallAssumption(e.E)) + .Aggregate((Bpl.Expr)Bpl.Expr.True, BplAnd); + builder.Add(TrAssumeCmd(tok, canCalls)); var oVar = new Boogie.BoundVariable(tok, new Boogie.TypedIdent(tok, "$o", Predef.RefType)); var o = new Boogie.IdentifierExpr(tok, oVar); var fVar = new Boogie.BoundVariable(tok, new Boogie.TypedIdent(tok, "$f", Predef.FieldName(tok))); diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy new file mode 100644 index 00000000000..8a0794b9789 --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy @@ -0,0 +1,22 @@ +// RUN: %verify %s &> "%t" +// RUN: %diff "%s.expect" "%t" + +trait T { + + ghost function Modifies(): set + + method Foo() + modifies Modifies() +} + +class {:compile false} C extends T { + + const Repr: set + + ghost function Modifies(): set { + Repr + } + + method Foo() + modifies Modifies() +} diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy.expect new file mode 100644 index 00000000000..ebe2328e072 --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy.expect @@ -0,0 +1,2 @@ + +Dafny program verifier finished with 2 verified, 0 errors From b8fad2714056c489b599b66c960b5cf41cce3355 Mon Sep 17 00:00:00 2001 From: Remy Willems Date: Sat, 11 Jan 2025 10:41:20 +0100 Subject: [PATCH 07/16] Improve error message locations for function calls and call arguments (#6009) ### What was changed? Added a method for updating test expect files based on CI output. This is contained in the C# project `Scripts` #### Call arguments Errors that relate to call arguments are reported on the argument, instead of on the `(`. Example: ```dafny r := new C.Orig('h'); // error incorrect argument type for constructor // in-parameter 'x' (expected X, found char) ^ new location ^ old location ``` #### Function calls Errors that relate to function or method calls are now consistently reported on the `(`. This was already done for method calls, while for function calls the error was reported on the center of the callee expression. It's better to report on the `(`, to distinguish from errors in computing the callee, which are reported on the center of the callee expression. Example: ```dafny ghost const objs: set := getObjs() ^ new location ^ old location // Error: insufficient reads clause to invoke function ``` #### Assertions Currently, errors about assertions (assert/ensure/invariant) are reported on the center of the condition. Since this PR changes the center of expressions that call functions, the locations for 'assertion might not hold' can change as well. Example: ```dafny assert !Even(N(17)); ^^^^|^^^^^^ new origin |^^^ previous origin // Error: assertion might not hold ``` Another example: ```dafny ensures Pos(UpIList(n)) ^ new location ^ old location // Related location: this is the postcondition that could not be proved ``` ### How has this been tested? - Updated existing tests By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- Source/Dafny.sln | 6 ++ .../NameResolutionAndTypeInference.cs | 5 +- .../PreTypeResolve.ActualParameters.cs | 2 +- .../PreType/PreTypeResolve.Expressions.cs | 3 +- .../ReadPreconditionBypass1.dfy.expect | 2 +- .../at-attributes-typos.dfy.expect | 4 +- .../func-depth-fail.dfy.expect | 2 +- .../LitTest/dafny0/AsIs-Resolve.dfy.expect | 2 +- .../LitTest/dafny0/AutoReq.dfy.expect | 22 ++--- .../LitTest/dafny0/Backticks.dfy.expect | 2 +- .../LitTest/dafny0/BadFunction.dfy.expect | 2 +- .../LitTest/dafny0/BindingGuards.dfy.expect | 2 +- .../dafny0/BindingGuardsResolution.dfy.expect | 2 +- .../dafny0/BitvectorResolution.dfy.expect | 4 +- .../LitTest/dafny0/BitvectorsMore.dfy.expect | 4 +- .../dafny0/BitvectorsMore.dfy.refresh.expect | 4 +- .../BoundedPolymorphismResolution.dfy.expect | 4 +- ...dPolymorphismResolution.dfy.refresh.expect | 6 +- .../LitTest/dafny0/ByMethod.dfy.expect | 16 ++-- .../dafny0/ByMethodResolution.dfy.expect | 12 +-- .../LitTest/dafny0/CanCall.dfy.expect | 4 +- .../LitTest/dafny0/CoPrefix.dfy.expect | 4 +- .../LitTest/dafny0/CoResolution.dfy.expect | 22 ++--- .../LitTest/dafny0/Coinductive.dfy.expect | 68 +++++++------- .../dafny0/CoinductiveProofs.dfy.expect | 42 ++++----- .../dafny0/ComputationsLoop.dfy.expect | 2 +- .../dafny0/ComputationsLoop2.dfy.expect | 4 +- .../LitTest/dafny0/ComputationsNeg.dfy.expect | 4 +- .../LitTest/dafny0/Corecursion.dfy.expect | 16 ++-- .../dafny0/CustomErrorMesage.dfy.expect | 2 +- .../LitTests/LitTest/dafny0/DTypes.dfy.expect | 2 +- .../LitTest/dafny0/DecreasesTo1.dfy.expect | 2 +- .../dafny0/DefaultParameters.dfy.expect | 30 +++--- .../LitTest/dafny0/Definedness.dfy.expect | 14 +-- .../dafny0/DiscoverBoundsErrors.dfy.expect | 2 +- .../LitTest/dafny0/EqualityTypes.dfy.expect | 12 +-- .../EqualityTypesModuleExports.dfy.expect | 2 +- .../LitTest/dafny0/ExtremeReads.dfy.expect | 56 +++++------ .../LitTest/dafny0/ForallStmt.dfy.expect | 2 +- .../LitTests/LitTest/dafny0/Fuel.dfy.expect | 52 +++++----- .../dafny0/FunctionSpecifications.dfy.expect | 12 +-- .../GeneralNewtypeResolution.dfy.expect | 6 +- .../dafny0/GeneralNewtypeVerify.dfy.expect | 8 +- ...DatatypeConstructors-Resolution.dfy.expect | 2 +- .../dafny0/InductivePredicates.dfy.expect | 2 +- .../dafny0/IteratorResolution.dfy.expect | 6 +- .../LitTest/dafny0/LitTriggers.dfy.expect | 2 +- .../LitTests/LitTest/dafny0/Maps.dfy.expect | 4 +- .../LitTest/dafny0/NatTypes.dfy.expect | 2 +- .../dafny0/NewtypesResolution.dfy.expect | 2 +- .../dafny0/NoMoreAssume2Less2.dfy.expect | 2 +- .../LitTest/dafny0/OpaqueFunctions.dfy.expect | 10 +- .../dafny0/OpaqueTypeWithMembers.dfy.expect | 6 +- .../dafny0/ParameterResolution.dfy.expect | 16 ++-- .../ParameterResolution.dfy.refresh.expect | 16 ++-- .../LitTest/dafny0/PrefixTypeSubst.dfy.expect | 20 ++-- .../dafny0/QuantificationNewSyntax.dfy.expect | 2 +- .../LitTest/dafny0/RankNeg.dfy.expect | 8 +- .../LitTests/LitTest/dafny0/Reads.dfy.expect | 4 +- .../LitTest/dafny0/ReadsOnMethods.dfy.expect | 12 +-- .../dafny0/ResolutionErrors0.dfy.expect | 8 +- .../ResolutionErrors0.dfy.refresh.expect | 2 +- .../dafny0/ResolutionErrors1.dfy.expect | 2 +- .../dafny0/ResolutionErrors3.dfy.expect | 4 +- .../ResolutionErrors3.dfy.refresh.expect | 4 +- .../dafny0/ResolutionErrors5.dfy.expect | 12 +-- .../ResolutionErrors5.dfy.refresh.expect | 12 +-- .../dafny0/ResolutionErrors6.dfy.expect | 18 ++-- .../ResolutionErrors6.dfy.refresh.expect | 18 ++-- .../dafny0/ResolutionErrors7.dfy.expect | 94 +++++++++---------- .../ResolutionErrors7.dfy.refresh.expect | 94 +++++++++---------- .../LitTest/dafny0/SmallTests.dfy.expect | 4 +- .../LitTest/dafny0/SplitExpr.dfy.expect | 2 +- .../dafny0/StatementExpressions.dfy.expect | 2 +- .../LitTest/dafny0/SubsetTypes.dfy.expect | 4 +- .../LitTest/dafny0/TailCalls.dfy.expect | 30 +++--- .../LitTest/dafny0/Termination.dfy.expect | 4 +- .../dafny0/Termination.dfy.refresh.expect | 4 +- .../dafny0/TriggerInPredicate.dfy.expect | 4 +- .../dafny0/Twostate-Functions.dfy.expect | 4 +- .../dafny0/Twostate-Resolution.dfy.expect | 2 +- .../Twostate-Resolution.dfy.refresh.expect | 2 +- .../dafny0/TypeInstantiations.dfy.expect | 2 +- .../LitTest/dafny0/TypeParameters.dfy.expect | 14 +-- .../LitTest/dafny0/TypeTests.dfy.expect | 16 ++-- .../UserSpecifiedTypeParameters.dfy.expect | 8 +- ...message-per-failed-precondition.dfy.expect | 4 +- .../Snapshots2.run.legacy.dfy.expect | 8 +- .../dafny3/AbstemiousErrors.dfy.expect | 10 +- .../LitTests/LitTest/dafny4/Bug146.dfy.expect | 2 +- .../LitTests/LitTest/dafny4/Bug170.dfy.expect | 24 ++--- .../dafny4/ExpandedGuardednessNeg.dfy.expect | 8 +- .../LitTest/dafny4/Regression8.dfy.expect | 2 +- .../LitTest/dafny4/git-issue149.dfy.expect | 2 +- .../LitTest/dafny4/git-issue23.dfy.expect | 4 +- .../examples/parser_combinators.dfy.expect | 2 +- .../exceptions/TypecheckErrors.dfy.expect | 6 +- .../exports/OpaqueFunctions.dfy.expect | 2 +- .../git-issues/git-issue-1127.dfy.expect | 4 +- .../git-issues/git-issue-1637.dfy.expect | 2 +- .../git-issues/git-issue-1700.dfy.expect | 2 +- .../git-issues/git-issue-181.dfy.expect | 2 +- .../git-issues/git-issue-1958.dfy.expect | 10 +- .../git-issues/git-issue-19a.dfy.expect | 2 +- .../git-issues/git-issue-2197.dfy.expect | 2 +- .../git-issues/git-issue-2211.dfy.expect | 2 +- .../git-issues/git-issue-2211a.dfy.expect | 2 +- .../git-issues/git-issue-2299.dfy.expect | 20 ++-- .../git-issues/git-issue-2301.dfy.expect | 2 +- .../git-issues/git-issue-2506.dfy.expect | 16 ++-- .../git-issues/git-issue-2693.dfy.expect | 2 +- .../git-issues/git-issue-2829.dfy.expect | 4 +- .../git-issues/git-issue-370.dfy.expect | 4 +- .../git-issues/git-issue-3719.dfy.expect | 2 +- .../git-issues/git-issue-484.dfy.expect | 4 +- .../git-issues/git-issue-4926.dfy.expect | 68 +++++++------- .../git-issues/git-issue-4939a.dfy.expect | 8 +- .../git-issues/git-issue-551.dfy.expect | 2 +- .../git-issues/git-issue-5586.dfy.expect | 2 +- .../git-issues/git-issue-615.dfy.expect | 4 +- .../git-issues/git-issue-750.dfy.expect | 4 +- .../git-issues/git-issue-847.dfy.expect | 6 +- .../git-issues/git-issue-977.dfy.expect | 28 +++--- .../LitTests/LitTest/hofs/Classes.dfy.expect | 2 +- .../LitTests/LitTest/hofs/Frame.dfy.expect | 2 +- .../LitTests/LitTest/hofs/Naked.dfy.expect | 4 +- .../LitTest/hofs/ReadsReads.dfy.expect | 10 +- .../hofs/ReadsReadsOnMethods.dfy.expect | 10 +- .../LitTest/hofs/ResolveError.dfy.expect | 8 +- .../logger/ByProofRefactoring.dfy.expect | 2 +- .../precondition-satisfied.dfy.expect | 4 +- .../read-frame-subset.dfy.expect | 4 +- .../shift-lower-bound.dfy.expect | 2 +- .../shift-upper-bound.dfy.expect | 2 +- .../LitTest/traits/TraitOverride1.dfy.expect | 2 +- .../InductionWithoutTriggers.dfy.expect | 28 +++--- ...nductionWithoutTriggers.dfy.refresh.expect | 28 +++--- .../triggers/induction-triggers.dfy.expect | 12 +-- ...-triggers-recovers-expressivity.dfy.expect | 2 +- ...ter-precondition-related-errors.dfy.expect | 2 +- .../triggers-prevent-some-inlining.dfy.expect | 8 +- .../verification/constructorFresh.dfy.expect | 2 +- Source/Scripts/Program.cs | 13 +++ Source/Scripts/README.md | 2 + Source/Scripts/Scripts.csproj | 14 +++ Source/Scripts/UpdateTests.cs | 76 +++++++++++++++ customBoogie.patch | 2 +- docs/DafnyRef/Statements.8b.expect | 2 +- docs/DafnyRef/Topics.3.expect | 2 +- docs/DafnyRef/Types.20.expect | 2 +- 150 files changed, 797 insertions(+), 688 deletions(-) create mode 100644 Source/Scripts/Program.cs create mode 100644 Source/Scripts/README.md create mode 100644 Source/Scripts/Scripts.csproj create mode 100644 Source/Scripts/UpdateTests.cs diff --git a/Source/Dafny.sln b/Source/Dafny.sln index 23297b185ed..91dbe9dc747 100644 --- a/Source/Dafny.sln +++ b/Source/Dafny.sln @@ -43,6 +43,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DafnyDriver.Test", "DafnyDr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DafnyCore.Test", "DafnyCore.Test\DafnyCore.Test.csproj", "{33C29F26-A27B-474D-B436-83EA615B09FC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scripts", "Scripts\Scripts.csproj", "{3FAB051A-1745-497B-B4C0-D49194BB5D32}" +EndProject EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -130,6 +132,10 @@ Global {96B8ADA8-6190-49F7-8C38-CDA60DC92293}.Debug|Any CPU.Build.0 = Debug|Any CPU {96B8ADA8-6190-49F7-8C38-CDA60DC92293}.Release|Any CPU.ActiveCfg = Release|Any CPU {96B8ADA8-6190-49F7-8C38-CDA60DC92293}.Release|Any CPU.Build.0 = Release|Any CPU + {3FAB051A-1745-497B-B4C0-D49194BB5D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FAB051A-1745-497B-B4C0-D49194BB5D32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FAB051A-1745-497B-B4C0-D49194BB5D32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FAB051A-1745-497B-B4C0-D49194BB5D32}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Source/DafnyCore/Resolver/NameResolutionAndTypeInference/NameResolutionAndTypeInference.cs b/Source/DafnyCore/Resolver/NameResolutionAndTypeInference/NameResolutionAndTypeInference.cs index 86c110c7a5b..3c1116b0166 100644 --- a/Source/DafnyCore/Resolver/NameResolutionAndTypeInference/NameResolutionAndTypeInference.cs +++ b/Source/DafnyCore/Resolver/NameResolutionAndTypeInference/NameResolutionAndTypeInference.cs @@ -3327,7 +3327,7 @@ internal void ResolveActualParameters(ActualBindings bindings, List form whatKind + (context is Method ? " in-parameter" : " parameter")); AddAssignableConstraint( - callTok /* TODO should be b.Actual.Origin */, formal.Type.Subst(typeMap), b.Actual.Type, + b.Actual.Origin, formal.Type.Subst(typeMap), b.Actual.Type, $"incorrect argument type {what} (expected {{0}}, found {{1}})"); } else if (formal.DefaultValue != null) { // Note, in the following line, "substMap" is passed in, but it hasn't been fully filled in until the @@ -5916,8 +5916,7 @@ public MethodCallInformation ResolveApplySuffix(ApplySuffix e, ResolutionContext } if (callee != null) { // produce a FunctionCallExpr instead of an ApplyExpr(MemberSelectExpr) - // TODO use e.Origin instead of e.Lhs.Origin - var rr = new FunctionCallExpr(new OverrideCenter(e.Origin, e.Lhs.Origin.Center), mse.MemberNameNode, mse.Obj, e.Origin, e.CloseParen, e.Bindings, atLabel) { + var rr = new FunctionCallExpr(e.Origin, mse.MemberNameNode, mse.Obj, e.Origin, e.CloseParen, e.Bindings, atLabel) { Function = callee, TypeApplication_AtEnclosingClass = mse.TypeApplicationAtEnclosingClass, TypeApplication_JustFunction = mse.TypeApplicationJustMember diff --git a/Source/DafnyCore/Resolver/PreType/PreTypeResolve.ActualParameters.cs b/Source/DafnyCore/Resolver/PreType/PreTypeResolve.ActualParameters.cs index da9ae36a685..c1798e15a7b 100644 --- a/Source/DafnyCore/Resolver/PreType/PreTypeResolve.ActualParameters.cs +++ b/Source/DafnyCore/Resolver/PreType/PreTypeResolve.ActualParameters.cs @@ -127,7 +127,7 @@ internal void ResolveActualParameters(ActualBindings bindings, List form whatKind + (context is Method ? " in-parameter" : " parameter")); Constraints.AddSubtypeConstraint( - formal.PreType.Substitute(typeMap), b.Actual.PreType, callTok /* TODO should be b.Actual.Origin */, + formal.PreType.Substitute(typeMap), b.Actual.PreType, b.Actual.Origin, $"incorrect argument type {what} (expected {{0}}, found {{1}})"); } else if (formal.DefaultValue != null) { // Note, in the following line, "substMap" is passed in, but it hasn't been fully filled in until the diff --git a/Source/DafnyCore/Resolver/PreType/PreTypeResolve.Expressions.cs b/Source/DafnyCore/Resolver/PreType/PreTypeResolve.Expressions.cs index 70d9a9eb2cb..736e1896055 100644 --- a/Source/DafnyCore/Resolver/PreType/PreTypeResolve.Expressions.cs +++ b/Source/DafnyCore/Resolver/PreType/PreTypeResolve.Expressions.cs @@ -1756,8 +1756,7 @@ public MethodCallInformation ResolveApplySuffix(ApplySuffix e, ResolutionContext } if (callee != null) { // resolve as a FunctionCallExpr instead of as an ApplyExpr(MemberSelectExpr) - // TODO use e.Origin instead of e.Lhs.Origin - var rr = new FunctionCallExpr(e.Lhs.Origin, mse.MemberNameNode, mse.Obj, e.Origin, e.CloseParen, e.Bindings, atLabel) { + var rr = new FunctionCallExpr(e.Origin, mse.MemberNameNode, mse.Obj, e.Origin, e.CloseParen, e.Bindings, atLabel) { Function = callee, PreTypeApplication_AtEnclosingClass = mse.PreTypeApplicationAtEnclosingClass, PreTypeApplication_JustFunction = mse.PreTypeApplicationJustMember diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/HigherOrderIntrinsicSpecification/ReadPreconditionBypass1.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/HigherOrderIntrinsicSpecification/ReadPreconditionBypass1.dfy.expect index 4a61ec10c3e..ce97f8cf02f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/HigherOrderIntrinsicSpecification/ReadPreconditionBypass1.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/HigherOrderIntrinsicSpecification/ReadPreconditionBypass1.dfy.expect @@ -1,3 +1,3 @@ -ReadPreconditionBypass1.dfy(23,20): Error: function precondition could not be proved +ReadPreconditionBypass1.dfy(23,25): Error: function precondition could not be proved Dafny program verifier finished with 1 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/at-attributes/at-attributes-typos.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/at-attributes/at-attributes-typos.dfy.expect index dffa11472d5..59735cf6892 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/at-attributes/at-attributes-typos.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/at-attributes/at-attributes-typos.dfy.expect @@ -17,7 +17,7 @@ at-attributes-typos.dfy(5,0): Error: @AutoContracts attribute cannot be applied at-attributes-typos.dfy(58,9): Error: the parameter named 'low' is already given positionally at-attributes-typos.dfy(56,14): Error: Argument to attribute Compile must be a literal at-attributes-typos.dfy(55,0): Error: wrong number of arguments (got 2, but attribute 'Compile' expects at most 1: (0: bool)) -at-attributes-typos.dfy(54,0): Error: incorrect argument type for attribute parameter '0' (expected bool, found string) +at-attributes-typos.dfy(54,9): Error: incorrect argument type for attribute parameter '0' (expected bool, found string) at-attributes-typos.dfy(82,0): Error: @Transparent attribute cannot be applied to method at-attributes-typos.dfy(80,0): Error: wrong number of arguments (got 1, but attribute 'IsolateAssertions' expects 0) at-attributes-typos.dfy(49,0): Error: @Synthesize attribute cannot be applied to module definition @@ -33,7 +33,7 @@ at-attributes-typos.dfy(40,0): Error: @Verify attribute cannot be applied to mod at-attributes-typos.dfy(39,0): Error: @TimeLimitMultiplier attribute cannot be applied to module definition at-attributes-typos.dfy(38,0): Error: @TimeLimit attribute cannot be applied to module definition at-attributes-typos.dfy(37,0): Error: @ResourceLimit attribute cannot be applied to module definition -at-attributes-typos.dfy(37,0): Error: incorrect argument type for attribute parameter '0' (expected seq, found int) +at-attributes-typos.dfy(37,15): Error: incorrect argument type for attribute parameter '0' (expected seq, found int) at-attributes-typos.dfy(36,0): Error: @Priority attribute cannot be applied to module definition at-attributes-typos.dfy(35,0): Error: @Print attribute cannot be applied to module definition at-attributes-typos.dfy(34,0): Error: @VerifyOnly attribute cannot be applied to module definition diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/autoRevealDependencies/func-depth-fail.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/autoRevealDependencies/func-depth-fail.dfy.expect index 2f69d3fbc83..76bba8c2c45 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/autoRevealDependencies/func-depth-fail.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/autoRevealDependencies/func-depth-fail.dfy.expect @@ -1,4 +1,4 @@ -func-depth-fail.dfy(12,2): Error: a postcondition could not be proved on this return path +func-depth-fail.dfy(12,3): Error: a postcondition could not be proved on this return path func-depth-fail.dfy(10,10): Related location: this is the postcondition that could not be proved Dafny program verifier finished with 3 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AsIs-Resolve.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AsIs-Resolve.dfy.expect index a2a9906566e..770b8b7113f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AsIs-Resolve.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AsIs-Resolve.dfy.expect @@ -54,7 +54,7 @@ AsIs-Resolve.dfy(212,11): Error: type test for type 'int -> real' must be from a AsIs-Resolve.dfy(213,11): Error: type test for type 'int -> Odd' must be from an expression assignable to it (got 'int -> nat') (covariant type parameter 1 would require nat <: Odd) AsIs-Resolve.dfy(220,11): Error: type test for type 'int ~> real' must be from an expression assignable to it (got 'int ~> nat') (covariant type parameter 1 would require nat <: real) AsIs-Resolve.dfy(185,11): Error: type cast to reference type 'C<(int, real)>' must be from an expression assignable to it (got 'M') (non-variant type parameter would require (int, real) = (string, string)) (covariant type parameter 0 would require string <: int) -AsIs-Resolve.dfy(196,9): Error: incorrect argument type at index 0 for datatype constructor parameter (expected real, found int) +AsIs-Resolve.dfy(196,14): Error: incorrect argument type at index 0 for datatype constructor parameter (expected real, found int) AsIs-Resolve.dfy(229,15): Error: type test for type 'object' must be from an expression assignable to it (got 'T') AsIs-Resolve.dfy(230,18): Error: type test for type 'array' must be from an expression assignable to it (got 'array') (nonvariance for type parameter expects object = T) AsIs-Resolve.dfy(231,18): Error: type test for type 'array' must be from an expression assignable to it (got 'array') (nonvariance for type parameter expects int = T) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AutoReq.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AutoReq.dfy.expect index f149c64f7bb..c9c5d88bc16 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AutoReq.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/AutoReq.dfy.expect @@ -1,21 +1,21 @@ -AutoReq.dfy(13,2): Error: function precondition could not be proved +AutoReq.dfy(13,3): Error: function precondition could not be proved AutoReq.dfy(5,13): Related location: this proposition could not be proved -AutoReq.dfy(25,2): Error: function precondition could not be proved +AutoReq.dfy(25,3): Error: function precondition could not be proved AutoReq.dfy(5,13): Related location: this proposition could not be proved -AutoReq.dfy(38,11): Error: function precondition could not be proved +AutoReq.dfy(38,12): Error: function precondition could not be proved AutoReq.dfy(5,13): Related location: this proposition could not be proved -AutoReq.dfy(38,11): Error: assertion might not hold -AutoReq.dfy(31,12): Related location: this proposition could not be proved +AutoReq.dfy(38,12): Error: assertion might not hold +AutoReq.dfy(31,13): Related location: this proposition could not be proved AutoReq.dfy(7,4): Related location: this proposition could not be proved -AutoReq.dfy(40,11): Error: function precondition could not be proved +AutoReq.dfy(40,12): Error: function precondition could not be proved AutoReq.dfy(5,13): Related location: this proposition could not be proved -AutoReq.dfy(40,11): Error: assertion might not hold -AutoReq.dfy(31,26): Related location: this proposition could not be proved +AutoReq.dfy(40,12): Error: assertion might not hold +AutoReq.dfy(31,27): Related location: this proposition could not be proved AutoReq.dfy(7,4): Related location: this proposition could not be proved -AutoReq.dfy(45,11): Error: assertion might not hold -AutoReq.dfy(31,12): Related location: this proposition could not be proved +AutoReq.dfy(45,12): Error: assertion might not hold +AutoReq.dfy(31,13): Related location: this proposition could not be proved AutoReq.dfy(7,4): Related location: this proposition could not be proved -AutoReq.dfy(247,4): Error: function precondition could not be proved +AutoReq.dfy(247,6): Error: function precondition could not be proved AutoReq.dfy(239,13): Related location: this proposition could not be proved Dafny program verifier finished with 30 verified, 8 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Backticks.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Backticks.dfy.expect index a9e311a972b..a88d403b08f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Backticks.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Backticks.dfy.expect @@ -1,4 +1,4 @@ -Backticks.dfy(38,4): Error: insufficient reads clause to invoke function +Backticks.dfy(38,5): Error: insufficient reads clause to invoke function Backticks.dfy(77,7): Error: call might violate context's modifies clause Dafny program verifier finished with 12 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BadFunction.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BadFunction.dfy.expect index da64c408849..779318f5de2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BadFunction.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BadFunction.dfy.expect @@ -1,3 +1,3 @@ -BadFunction.dfy(9,2): Error: decreases clause might not decrease +BadFunction.dfy(9,3): Error: decreases clause might not decrease Dafny program verifier finished with 1 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuards.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuards.dfy.expect index 8902587fa5f..9b7274564b2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuards.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuards.dfy.expect @@ -304,7 +304,7 @@ method AltSyntax9(x: int, y: int, c: Color) datatype Color = Red | Green | Blue BindingGuards.dfy(85,10): Error: a postcondition could not be proved on this return path BindingGuards.dfy(71,12): Related location: this is the postcondition that could not be proved -BindingGuards.dfy(134,9): Error: assertion might not hold +BindingGuards.dfy(134,10): Error: assertion might not hold BindingGuards.dfy(6,8): Related location: this proposition could not be proved BindingGuards.dfy(139,2): Error: alternative cases fail to cover all possibilities BindingGuards.dfy(147,2): Error: alternative cases fail to cover all possibilities diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuardsResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuardsResolution.dfy.expect index 1891cae0e35..b15b54c7c49 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuardsResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BindingGuardsResolution.dfy.expect @@ -164,5 +164,5 @@ BindingGuardsResolution.dfy(132,8): Error: assignment to non-ghost variable is n BindingGuardsResolution.dfy(140,8): Error: assignment to non-ghost variable is not allowed in this context, because the statement is in a ghost context; e.g., it may be guarded by a specification-only expression BindingGuardsResolution.dfy(142,8): Error: assignment to non-ghost variable is not allowed in this context, because the statement is in a ghost context; e.g., it may be guarded by a specification-only expression BindingGuardsResolution.dfy(146,8): Error: assignment to non-ghost variable is not allowed in this context, because the statement is in a ghost context; e.g., it may be guarded by a specification-only expression -BindingGuardsResolution.dfy(149,37): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +BindingGuardsResolution.dfy(149,38): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) 11 resolution/type errors detected in BindingGuardsResolution.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorResolution.dfy.expect index fd0c43672d2..2866e8a95d2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorResolution.dfy.expect @@ -8,8 +8,8 @@ BitvectorResolution.dfy(38,6): Error: RHS (of type bv67) not assignable to LHS ( BitvectorResolution.dfy(39,6): Error: RHS (of type bv67) not assignable to LHS (of type int) BitvectorResolution.dfy(40,15): Error: type of right argument to << (real) must be an integer-numeric or bitvector type BitvectorResolution.dfy(41,15): Error: type of right argument to << (SmallReal) must be an integer-numeric or bitvector type -BitvectorResolution.dfy(42,25): Error: incorrect argument type for function parameter 'w' (expected nat, found real) -BitvectorResolution.dfy(43,25): Error: incorrect argument type for function parameter 'w' (expected nat, found SmallReal) +BitvectorResolution.dfy(42,26): Error: incorrect argument type for function parameter 'w' (expected nat, found real) +BitvectorResolution.dfy(43,26): Error: incorrect argument type for function parameter 'w' (expected nat, found SmallReal) BitvectorResolution.dfy(94,10): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. BitvectorResolution.dfy(95,10): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. BitvectorResolution.dfy(96,10): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.expect index 4dadf8c6b25..3564bde88c2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.expect @@ -490,7 +490,7 @@ BitvectorsMore.dfy(168,33): Error: when converting shift amount to a bit vector, BitvectorsMore.dfy(169,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 BitvectorsMore.dfy(170,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 BitvectorsMore.dfy(171,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 -BitvectorsMore.dfy(193,26): Error: rotate amount must not exceed the width of the result (5) -BitvectorsMore.dfy(194,26): Error: rotate amount must not exceed the width of the result (5) +BitvectorsMore.dfy(193,36): Error: rotate amount must not exceed the width of the result (5) +BitvectorsMore.dfy(194,37): Error: rotate amount must not exceed the width of the result (5) Dafny program verifier finished with 9 verified, 41 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.refresh.expect index cbd32a5e5c9..fd45bb23c41 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BitvectorsMore.dfy.refresh.expect @@ -550,7 +550,7 @@ BitvectorsMore.dfy(168,33): Error: when converting shift amount to a bit vector, BitvectorsMore.dfy(169,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 BitvectorsMore.dfy(170,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 BitvectorsMore.dfy(171,33): Error: when converting shift amount to a bit vector, the value to be converted might not fit in bv0 -BitvectorsMore.dfy(193,26): Error: rotate amount must not exceed the width of the result (5) -BitvectorsMore.dfy(194,26): Error: rotate amount must not exceed the width of the result (5) +BitvectorsMore.dfy(193,36): Error: rotate amount must not exceed the width of the result (5) +BitvectorsMore.dfy(194,37): Error: rotate amount must not exceed the width of the result (5) Dafny program verifier finished with 9 verified, 41 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.expect index b1e0d888a7b..76243c18260 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.expect @@ -65,7 +65,7 @@ BoundedPolymorphismResolution.dfy(216,23): Error: type parameter 'A' of type 'To BoundedPolymorphismResolution.dfy(218,24): Error: type bound for type parameter 'A' of class 'ToBeReplaced5' is different from the corresponding type bound of the corresponding type parameter of the corresponding class in the module it refines (expected 'Trait', found 'object') BoundedPolymorphismResolution.dfy(218,10): Error: type parameter ('A') passed to type 'ToBeReplaced5' must meet type bound 'object' (got 'A') BoundedPolymorphismResolution.dfy(251,12): Error: type parameter ('Y') passed to method 'MyMethod' must meet type bound 'Trait' (got 'RandomClass') -BoundedPolymorphismResolution.dfy(254,13): Error: type parameter ('Y') passed to function 'MyFunction' must meet type bound 'Trait' (got 'RandomClass') +BoundedPolymorphismResolution.dfy(254,23): Error: type parameter ('Y') passed to function 'MyFunction' must meet type bound 'Trait' (got 'RandomClass') BoundedPolymorphismResolution.dfy(257,18): Error: type parameter ('Y') passed to type 'MyClass' must meet type bound 'Trait' (got 'RandomClass') BoundedPolymorphismResolution.dfy(257,18): Error: type parameter ('Y') passed to type 'MyClass' must meet type bound 'Trait' (got 'RandomClass') BoundedPolymorphismResolution.dfy(268,15): Error: type parameter 'X' of function 'F' is declared with a different number of type bounds than in the function it overrides (expected 1, found 2) @@ -93,7 +93,7 @@ BoundedPolymorphismResolution.dfy(355,39): Error: type bound for type parameter BoundedPolymorphismResolution.dfy(378,15): Error: type parameters are not allowed to be renamed from the names given in the datatype in the module being refined (expected 'X', found 'Y') BoundedPolymorphismResolution.dfy(399,11): Error: type parameters are not allowed to be renamed from the names given in the type in the module being refined (expected 'X', found 'Z') BoundedPolymorphismResolution.dfy(401,12): Error: type parameters are not allowed to be renamed from the names given in the class in the module being refined (expected 'X', found 'Y') -BoundedPolymorphismResolution.dfy[YY](394,23): Error: incorrect argument type for constructor in-parameter 'x' (expected X, found char) +BoundedPolymorphismResolution.dfy[YY](394,28): Error: incorrect argument type for constructor in-parameter 'x' (expected X, found char) BoundedPolymorphismResolution.dfy(425,5): Error: type parameter ('G') passed to method 'M' must meet type bound 'GoodTrait' (got 'real') BoundedPolymorphismResolution.dfy(426,5): Error: type parameter ('G') passed to method 'M' must meet type bound 'GoodTrait' (got 'nat') BoundedPolymorphismResolution.dfy(440,5): Error: type parameter 2 ('T') passed to method 'P' must meet type bound 'ConstrainedReferenceTrait' (got 'ReferenceTrait') diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.refresh.expect index 43f285bca79..c349cc75f8f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/BoundedPolymorphismResolution.dfy.refresh.expect @@ -41,9 +41,9 @@ BoundedPolymorphismResolution.dfy(214,27): Error: type bound for type parameter BoundedPolymorphismResolution.dfy(216,23): Error: type parameter 'A' of type 'ToBeReplaced3' is declared with a different number of type bounds than in the corresponding type in the module it refines (expected 1, found 0) BoundedPolymorphismResolution.dfy(218,24): Error: type bound for type parameter 'A' of class 'ToBeReplaced5' is different from the corresponding type bound of the corresponding type parameter of the corresponding class in the module it refines (expected 'Trait', found 'object') BoundedPolymorphismResolution.dfy(218,10): Error: type parameter ('A') passed to type 'ToBeReplaced5' must meet type bound 'object' (got 'A') -BoundedPolymorphismResolution.dfy(251,12): Error: incorrect argument type for method in-parameter 'y0' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = real) -BoundedPolymorphismResolution.dfy(254,23): Error: incorrect argument type for function parameter 'y1' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = char) -BoundedPolymorphismResolution.dfy(257,14): Error: incorrect argument type for constructor in-parameter 'y2' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = int) +BoundedPolymorphismResolution.dfy(251,13): Error: incorrect argument type for method in-parameter 'y0' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = real) +BoundedPolymorphismResolution.dfy(254,24): Error: incorrect argument type for function parameter 'y1' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = char) +BoundedPolymorphismResolution.dfy(257,26): Error: incorrect argument type for constructor in-parameter 'y2' (expected RandomClass?, found RandomClass?) (non-variant type parameter 'R' would require string = int) BoundedPolymorphismResolution.dfy(268,15): Error: type parameter 'X' of function 'F' is declared with a different number of type bounds than in the function it overrides (expected 1, found 2) BoundedPolymorphismResolution.dfy(269,13): Error: type bound for type parameter 'X' of method 'M' is different from the corresponding type bound of the corresponding type parameter of the method it overrides (expected 'object', found 'object?') BoundedPolymorphismResolution.dfy(275,15): Error: type parameters in this function override are not allowed to be renamed from the names given in the the function it overrides (expected 'X', got 'Y') diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethod.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethod.dfy.expect index 0b4010a5344..e39c155089c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethod.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethod.dfy.expect @@ -3,9 +3,9 @@ ByMethod.dfy(38,18): Error: this invariant could not be proved to be maintained ByMethod.dfy(42,4): Error: a postcondition could not be proved on this return path ByMethod.dfy(35,4): Related location: this is the postcondition that could not be proved ByMethod.dfy(50,4): Error: a postcondition could not be proved on this return path -ByMethod.dfy(48,12): Related location: this is the postcondition that could not be proved +ByMethod.dfy(48,13): Related location: this is the postcondition that could not be proved ByMethod.dfy(58,4): Error: a postcondition could not be proved on this return path -ByMethod.dfy(56,12): Related location: this is the postcondition that could not be proved +ByMethod.dfy(56,13): Related location: this is the postcondition that could not be proved ByMethod.dfy(60,4): Error: a postcondition could not be proved on this return path ByMethod.dfy(59,4): Related location: this is the postcondition that could not be proved ByMethod.dfy(66,12): Error: a postcondition could not be proved on this return path @@ -14,13 +14,13 @@ ByMethod.dfy(68,4): Error: a postcondition could not be proved on this return pa ByMethod.dfy(67,4): Related location: this is the postcondition that could not be proved ByMethod.dfy(74,12): Error: a postcondition could not be proved on this return path ByMethod.dfy(72,27): Related location: this is the postcondition that could not be proved -ByMethod.dfy(93,11): Error: decreases clause might not decrease -ByMethod.dfy(102,11): Error: decreases clause might not decrease -ByMethod.dfy(111,11): Error: decreases clause might not decrease +ByMethod.dfy(93,13): Error: decreases clause might not decrease +ByMethod.dfy(102,12): Error: decreases clause might not decrease +ByMethod.dfy(111,12): Error: decreases clause might not decrease ByMethod.dfy(126,10): Error: cannot prove termination; try supplying a decreases clause -ByMethod.dfy(132,13): Error: cannot prove termination; try supplying a decreases clause +ByMethod.dfy(132,14): Error: cannot prove termination; try supplying a decreases clause ByMethod.dfy(148,11): Error: cannot prove termination; try supplying a decreases clause -ByMethod.dfy(152,13): Error: cannot prove termination; try supplying a decreases clause -ByMethod.dfy(175,13): Error: decreases clause might not decrease +ByMethod.dfy(152,14): Error: cannot prove termination; try supplying a decreases clause +ByMethod.dfy(175,18): Error: decreases clause might not decrease Dafny program verifier finished with 15 verified, 16 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethodResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethodResolution.dfy.expect index 62bf527a53d..b0220aed8d0 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethodResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ByMethodResolution.dfy.expect @@ -1,12 +1,12 @@ ByMethodResolution.dfy(17,6): Error: number of return parameters does not match declaration (found 2, expected 1) ByMethodResolution.dfy(25,4): Error: Method return value mismatch (expected real, got bv9) ByMethodResolution.dfy(24,6): Error: RHS (of type int) not assignable to LHS (of type real) -ByMethodResolution.dfy(63,13): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ByMethodResolution.dfy(64,13): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) -ByMethodResolution.dfy(65,13): Error: a call to a twostate function is allowed only in specification contexts +ByMethodResolution.dfy(63,14): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ByMethodResolution.dfy(64,15): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +ByMethodResolution.dfy(65,15): Error: a call to a twostate function is allowed only in specification contexts ByMethodResolution.dfy(85,9): Error: ghost variables such as k are allowed only in specification contexts. k was inferred to be ghost based on its declaration or initialization. ByMethodResolution.dfy(92,14): Error: ghost variables such as a are allowed only in specification contexts. a was inferred to be ghost based on its declaration or initialization. -ByMethodResolution.dfy(106,4): Error: a recursive call from a least predicate can go only to other least predicates -ByMethodResolution.dfy(142,4): Error: a recursive call from a least predicate can go only to other least predicates -ByMethodResolution.dfy(157,4): Error: a recursive call from a least predicate can go only to other least predicates +ByMethodResolution.dfy(106,5): Error: a recursive call from a least predicate can go only to other least predicates +ByMethodResolution.dfy(142,7): Error: a recursive call from a least predicate can go only to other least predicates +ByMethodResolution.dfy(157,7): Error: a recursive call from a least predicate can go only to other least predicates 11 resolution/type errors detected in ByMethodResolution.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CanCall.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CanCall.dfy.expect index 225990a8a3f..c18c921d1d7 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CanCall.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CanCall.dfy.expect @@ -1,8 +1,8 @@ -CanCall.dfy(113,13): Error: function precondition could not be proved +CanCall.dfy(113,22): Error: function precondition could not be proved CanCall.dfy(100,13): Related location: this proposition could not be proved CanCall.dfy(127,4): Error: a postcondition could not be proved on this return path CanCall.dfy(126,14): Related location: this is the postcondition that could not be proved -CanCall.dfy(142,15): Error: function precondition could not be proved +CanCall.dfy(142,24): Error: function precondition could not be proved CanCall.dfy(131,15): Related location: this proposition could not be proved Dafny program verifier finished with 34 verified, 3 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoPrefix.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoPrefix.dfy.expect index d5f27399a5a..583894b649f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoPrefix.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoPrefix.dfy.expect @@ -1,8 +1,8 @@ CoPrefix.dfy(63,56): Error: decreases clause might not decrease CoPrefix.dfy(76,55): Error: cannot prove termination; try supplying a decreases clause CoPrefix.dfy(114,0): Error: a postcondition could not be proved on this return path -CoPrefix.dfy(113,10): Related location: this is the postcondition that could not be proved -CoPrefix.dfy(101,16): Related location: this proposition could not be proved +CoPrefix.dfy(113,13): Related location: this is the postcondition that could not be proved +CoPrefix.dfy(101,19): Related location: this proposition could not be proved CoPrefix.dfy(142,24): Error: assertion might not hold CoPrefix.dfy(117,22): Related location: this proposition could not be proved CoPrefix.dfy(151,0): Error: a postcondition could not be proved on this return path diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoResolution.dfy.expect index 0502672291d..6f6574afa7d 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoResolution.dfy.expect @@ -4,21 +4,21 @@ CoResolution.dfy(22,9): Error: unresolved identifier: _k CoResolution.dfy(41,8): Error: == can only be applied to expressions of types that support equality (got Stream<_T0>) CoResolution.dfy(52,8): Error: assignment to non-ghost variable is not allowed in this context, because the statement is in a ghost context; e.g., it may be guarded by a specification-only expression CoResolution.dfy(76,33): Error: a greatest predicate is not allowed to declare any ensures clause -CoResolution.dfy(86,27): Error: a recursive call from a greatest predicate can go only to other greatest predicates -CoResolution.dfy(90,27): Error: a recursive call from a greatest predicate can go only to other greatest predicates +CoResolution.dfy(86,28): Error: a recursive call from a greatest predicate can go only to other greatest predicates +CoResolution.dfy(90,33): Error: a recursive call from a greatest predicate can go only to other greatest predicates CoResolution.dfy(99,5): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -CoResolution.dfy(113,13): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -CoResolution.dfy(114,13): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +CoResolution.dfy(113,14): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +CoResolution.dfy(114,14): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas CoResolution.dfy(119,24): Error: a recursive call from a greatest predicate can go only to other greatest predicates CoResolution.dfy(125,28): Error: a recursive call from a greatest predicate can go only to other greatest predicates -CoResolution.dfy(133,13): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -CoResolution.dfy(134,13): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +CoResolution.dfy(133,20): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +CoResolution.dfy(134,20): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas CoResolution.dfy(139,26): Error: a recursive call from a greatest predicate can go only to other greatest predicates CoResolution.dfy(145,30): Error: a recursive call from a greatest predicate can go only to other greatest predicates -CoResolution.dfy(153,4): Error: a recursive call from a greatest predicate can go only to other greatest predicates -CoResolution.dfy(155,4): Error: a recursive call from a greatest predicate can go only to other greatest predicates -CoResolution.dfy(171,13): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -CoResolution.dfy(206,12): Error: type parameter '_T0' (inferred to be '?') in the function call to 'A' could not be determined +CoResolution.dfy(153,6): Error: a recursive call from a greatest predicate can go only to other greatest predicates +CoResolution.dfy(155,6): Error: a recursive call from a greatest predicate can go only to other greatest predicates +CoResolution.dfy(171,15): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +CoResolution.dfy(206,13): Error: type parameter '_T0' (inferred to be '?') in the function call to 'A' could not be determined CoResolution.dfy(206,13): Error: the type of this expression is underspecified -CoResolution.dfy(206,19): Error: type parameter '_T0' (inferred to be '?') in the function call to 'S' could not be determined +CoResolution.dfy(206,20): Error: type parameter '_T0' (inferred to be '?') in the function call to 'S' could not be determined 23 resolution/type errors detected in CoResolution.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Coinductive.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Coinductive.dfy.expect index 5a5f281ae11..5a82b659a4c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Coinductive.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Coinductive.dfy.expect @@ -2,40 +2,40 @@ Coinductive.dfy(13,11): Warning: because of cyclic dependencies among constructo Coinductive.dfy(16,11): Warning: because of cyclic dependencies among constructor argument types, no instances of datatype 'D' can be constructed Coinductive.dfy(38,11): Warning: because of cyclic dependencies among constructor argument types, no instances of datatype 'K' can be constructed Coinductive.dfy(64,11): Warning: because of cyclic dependencies among constructor argument types, no instances of datatype 'NotFiniteEnough_Dt' can be constructed -Coinductive.dfy(93,8): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(94,8): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(95,8): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(95,21): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(101,5): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(104,27): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(105,28): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(106,17): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(116,24): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(122,15): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(123,10): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(93,11): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(94,12): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(95,12): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(95,25): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(101,7): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(104,29): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(105,30): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(106,19): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(116,26): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(122,17): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(123,12): Error: a greatest predicate can be called recursively only in positive positions Coinductive.dfy(148,21): Error: a recursive call from a greatest predicate can go only to other greatest predicates -Coinductive.dfy(204,8): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(205,8): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(206,8): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(206,21): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(219,15): Error: a greatest predicate can be called recursively only in positive positions -Coinductive.dfy(226,16): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(238,5): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(241,28): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier -Coinductive.dfy(242,29): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier -Coinductive.dfy(243,17): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier -Coinductive.dfy(253,12): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(259,15): Error: a least predicate can be called recursively only in positive positions -Coinductive.dfy(260,10): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(204,11): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(205,12): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(206,12): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(206,25): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(219,28): Error: a greatest predicate can be called recursively only in positive positions +Coinductive.dfy(226,34): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(238,7): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(241,30): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier +Coinductive.dfy(242,31): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier +Coinductive.dfy(243,19): Error: a least predicate can be called recursively only in positive positions and cannot sit inside an unbounded universal quantifier +Coinductive.dfy(253,14): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(259,17): Error: a least predicate can be called recursively only in positive positions +Coinductive.dfy(260,12): Error: a least predicate can be called recursively only in positive positions Coinductive.dfy(280,21): Error: a recursive call from a least predicate can go only to other least predicates -Coinductive.dfy(296,4): Error: this call does not type check, because the context uses a _k parameter of type ORDINAL whereas the callee uses a _k parameter of type nat -Coinductive.dfy(299,4): Error: this call does not type check, because the context uses a _k parameter of type nat whereas the callee uses a _k parameter of type ORDINAL -Coinductive.dfy(307,13): Error: this call does not type check, because the context uses a _k parameter of type nat whereas the callee uses a _k parameter of type ORDINAL -Coinductive.dfy(313,13): Error: this call does not type check, because the context uses a _k parameter of type ORDINAL whereas the callee uses a _k parameter of type nat -Coinductive.dfy(323,5): Error: incorrect argument type at index 0 for prefix lemma in-parameter (expected nat, found ORDINAL) -Coinductive.dfy(329,5): Error: incorrect argument type at index 0 for prefix lemma in-parameter (expected ORDINAL, found int) -Coinductive.dfy(355,19): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(355,44): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(358,19): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier -Coinductive.dfy(358,46): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(296,5): Error: this call does not type check, because the context uses a _k parameter of type ORDINAL whereas the callee uses a _k parameter of type nat +Coinductive.dfy(299,5): Error: this call does not type check, because the context uses a _k parameter of type nat whereas the callee uses a _k parameter of type ORDINAL +Coinductive.dfy(307,14): Error: this call does not type check, because the context uses a _k parameter of type nat whereas the callee uses a _k parameter of type ORDINAL +Coinductive.dfy(313,14): Error: this call does not type check, because the context uses a _k parameter of type ORDINAL whereas the callee uses a _k parameter of type nat +Coinductive.dfy(320,14): Error: incorrect argument type at index 0 for prefix lemma in-parameter (expected nat, found ORDINAL) +Coinductive.dfy(326,14): Error: incorrect argument type at index 0 for prefix lemma in-parameter (expected ORDINAL, found int) +Coinductive.dfy(355,29): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(355,54): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(358,29): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier +Coinductive.dfy(358,56): Error: a greatest predicate can be called recursively only in positive positions and cannot sit inside an unbounded existential quantifier 36 resolution/type errors detected in Coinductive.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoinductiveProofs.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoinductiveProofs.dfy.expect index f789a5612c8..c1984d4f4a6 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoinductiveProofs.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CoinductiveProofs.dfy.expect @@ -1,27 +1,27 @@ -CoinductiveProofs.dfy(30,11): Error: assertion might not hold -CoinductiveProofs.dfy(15,42): Related location: this proposition could not be proved -CoinductiveProofs.dfy(13,16): Related location: this proposition could not be proved -CoinductiveProofs.dfy(44,11): Error: assertion might not hold -CoinductiveProofs.dfy(48,11): Error: assertion might not hold -CoinductiveProofs.dfy(13,16): Related location: this proposition could not be proved +CoinductiveProofs.dfy(30,18): Error: assertion might not hold +CoinductiveProofs.dfy(15,45): Related location: this proposition could not be proved +CoinductiveProofs.dfy(13,19): Related location: this proposition could not be proved +CoinductiveProofs.dfy(44,19): Error: assertion might not hold +CoinductiveProofs.dfy(48,21): Error: assertion might not hold +CoinductiveProofs.dfy(13,19): Related location: this proposition could not be proved CoinductiveProofs.dfy(78,0): Error: a postcondition could not be proved on this return path -CoinductiveProofs.dfy(77,10): Related location: this is the postcondition that could not be proved -CoinductiveProofs.dfy(73,2): Related location: this proposition could not be proved -CoinductiveProofs.dfy(94,11): Error: assertion might not hold -CoinductiveProofs.dfy(87,35): Related location: this proposition could not be proved -CoinductiveProofs.dfy(73,2): Related location: this proposition could not be proved +CoinductiveProofs.dfy(77,11): Related location: this is the postcondition that could not be proved +CoinductiveProofs.dfy(73,3): Related location: this proposition could not be proved +CoinductiveProofs.dfy(94,16): Error: assertion might not hold +CoinductiveProofs.dfy(87,36): Related location: this proposition could not be proved +CoinductiveProofs.dfy(73,3): Related location: this proposition could not be proved CoinductiveProofs.dfy(127,0): Error: a postcondition could not be proved on this return path -CoinductiveProofs.dfy(126,10): Related location: this is the postcondition that could not be proved -CoinductiveProofs.dfy(115,2): Related location: this proposition could not be proved -CoinductiveProofs.dfy(136,11): Error: assertion might not hold -CoinductiveProofs.dfy(117,35): Related location: this proposition could not be proved -CoinductiveProofs.dfy(115,2): Related location: this proposition could not be proved -CoinductiveProofs.dfy(149,11): Error: assertion might not hold -CoinductiveProofs.dfy(115,2): Related location: this proposition could not be proved -CoinductiveProofs.dfy(153,11): Error: assertion might not hold -CoinductiveProofs.dfy(115,2): Related location: this proposition could not be proved +CoinductiveProofs.dfy(126,11): Related location: this is the postcondition that could not be proved +CoinductiveProofs.dfy(115,3): Related location: this proposition could not be proved +CoinductiveProofs.dfy(136,16): Error: assertion might not hold +CoinductiveProofs.dfy(117,36): Related location: this proposition could not be proved +CoinductiveProofs.dfy(115,3): Related location: this proposition could not be proved +CoinductiveProofs.dfy(149,17): Error: assertion might not hold +CoinductiveProofs.dfy(115,3): Related location: this proposition could not be proved +CoinductiveProofs.dfy(153,19): Error: assertion might not hold +CoinductiveProofs.dfy(115,3): Related location: this proposition could not be proved CoinductiveProofs.dfy(164,0): Error: a postcondition could not be proved on this return path -CoinductiveProofs.dfy(163,10): Related location: this is the postcondition that could not be proved +CoinductiveProofs.dfy(163,11): Related location: this is the postcondition that could not be proved CoinductiveProofs.dfy(159,2): Related location: this proposition could not be proved CoinductiveProofs.dfy(203,0): Error: a postcondition could not be proved on this return path CoinductiveProofs.dfy(202,21): Related location: this is the postcondition that could not be proved diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop.dfy.expect index 4f04a7b0bee..07df1e764c2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop.dfy.expect @@ -1,4 +1,4 @@ -ComputationsLoop.dfy(7,2): Error: decreases clause might not decrease +ComputationsLoop.dfy(7,13): Error: decreases clause might not decrease ComputationsLoop.dfy(12,25): Error: assertion might not hold Dafny program verifier finished with 0 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop2.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop2.dfy.expect index 54ff9dbe7f7..1182d1fde00 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop2.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsLoop2.dfy.expect @@ -1,5 +1,5 @@ -ComputationsLoop2.dfy(6,2): Error: cannot prove termination; try supplying a decreases clause -ComputationsLoop2.dfy(11,2): Error: cannot prove termination; try supplying a decreases clause +ComputationsLoop2.dfy(6,16): Error: cannot prove termination; try supplying a decreases clause +ComputationsLoop2.dfy(11,13): Error: cannot prove termination; try supplying a decreases clause ComputationsLoop2.dfy(16,25): Error: assertion might not hold Dafny program verifier finished with 0 verified, 3 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsNeg.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsNeg.dfy.expect index 2cc6f12efab..bb75ba7257e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsNeg.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ComputationsNeg.dfy.expect @@ -1,8 +1,8 @@ -ComputationsNeg.dfy(7,2): Error: decreases clause might not decrease +ComputationsNeg.dfy(7,5): Error: decreases clause might not decrease ComputationsNeg.dfy(11,0): Error: a postcondition could not be proved on this return path ComputationsNeg.dfy(10,16): Related location: this is the postcondition that could not be proved ComputationsNeg.dfy(23,0): Error: a postcondition could not be proved on this return path -ComputationsNeg.dfy(22,10): Related location: this is the postcondition that could not be proved +ComputationsNeg.dfy(22,20): Related location: this is the postcondition that could not be proved ComputationsNeg.dfy(19,28): Related location: this proposition could not be proved ComputationsNeg.dfy(36,2): Error: assertion might not hold ComputationsNeg.dfy(45,2): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Corecursion.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Corecursion.dfy.expect index e20d2f68114..b7b9fadda97 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Corecursion.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Corecursion.dfy.expect @@ -1,10 +1,10 @@ -Corecursion.dfy(17,12): Error: cannot prove termination; try supplying a decreases clause (note that only functions without side effects can be called co-recursively) -Corecursion.dfy(23,12): Error: cannot prove termination; try supplying a decreases clause (note that only functions without any ensures clause can be called co-recursively) -Corecursion.dfy(58,4): Error: cannot prove termination; try supplying a decreases clause -Corecursion.dfy(71,15): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context) -Corecursion.dfy(93,14): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) -Corecursion.dfy(103,14): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) -Corecursion.dfy(148,12): Error: decreases clause might not decrease (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) -Corecursion.dfy(161,12): Error: decreases clause might not decrease (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) +Corecursion.dfy(17,33): Error: cannot prove termination; try supplying a decreases clause (note that only functions without side effects can be called co-recursively) +Corecursion.dfy(23,42): Error: cannot prove termination; try supplying a decreases clause (note that only functions without any ensures clause can be called co-recursively) +Corecursion.dfy(58,11): Error: cannot prove termination; try supplying a decreases clause +Corecursion.dfy(71,16): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context) +Corecursion.dfy(93,15): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) +Corecursion.dfy(103,15): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) +Corecursion.dfy(148,13): Error: decreases clause might not decrease (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) +Corecursion.dfy(161,13): Error: decreases clause might not decrease (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) Dafny program verifier finished with 14 verified, 8 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CustomErrorMesage.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CustomErrorMesage.dfy.expect index 17e15bd3b92..c33d4050316 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CustomErrorMesage.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/CustomErrorMesage.dfy.expect @@ -1,6 +1,6 @@ CustomErrorMesage.dfy(6,2): Error: m: x must be positive CustomErrorMesage.dfy(10,2): Error: f: x must be positive -CustomErrorMesage.dfy(15,2): Error: when calling foo, you must supply a positive x +CustomErrorMesage.dfy(15,5): Error: when calling foo, you must supply a positive x CustomErrorMesage.dfy(19,71): Related location: this proposition could not be proved CustomErrorMesage.dfy(22,2): Error: a postcondition could not be proved on this return path CustomErrorMesage.dfy(20,85): Related location: cannot establish that return value of foo is always negative diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DTypes.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DTypes.dfy.expect index 82fe2d6625f..0d32b44bad3 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DTypes.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DTypes.dfy.expect @@ -12,7 +12,7 @@ DTypes.dfy(121,11): Error: assertion might not hold DTypes.dfy(93,29): Related location: this proposition could not be proved DTypes.dfy(127,11): Error: assertion might not hold DTypes.dfy(93,19): Related location: this proposition could not be proved -DTypes.dfy(137,11): Error: assertion might not hold +DTypes.dfy(137,20): Error: assertion might not hold DTypes.dfy(132,4): Related location: this proposition could not be proved DTypes.dfy(93,19): Related location: this proposition could not be proved DTypes.dfy(156,4): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DecreasesTo1.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DecreasesTo1.dfy.expect index 0040f993e87..b9772de2560 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DecreasesTo1.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DecreasesTo1.dfy.expect @@ -4,7 +4,7 @@ DecreasesTo1.dfy(23,2): Error: assertion might not hold Asserted expression: x - 1 decreases to x DecreasesTo1.dfy(27,2): Error: assertion might not hold Asserted expression: (x, y - 1 decreases to x, y) -DecreasesTo1.dfy(39,34): Error: decreases clause might not decrease +DecreasesTo1.dfy(39,39): Error: decreases clause might not decrease Asserted expression: n + m decreases to n + m + 1 DecreasesTo1.dfy(49,20): Error: decreases clause might not decrease Asserted expression: old(n + m) decreases to n + m + 1 diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DefaultParameters.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DefaultParameters.dfy.expect index 080bb16f10d..edd1f6bca0e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DefaultParameters.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DefaultParameters.dfy.expect @@ -1,4 +1,4 @@ -DefaultParameters.dfy(55,23): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(55,24): Error: default-value expression is not allowed to involve recursive or mutually recursive calls DefaultParameters.dfy(63,42): Error: default value could not be proved to be allocated in the two-state function's previous state DefaultParameters.dfy(67,38): Error: default value could not be proved to be allocated in the two-state lemma's previous state DefaultParameters.dfy(92,2): Error: a postcondition could not be proved on this return path @@ -28,18 +28,18 @@ DefaultParameters.dfy(178,41): Error: value does not satisfy the subset constrai DefaultParameters.dfy(179,33): Error: value does not satisfy the subset constraints of 'nat' DefaultParameters.dfy(180,35): Error: value does not satisfy the subset constraints of 'nat' DefaultParameters.dfy(180,35): Error: value does not satisfy the subset constraints of 'nat' -DefaultParameters.dfy(181,37): Error: value does not satisfy the subset constraints of 'nat' -DefaultParameters.dfy(194,39): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(200,40): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(211,62): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(219,29): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(220,29): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(229,8): Error: decreases clause might not decrease -DefaultParameters.dfy(235,4): Error: decreases clause might not decrease -DefaultParameters.dfy(235,6): Error: decreases clause might not decrease -DefaultParameters.dfy(241,4): Error: decreases clause might not decrease +DefaultParameters.dfy(181,40): Error: value does not satisfy the subset constraints of 'nat' +DefaultParameters.dfy(194,40): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(200,42): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(211,63): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(219,30): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(220,30): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(229,9): Error: decreases clause might not decrease +DefaultParameters.dfy(235,5): Error: decreases clause might not decrease +DefaultParameters.dfy(235,7): Error: decreases clause might not decrease +DefaultParameters.dfy(241,5): Error: decreases clause might not decrease DefaultParameters.dfy(251,31): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls -DefaultParameters.dfy(258,40): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(258,42): Error: default-value expression is not allowed to involve recursive or mutually recursive calls DefaultParameters.dfy(267,41): Error: possible division by zero DefaultParameters.dfy(320,45): Error: a precondition for this call could not be proved DefaultParameters.dfy(319,15): Related location: this is the precondition that could not be proved @@ -58,10 +58,10 @@ DefaultParameters.dfy(388,34): Error: value does not satisfy the subset constrai DefaultParameters.dfy(388,34): Error: value does not satisfy the subset constraints of 'nat' DefaultParameters.dfy(390,35): Error: value does not satisfy the subset constraints of 'nat' DefaultParameters.dfy(416,28): Error: default-value expression is not allowed to involve recursive or mutually recursive calls -DefaultParameters.dfy(417,29): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(417,30): Error: default-value expression is not allowed to involve recursive or mutually recursive calls DefaultParameters.dfy(418,30): Error: cannot prove termination; try supplying a decreases clause DefaultParameters.dfy(419,21): Error: cannot prove termination; try supplying a decreases clause -DefaultParameters.dfy(438,27): Error: default-value expression is not allowed to involve recursive or mutually recursive calls +DefaultParameters.dfy(438,28): Error: default-value expression is not allowed to involve recursive or mutually recursive calls DefaultParameters.dfy(443,28): Error: default-value expression is not allowed to involve recursive or mutually recursive calls DefaultParameters.dfy(447,5): Error: cannot prove termination; try supplying a decreases clause DefaultParameters.dfy(453,32): Error: default-value expression is not allowed to involve recursive or mutually recursive calls @@ -74,7 +74,7 @@ DefaultParameters.dfy(520,38): Error: insufficient reads clause to read field; M DefaultParameters.dfy(521,40): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls DefaultParameters.dfy(524,49): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls DefaultParameters.dfy(548,38): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls -DefaultParameters.dfy(601,11): Error: assertion might not hold +DefaultParameters.dfy(601,16): Error: assertion might not hold DefaultParameters.dfy(582,18): Related location: this proposition could not be proved Dafny program verifier finished with 72 verified, 74 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Definedness.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Definedness.dfy.expect index 9a6e1e5b3d8..bd28e97ab5e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Definedness.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Definedness.dfy.expect @@ -14,32 +14,32 @@ Definedness.dfy(60,21): Related location: this is the postcondition that could n Definedness.dfy(68,2): Error: a postcondition could not be proved on this return path Definedness.dfy(67,21): Related location: this is the postcondition that could not be proved Definedness.dfy(88,6): Error: target object might be null -Definedness.dfy(89,4): Error: function precondition could not be proved +Definedness.dfy(89,5): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved Definedness.dfy(89,9): Error: assignment might update an object not in the enclosing context's modifies clause Definedness.dfy(89,9): Error: target object might be null -Definedness.dfy(90,9): Error: function precondition could not be proved +Definedness.dfy(90,10): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved Definedness.dfy(95,13): Error: possible division by zero Definedness.dfy(95,22): Error: possible division by zero Definedness.dfy(96,14): Error: possible division by zero Definedness.dfy(101,11): Error: possible division by zero Definedness.dfy(108,14): Error: possible division by zero -Definedness.dfy(117,22): Error: function precondition could not be proved +Definedness.dfy(117,23): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved -Definedness.dfy(123,16): Error: function precondition could not be proved +Definedness.dfy(123,17): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved -Definedness.dfy(133,16): Error: function precondition could not be proved +Definedness.dfy(133,17): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved Definedness.dfy(133,21): Error: this loop invariant could not be proved on entry Related message: loop invariant violation -Definedness.dfy(134,16): Error: function precondition could not be proved +Definedness.dfy(134,17): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved Definedness.dfy(143,14): Error: possible division by zero Definedness.dfy(162,14): Error: possible division by zero Definedness.dfy(175,27): Error: this loop invariant could not be proved on entry Related message: loop invariant violation -Definedness.dfy(181,16): Error: function precondition could not be proved +Definedness.dfy(181,17): Error: function precondition could not be proved Definedness.dfy(79,15): Related location: this proposition could not be proved Definedness.dfy(196,18): Error: possible division by zero Definedness.dfy(196,22): Error: this loop invariant could not be proved on entry diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DiscoverBoundsErrors.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DiscoverBoundsErrors.dfy.expect index 0db8cb742e8..658736bab52 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DiscoverBoundsErrors.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/DiscoverBoundsErrors.dfy.expect @@ -4,7 +4,7 @@ DiscoverBoundsErrors.dfy(13,7): Error: quantifiers in non-ghost contexts must be DiscoverBoundsErrors.dfy(31,2): Error: forall statements in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'i' DiscoverBoundsErrors.dfy(34,2): Error: forall statements in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'i' DiscoverBoundsErrors.dfy(52,2): Error: forall statements in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'k' -DiscoverBoundsErrors.dfy(96,44): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +DiscoverBoundsErrors.dfy(96,51): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) DiscoverBoundsErrors.dfy(104,8): Error: quantifiers in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'x' DiscoverBoundsErrors.dfy(105,8): Error: quantifiers in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'x' DiscoverBoundsErrors.dfy(106,8): Error: quantifiers in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produce or compile a bounded set of values for 'x' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypes.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypes.dfy.expect index a25a0eccfbe..2b4c8387ad8 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypes.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypes.dfy.expect @@ -10,7 +10,7 @@ EqualityTypes.dfy(109,7): Error: == can only be applied to expressions of types EqualityTypes.dfy(114,13): Error: == can only be applied to expressions of types that support equality (got D) EqualityTypes.dfy(118,16): Error: == can only be applied to expressions of types that support equality (got D) EqualityTypes.dfy(147,8): Error: set argument type must support equality (got Co) -EqualityTypes.dfy(149,13): Error: type parameter (Y) passed to function G must support equality (got Co) +EqualityTypes.dfy(149,14): Error: type parameter (Y) passed to function G must support equality (got Co) EqualityTypes.dfy(156,11): Error: set argument type must support equality (got Co) EqualityTypes.dfy(173,8): Error: set argument type must support equality (got Dt) EqualityTypes.dfy(176,8): Error: set argument type must support equality (got Left) @@ -35,7 +35,7 @@ EqualityTypes.dfy(238,24): Error: set argument type must support equality (got C EqualityTypes.dfy(239,21): Error: multiset argument type must support equality (got Co) EqualityTypes.dfy(241,8): Error: map domain type must support equality (got Co) EqualityTypes.dfy(241,14): Error: map domain type must support equality (got Co) -EqualityTypes.dfy(255,13): Error: type parameter 'T' (inferred to be '?') in the function call to 'UG' could not be determined +EqualityTypes.dfy(255,15): Error: type parameter 'T' (inferred to be '?') in the function call to 'UG' could not be determined EqualityTypes.dfy(256,4): Error: type parameter 'T' (inferred to be '?') to the method 'UP' could not be determined EqualityTypes.dfy(259,8): Error: the type of this local variable is underspecified EqualityTypes.dfy(261,4): Error: type parameter 'T' (inferred to be 'set') to the method 'Callee' could not be determined @@ -49,20 +49,20 @@ EqualityTypes.dfy(293,8): Error: map domain type must support equality (got Dt) EqualityTypes.dfy(295,8): Error: imap domain type must support equality (got Dt) EqualityTypes.dfy(303,8): Error: set argument type must support equality (got Stream) EqualityTypes.dfy(305,28): Error: set argument type must support equality (got Stream) -EqualityTypes.dfy(306,14): Error: set argument type must support equality (got Stream) +EqualityTypes.dfy(306,33): Error: set argument type must support equality (got Stream) EqualityTypes.dfy(309,13): Error: type parameter 0 (V) passed to type AClass must support equality (got Stream) EqualityTypes.dfy(312,19): Error: type parameter 0 (V) passed to type AClass must support equality (got Stream) -EqualityTypes.dfy(313,19): Error: type parameter 1 (X) passed to function H must support equality (got Stream) +EqualityTypes.dfy(313,39): Error: type parameter 1 (X) passed to function H must support equality (got Stream) EqualityTypes.dfy(315,19): Error: type parameter 0 (V) passed to type AClass must support equality (got Stream) EqualityTypes.dfy(316,19): Error: type parameter 1 (X) passed to function H must support equality (got Stream) -EqualityTypes.dfy(319,31): Error: type parameter 1 (X) passed to function H must support equality (got Stream) +EqualityTypes.dfy(319,51): Error: type parameter 1 (X) passed to function H must support equality (got Stream) EqualityTypes.dfy(321,15): Error: type parameter 0 (V) passed to type AClass must support equality (got Stream) EqualityTypes.dfy(323,4): Error: type parameter 0 (V) passed to type AClass must support equality (got Stream) EqualityTypes.dfy(326,48): Error: type parameter 1 (B) passed to method Q must support equality (got Stream) EqualityTypes.dfy(328,4): Error: set argument type must support equality (got Stream) EqualityTypes.dfy(329,45): Error: set argument type must support equality (got Stream) EqualityTypes.dfy(330,15): Error: set argument type must support equality (got Stream) -EqualityTypes.dfy(331,31): Error: set argument type must support equality (got Stream) +EqualityTypes.dfy(331,56): Error: set argument type must support equality (got Stream) EqualityTypes.dfy(334,7): Error: == can only be applied to expressions of types that support equality (got seq int>) EqualityTypes.dfy(337,14): Error: in can only be applied to expressions of sequence types that support equality (got seq int>) EqualityTypes.dfy(340,16): Error: in can only be applied to expressions of sequence types that support equality (got seq int>) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypesModuleExports.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypesModuleExports.dfy.expect index 3a65091043b..d26388e10dd 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypesModuleExports.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/EqualityTypesModuleExports.dfy.expect @@ -17,7 +17,7 @@ EqualityTypesModuleExports.dfy(135,11): Error: type parameter (A) passed to type EqualityTypesModuleExports.dfy(139,11): Error: type parameter (A) passed to type Syn5 must support equality (got Syn1 int>) EqualityTypesModuleExports.dfy(13,8): Error: set argument type must support equality (got Klm) (perhaps try declaring type parameter 'Klm' on line 11 as 'Klm(==)', which says it can only be instantiated with a type that supports equality) EqualityTypesModuleExports.dfy(13,23): Error: set argument type must support equality (got Klm) (perhaps try declaring type parameter 'Klm' on line 11 as 'Klm(==)', which says it can only be instantiated with a type that supports equality) -EqualityTypesModuleExports.dfy(32,15): Error: type parameter (X) passed to function Fib must support equality (got Y) (perhaps try declaring type parameter 'Y' on line 26 as 'Y(==)', which says it can only be instantiated with a type that supports equality) +EqualityTypesModuleExports.dfy(32,18): Error: type parameter (X) passed to function Fib must support equality (got Y) (perhaps try declaring type parameter 'Y' on line 26 as 'Y(==)', which says it can only be instantiated with a type that supports equality) EqualityTypesModuleExports.dfy(32,23): Error: set argument type must support equality (got Y) (perhaps try declaring type parameter 'Y' on line 26 as 'Y(==)', which says it can only be instantiated with a type that supports equality) EqualityTypesModuleExports.dfy(34,13): Error: set argument type must support equality (got GG) (perhaps try declaring type parameter 'GG' on line 21 as 'GG(==)', which says it can only be instantiated with a type that supports equality) EqualityTypesModuleExports.dfy(84,7): Error: type 'Syn4' declared as supporting equality, but the RHS type ((real, A)) might not (perhaps try declaring type parameter 'A' on line 84 as 'A(==)', which says it can only be instantiated with a type that supports equality) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ExtremeReads.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ExtremeReads.dfy.expect index 587974ee82f..03925a2d138 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ExtremeReads.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ExtremeReads.dfy.expect @@ -1,36 +1,36 @@ -ExtremeReads.dfy(47,11): Error: assertion might not hold -ExtremeReads.dfy(13,20): Related location: this proposition could not be proved -ExtremeReads.dfy(50,11): Error: assertion might not hold -ExtremeReads.dfy(13,20): Related location: this proposition could not be proved -ExtremeReads.dfy(69,11): Error: assertion might not hold -ExtremeReads.dfy(20,20): Related location: this proposition could not be proved -ExtremeReads.dfy(83,11): Error: assertion might not hold -ExtremeReads.dfy(26,2): Related location: this proposition could not be proved -ExtremeReads.dfy(105,11): Error: assertion might not hold -ExtremeReads.dfy(89,2): Related location: this proposition could not be proved -ExtremeReads.dfy(127,11): Error: assertion might not hold +ExtremeReads.dfy(47,12): Error: assertion might not hold +ExtremeReads.dfy(13,21): Related location: this proposition could not be proved +ExtremeReads.dfy(50,12): Error: assertion might not hold +ExtremeReads.dfy(13,21): Related location: this proposition could not be proved +ExtremeReads.dfy(69,12): Error: assertion might not hold +ExtremeReads.dfy(20,21): Related location: this proposition could not be proved +ExtremeReads.dfy(83,12): Error: assertion might not hold +ExtremeReads.dfy(26,3): Related location: this proposition could not be proved +ExtremeReads.dfy(105,12): Error: assertion might not hold +ExtremeReads.dfy(89,3): Related location: this proposition could not be proved +ExtremeReads.dfy(127,16): Error: assertion might not hold ExtremeReads.dfy(9,19): Related location: this proposition could not be proved -ExtremeReads.dfy(127,11): Error: assertion might not hold -ExtremeReads.dfy(13,20): Related location: this proposition could not be proved -ExtremeReads.dfy(130,11): Error: assertion might not hold +ExtremeReads.dfy(127,16): Error: assertion might not hold +ExtremeReads.dfy(13,21): Related location: this proposition could not be proved +ExtremeReads.dfy(130,16): Error: assertion might not hold ExtremeReads.dfy(9,19): Related location: this proposition could not be proved -ExtremeReads.dfy(130,11): Error: assertion might not hold -ExtremeReads.dfy(13,20): Related location: this proposition could not be proved -ExtremeReads.dfy(149,11): Error: assertion might not hold +ExtremeReads.dfy(130,16): Error: assertion might not hold +ExtremeReads.dfy(13,21): Related location: this proposition could not be proved +ExtremeReads.dfy(149,16): Error: assertion might not hold ExtremeReads.dfy(16,19): Related location: this proposition could not be proved -ExtremeReads.dfy(149,11): Error: assertion might not hold -ExtremeReads.dfy(20,20): Related location: this proposition could not be proved -ExtremeReads.dfy(168,11): Error: assertion might not hold +ExtremeReads.dfy(149,16): Error: assertion might not hold +ExtremeReads.dfy(20,21): Related location: this proposition could not be proved +ExtremeReads.dfy(168,16): Error: assertion might not hold ExtremeReads.dfy(23,19): Related location: this proposition could not be proved -ExtremeReads.dfy(168,11): Error: assertion might not hold -ExtremeReads.dfy(26,2): Related location: this proposition could not be proved -ExtremeReads.dfy(171,11): Error: assertion might not hold +ExtremeReads.dfy(168,16): Error: assertion might not hold +ExtremeReads.dfy(26,3): Related location: this proposition could not be proved +ExtremeReads.dfy(171,16): Error: assertion might not hold ExtremeReads.dfy(23,19): Related location: this proposition could not be proved -ExtremeReads.dfy(171,11): Error: assertion might not hold -ExtremeReads.dfy(26,2): Related location: this proposition could not be proved -ExtremeReads.dfy(181,11): Error: assertion might not hold +ExtremeReads.dfy(171,16): Error: assertion might not hold +ExtremeReads.dfy(26,3): Related location: this proposition could not be proved +ExtremeReads.dfy(181,16): Error: assertion might not hold ExtremeReads.dfy(86,16): Related location: this proposition could not be proved -ExtremeReads.dfy(181,11): Error: assertion might not hold -ExtremeReads.dfy(89,2): Related location: this proposition could not be proved +ExtremeReads.dfy(181,16): Error: assertion might not hold +ExtremeReads.dfy(89,3): Related location: this proposition could not be proved Dafny program verifier finished with 10 verified, 17 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ForallStmt.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ForallStmt.dfy.expect index 91d7e3250bb..9e75436b90c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ForallStmt.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ForallStmt.dfy.expect @@ -7,7 +7,7 @@ ForallStmt.dfy(91,4): Error: assertion might not hold ForallStmt.dfy(97,19): Error: possible violation of postcondition of forall statement ForallStmt.dfy(119,11): Error: value does not satisfy the subset constraints of 'nat' ForallStmt.dfy(182,11): Error: left-hand sides for different forall-statement bound variables might refer to the same location (and right-hand sides might not be equivalent) -ForallStmt.dfy(303,9): Error: assertion might not hold +ForallStmt.dfy(303,14): Error: assertion might not hold ForallStmt.dfy(290,32): Related location: this proposition could not be proved Dafny program verifier finished with 17 verified, 9 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.dfy.expect index 9263a740963..ef4a432d124 100755 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.dfy.expect @@ -15,46 +15,46 @@ Fuel.dfy(200,55): Error: assertion might not hold Fuel.dfy(245,22): Error: assertion might not hold Fuel.dfy(247,22): Error: assertion might not hold Fuel.dfy(280,26): Error: assertion might not hold -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved Fuel.dfy(312,43): Related location: this proposition could not be proved -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved Fuel.dfy(312,58): Related location: this proposition could not be proved -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved Fuel.dfy(313,41): Related location: this proposition could not be proved -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved Fuel.dfy(314,46): Related location: this proposition could not be proved -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved Fuel.dfy(314,72): Related location: this proposition could not be proved -Fuel.dfy(335,26): Error: function precondition could not be proved -Fuel.dfy(324,21): Related location: this proposition could not be proved -Fuel.dfy(314,93): Related location: this proposition could not be proved +Fuel.dfy(335,40): Error: function precondition could not be proved +Fuel.dfy(324,33): Related location: this proposition could not be proved +Fuel.dfy(314,105): Related location: this proposition could not be proved Fuel.dfy(335,49): Error: destructor 't' can only be applied to datatype values constructed by 'VTuple' Fuel.dfy(335,50): Error: index out of range Fuel.dfy(336,38): Error: index out of range Fuel.dfy(336,42): Error: destructor 'u' can only be applied to datatype values constructed by 'VUint64' -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved Fuel.dfy(311,43): Related location: this proposition could not be proved -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved Fuel.dfy(312,43): Related location: this proposition could not be proved -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved Fuel.dfy(312,58): Related location: this proposition could not be proved -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved Fuel.dfy(313,41): Related location: this proposition could not be proved -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved Fuel.dfy(314,72): Related location: this proposition could not be proved -Fuel.dfy(336,45): Error: function precondition could not be proved -Fuel.dfy(329,21): Related location: this proposition could not be proved -Fuel.dfy(314,93): Related location: this proposition could not be proved +Fuel.dfy(336,61): Error: function precondition could not be proved +Fuel.dfy(329,33): Related location: this proposition could not be proved +Fuel.dfy(314,105): Related location: this proposition could not be proved Fuel.dfy(336,71): Error: index out of range Fuel.dfy(407,8): Error: Fuel can only increase within a given scope. Fuel.dfy(397,22): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/FunctionSpecifications.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/FunctionSpecifications.dfy.expect index aa0c01e6261..203a0aa2d9c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/FunctionSpecifications.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/FunctionSpecifications.dfy.expect @@ -1,16 +1,16 @@ -FunctionSpecifications.dfy(35,45): Error: a postcondition could not be proved on this return path +FunctionSpecifications.dfy(35,59): Error: a postcondition could not be proved on this return path FunctionSpecifications.dfy(31,12): Related location: this is the postcondition that could not be proved -FunctionSpecifications.dfy(61,10): Error: cannot prove termination; try supplying a decreases clause +FunctionSpecifications.dfy(61,23): Error: cannot prove termination; try supplying a decreases clause FunctionSpecifications.dfy(71,4): Error: a postcondition could not be proved on this return path -FunctionSpecifications.dfy(69,21): Related location: this is the postcondition that could not be proved +FunctionSpecifications.dfy(69,40): Related location: this is the postcondition that could not be proved FunctionSpecifications.dfy(117,2): Error: assertion might not hold FunctionSpecifications.dfy(120,2): Error: assertion might not hold FunctionSpecifications.dfy(135,26): Error: assertion might not hold FunctionSpecifications.dfy(139,26): Error: assertion might not hold FunctionSpecifications.dfy(148,4): Error: a postcondition could not be proved on this return path FunctionSpecifications.dfy(146,28): Related location: this is the postcondition that could not be proved -FunctionSpecifications.dfy(155,2): Error: decreases clause might not decrease -FunctionSpecifications.dfy(162,2): Error: decreases clause might not decrease -FunctionSpecifications.dfy(167,2): Error: cannot prove termination; try supplying a decreases clause +FunctionSpecifications.dfy(155,3): Error: decreases clause might not decrease +FunctionSpecifications.dfy(162,3): Error: decreases clause might not decrease +FunctionSpecifications.dfy(167,3): Error: cannot prove termination; try supplying a decreases clause Dafny program verifier finished with 11 verified, 11 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeResolution.dfy.expect index 60ec73a31a3..da8c7fbe034 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeResolution.dfy.expect @@ -244,8 +244,8 @@ GeneralNewtypeResolution.dfy(277,6): Error: RHS (of type Big) not assignable to GeneralNewtypeResolution.dfy(282,16): Error: type of left argument to << (bv32) must agree with the result type (BV) GeneralNewtypeResolution.dfy(283,16): Error: type of left argument to >> (bv32) must agree with the result type (BV) GeneralNewtypeResolution.dfy(267,11): Error: type of right argument to - (BV) must agree with the result type (Big) -GeneralNewtypeResolution.dfy(286,36): Error: incorrect argument type for function parameter 'w' (expected nat, found int32) -GeneralNewtypeResolution.dfy(287,22): Error: incorrect argument type for function parameter 'w' (expected nat, found int32) +GeneralNewtypeResolution.dfy(286,37): Error: incorrect argument type for function parameter 'w' (expected nat, found int32) +GeneralNewtypeResolution.dfy(287,23): Error: incorrect argument type for function parameter 'w' (expected nat, found int32) GeneralNewtypeResolution.dfy(289,6): Error: RHS (of type bv32) not assignable to LHS (of type BV) GeneralNewtypeResolution.dfy(294,11): Error: arguments to <= must have a common supertype (got BV and bv32) GeneralNewtypeResolution.dfy(295,11): Error: arguments to >= must have a common supertype (got BV and bv1024) @@ -266,7 +266,7 @@ GeneralNewtypeResolution.dfy(308,6): Error: RHS (of type int32) not assignable t GeneralNewtypeResolution.dfy(399,6): Error: RHS (of type bv17) not assignable to LHS (of type BV) GeneralNewtypeResolution.dfy(403,6): Error: RHS (of type bv17) not assignable to LHS (of type BV) GeneralNewtypeResolution.dfy(422,15): Error: GhostBits is a newtype and its constraint is not compilable, hence it cannot yet be used as the type of a bound variable in set comprehension. -GeneralNewtypeResolution.dfy(411,33): Related location: The constraint is not compilable because a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +GeneralNewtypeResolution.dfy(411,47): Related location: The constraint is not compilable because a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) GeneralNewtypeResolution.dfy(434,13): Error: type conversion to a char type is allowed only from numeric and bitvector types, char, and ORDINAL (got bv5) GeneralNewtypeResolution.dfy(441,30): Error: :nativeType can only be used on a newtype based on integers or bitvectors GeneralNewtypeResolution.dfy(443,31): Error: The width of bitvector type bv325 cannot fit into native type 'uint'. Note: constraints of bitvector-based newtypes are not considered when determining native types. diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeVerify.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeVerify.dfy.expect index 09cb0bbbfbd..643fdcb9ea3 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeVerify.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeVerify.dfy.expect @@ -32,8 +32,8 @@ GeneralNewtypeVerify.dfy(330,25): Error: result of operation might violate newty GeneralNewtypeVerify.dfy(351,11): Error: shift amount must not exceed the width of the result (5) GeneralNewtypeVerify.dfy(352,11): Error: shift amount must not exceed the width of the result (5) GeneralNewtypeVerify.dfy(354,13): Error: shift amount must be non-negative -GeneralNewtypeVerify.dfy(361,13): Error: rotate amount must be non-negative -GeneralNewtypeVerify.dfy(364,11): Error: rotate amount must not exceed the width of the result (5) +GeneralNewtypeVerify.dfy(361,23): Error: rotate amount must be non-negative +GeneralNewtypeVerify.dfy(364,22): Error: rotate amount must not exceed the width of the result (5) GeneralNewtypeVerify.dfy(367,27): Error: result of operation might violate subset type constraint for 'nat' GeneralNewtypeVerify.dfy(371,35): Error: result of operation might violate newtype constraint for 'BV' GeneralNewtypeVerify.dfy(490,7): Error: cannot find witness that shows type is inhabited; try giving a hint through a 'witness' or 'ghost witness' clause, or use 'witness *' to treat as a possibly empty type @@ -41,9 +41,9 @@ GeneralNewtypeVerify.dfy(491,10): Error: cannot find witness that shows type is GeneralNewtypeVerify.dfy(496,7): Error: trying witness 0: result of operation might violate subset type constraint for 'Never' GeneralNewtypeVerify.dfy(507,10): Error: trying witness 0: result of operation might violate newtype constraint for 'Never' GeneralNewtypeVerify.dfy(518,10): Error: trying witness 0: result of operation might violate newtype constraint for 'Never' -GeneralNewtypeVerify.dfy(536,37): Error: function precondition could not be proved +GeneralNewtypeVerify.dfy(536,38): Error: function precondition could not be proved GeneralNewtypeVerify.dfy(529,15): Related location -GeneralNewtypeVerify.dfy(548,40): Error: function precondition could not be proved +GeneralNewtypeVerify.dfy(548,41): Error: function precondition could not be proved GeneralNewtypeVerify.dfy(541,15): Related location GeneralNewtypeVerify.dfy(555,10): Error: trying witness 0: result of operation might violate newtype constraint for 'A' GeneralNewtypeVerify.dfy(560,24): Error: result of operation might violate newtype constraint for 'A' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Resolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Resolution.dfy.expect index 54a81dca448..5aceb627740 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Resolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Resolution.dfy.expect @@ -6,7 +6,7 @@ GhostDatatypeConstructors-Resolution.dfy(44,12): Error: field 'y' can be used on GhostDatatypeConstructors-Resolution.dfy(45,12): Error: field 'w' can be used only in specification contexts GhostDatatypeConstructors-Resolution.dfy(46,9): Error: ghost variables such as xy are allowed only in specification contexts. xy was inferred to be ghost based on its declaration or initialization. GhostDatatypeConstructors-Resolution.dfy(101,17): Error: assignment to non-ghost variable is not allowed in this context, because the statement is in a ghost context; e.g., it may be guarded by a specification-only expression -GhostDatatypeConstructors-Resolution.dfy(218,7): Error: type parameter (T) passed to function Eq must support equality (got XY) +GhostDatatypeConstructors-Resolution.dfy(218,9): Error: type parameter (T) passed to function Eq must support equality (got XY) GhostDatatypeConstructors-Resolution.dfy(234,11): Error: ghost constructor is allowed only in specification contexts GhostDatatypeConstructors-Resolution.dfy(248,11): Error: ghost variables such as c are allowed only in specification contexts. c was inferred to be ghost based on its declaration or initialization. GhostDatatypeConstructors-Resolution.dfy(258,6): Error: ghost constructor is allowed only in specification contexts diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InductivePredicates.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InductivePredicates.dfy.expect index 556db511fb2..f446ce813f9 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InductivePredicates.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InductivePredicates.dfy.expect @@ -1,4 +1,4 @@ InductivePredicates.dfy(80,2): Error: assertion might not hold -InductivePredicates.dfy(92,10): Error: assertion might not hold +InductivePredicates.dfy(92,14): Error: assertion might not hold Dafny program verifier finished with 32 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IteratorResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IteratorResolution.dfy.expect index 985ba4bbf12..92422484fdc 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IteratorResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IteratorResolution.dfy.expect @@ -2,7 +2,7 @@ IteratorResolution.dfy(22,9): Error: LHS of assignment must denote a mutable fie IteratorResolution.dfy(24,9): Error: LHS of assignment must denote a mutable field IteratorResolution.dfy(64,9): Error: LHS of assignment must denote a mutable field IteratorResolution.dfy(69,18): Error: arguments must have comparable types (got _T0 and int) -IteratorResolution.dfy(84,16): Error: incorrect argument type for constructor in-parameter 't' (expected bool, found int) +IteratorResolution.dfy(84,36): Error: incorrect argument type for constructor in-parameter 't' (expected bool, found int) IteratorResolution.dfy(81,19): Error: RHS (of type bool) not assignable to LHS (of type int) IteratorResolution.dfy(129,11): Error: unresolved identifier: _decreases3 IteratorResolution.dfy(131,4): Error: LHS of assignment must denote a mutable field @@ -21,8 +21,8 @@ IteratorResolution.dfy(173,40): Error: type parameter 0 (A) passed to constructo IteratorResolution.dfy(174,40): Error: type parameter 1 (B) passed to constructor Init must support auto-initialization (got Six) IteratorResolution.dfy(179,24): Error: type parameter 0 (A) passed to method MyMethod must support equality (got Stream) IteratorResolution.dfy(180,22): Error: type parameter 1 (B) passed to method MyMethod must support auto-initialization (got Six) -IteratorResolution.dfy(185,13): Error: type parameter 0 (A) passed to function MyFunction must support equality (got Stream) -IteratorResolution.dfy(186,13): Error: type parameter 1 (B) passed to function MyFunction must support auto-initialization (got Six) +IteratorResolution.dfy(185,35): Error: type parameter 0 (A) passed to function MyFunction must support equality (got Stream) +IteratorResolution.dfy(186,33): Error: type parameter 1 (B) passed to function MyFunction must support auto-initialization (got Six) IteratorResolution.dfy(213,22): Error: type parameter 0 (A) passed to type MyIter must support equality (got Stream) IteratorResolution.dfy(213,22): Error: type parameter 0 (A) passed to type MyIter must support equality (got Stream) IteratorResolution.dfy(216,22): Error: type parameter 0 (A) passed to type MyIter must support equality (got Stream) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LitTriggers.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LitTriggers.dfy.expect index be0cd55b1a7..640bb8f4a52 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LitTriggers.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LitTriggers.dfy.expect @@ -1,3 +1,3 @@ -LitTriggers.dfy(56,21): Error: assertion might not hold +LitTriggers.dfy(56,27): Error: assertion might not hold Dafny program verifier finished with 5 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Maps.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Maps.dfy.expect index b389e27c125..c862122da79 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Maps.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Maps.dfy.expect @@ -5,9 +5,9 @@ Maps.dfy(220,36): Error: key expressions might be referring to the same value Maps.dfy(226,36): Error: key expressions might be referring to the same value Maps.dfy(232,37): Error: key expressions might be referring to the same value Maps.dfy(234,24): Error: key expressions might be referring to the same value -Maps.dfy(241,41): Error: function precondition could not be proved +Maps.dfy(241,42): Error: function precondition could not be proved Maps.dfy(215,13): Related location: this proposition could not be proved -Maps.dfy(243,36): Error: function precondition could not be proved +Maps.dfy(243,37): Error: function precondition could not be proved Maps.dfy(215,13): Related location: this proposition could not be proved Maps.dfy(243,37): Error: key expressions might be referring to the same value Maps.dfy(264,54): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NatTypes.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NatTypes.dfy.expect index d0cacd4888f..4dfd23d81ac 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NatTypes.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NatTypes.dfy.expect @@ -9,7 +9,7 @@ NatTypes.dfy(74,6): Error: assertion might not hold NatTypes.dfy(91,6): Error: assertion might not hold NatTypes.dfy(105,6): Error: assertion might not hold NatTypes.dfy(141,44): Error: value does not satisfy the subset constraints of 'nat' -NatTypes.dfy(164,20): Error: value does not satisfy the subset constraints of 'nat' +NatTypes.dfy(164,34): Error: value does not satisfy the subset constraints of 'nat' NatTypes.dfy(184,16): Error: value does not satisfy the subset constraints of 'nat' Dafny program verifier finished with 7 verified, 13 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NewtypesResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NewtypesResolution.dfy.expect index baea05bf75a..d23711b6192 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NewtypesResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NewtypesResolution.dfy.expect @@ -21,7 +21,7 @@ NewtypesResolution.dfy(156,9): Error: name of type (B) is used as a variable NewtypesResolution.dfy(157,11): Error: name of type (Syn) is used as a variable NewtypesResolution.dfy(162,8): Error: member 'U' does not exist in type synonym 'Y' NewtypesResolution.dfy(162,9): Error: expected method call, found expression -NewtypesResolution.dfy(188,56): Error: incorrect argument type at index 0 for datatype constructor parameter (expected int, found bool) +NewtypesResolution.dfy(188,61): Error: incorrect argument type at index 0 for datatype constructor parameter (expected int, found bool) NewtypesResolution.dfy(221,13): Error: arguments to < must have a common supertype (got Even and nat) NewtypesResolution.dfy(223,13): Error: arguments to < must have a common supertype (got Even and int) NewtypesResolution.dfy(227,13): Error: arguments to < must have a common supertype (got Even and int) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoMoreAssume2Less2.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoMoreAssume2Less2.dfy.expect index 3e6837fd074..5f8198a482b 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoMoreAssume2Less2.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoMoreAssume2Less2.dfy.expect @@ -11,7 +11,7 @@ NoMoreAssume2Less2.dfy(86,2): Error: assertion might not hold NoMoreAssume2Less2.dfy(92,18): Error: assertion might not hold NoMoreAssume2Less2.dfy(95,2): Error: assertion might not hold NoMoreAssume2Less2.dfy(104,2): Error: assertion might not hold -NoMoreAssume2Less2.dfy(110,11): Error: assertion might not hold +NoMoreAssume2Less2.dfy(110,16): Error: assertion might not hold NoMoreAssume2Less2.dfy(78,26): Related location: this proposition could not be proved NoMoreAssume2Less2.dfy(113,2): Error: assertion might not hold NoMoreAssume2Less2.dfy(119,19): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueFunctions.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueFunctions.dfy.expect index ade075e17f8..438262974a1 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueFunctions.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueFunctions.dfy.expect @@ -2,13 +2,13 @@ OpaqueFunctions.dfy(214,2): Error: assertion might not hold OpaqueFunctions.dfy(229,2): Error: assertion might not hold OpaqueFunctions.dfy(38,6): Error: assertion might not hold OpaqueFunctions.dfy(69,7): Error: a precondition for this call could not be proved -OpaqueFunctions.dfy(35,15): Related location: this is the precondition that could not be proved +OpaqueFunctions.dfy(35,20): Related location: this is the precondition that could not be proved OpaqueFunctions.dfy(75,4): Error: assertion might not hold OpaqueFunctions.dfy(77,6): Error: assertion might not hold OpaqueFunctions.dfy(80,6): Error: assertion might not hold OpaqueFunctions.dfy(96,8): Error: assertion might not hold OpaqueFunctions.dfy(98,11): Error: a precondition for this call could not be proved -OpaqueFunctions.dfy[A'](35,15): Related location: this is the precondition that could not be proved +OpaqueFunctions.dfy[A'](35,20): Related location: this is the precondition that could not be proved OpaqueFunctions.dfy(102,6): Error: assertion might not hold OpaqueFunctions.dfy(109,4): Error: assertion might not hold OpaqueFunctions.dfy(111,6): Error: assertion might not hold @@ -16,14 +16,14 @@ OpaqueFunctions.dfy(114,6): Error: assertion might not hold OpaqueFunctions.dfy(123,31): Error: assertion might not hold OpaqueFunctions.dfy(146,6): Error: assertion might not hold OpaqueFunctions.dfy(148,9): Error: a precondition for this call could not be proved -OpaqueFunctions.dfy[A'](35,15): Related location: this is the precondition that could not be proved +OpaqueFunctions.dfy[A'](35,20): Related location: this is the precondition that could not be proved OpaqueFunctions.dfy(155,4): Error: assertion might not hold OpaqueFunctions.dfy(157,6): Error: assertion might not hold OpaqueFunctions.dfy(160,6): Error: assertion might not hold OpaqueFunctions.dfy(165,31): Error: assertion might not hold OpaqueFunctions.dfy(181,4): Error: assertion might not hold -OpaqueFunctions.dfy(246,11): Error: assertion might not hold -OpaqueFunctions.dfy(261,11): Error: assertion might not hold +OpaqueFunctions.dfy(246,12): Error: assertion might not hold +OpaqueFunctions.dfy(261,12): Error: assertion might not hold OpaqueFunctions.dfy(326,6): Error: assertion might not hold OpaqueFunctions.dfy(328,6): Error: assertion might not hold OpaqueFunctions.dfy(330,6): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembers.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembers.dfy.expect index 99d122f355c..31dab81017d 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembers.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembers.dfy.expect @@ -8,10 +8,10 @@ OpaqueTypeWithMembers.dfy(90,22): Error: index out of range OpaqueTypeWithMembers.dfy(93,18): Error: index out of range OpaqueTypeWithMembers.dfy(100,8): Error: possible division by zero OpaqueTypeWithMembers.dfy(107,17): Error: possible division by zero -OpaqueTypeWithMembers.dfy(139,15): Error: function precondition could not be proved +OpaqueTypeWithMembers.dfy(139,22): Error: function precondition could not be proved OpaqueTypeWithMembers.dfy(120,13): Related location: this proposition could not be proved -OpaqueTypeWithMembers.dfy(141,16): Error: function precondition could not be proved -OpaqueTypeWithMembers.dfy(115,13): Related location: this proposition could not be proved +OpaqueTypeWithMembers.dfy(141,32): Error: function precondition could not be proved +OpaqueTypeWithMembers.dfy(115,22): Related location: this proposition could not be proved OpaqueTypeWithMembers.dfy(113,28): Related location: this proposition could not be proved Dafny program verifier finished with 17 verified, 9 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.expect index 23a85631c5d..fa181252059 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.expect @@ -31,8 +31,8 @@ ParameterResolution.dfy(74,54): Error: default-valued expressions are cyclicly d ParameterResolution.dfy(99,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(109,32): Error: ghost variables such as y are allowed only in specification contexts. y was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(79,22): Error: ghost variables such as y are allowed only in specification contexts. y was inferred to be ghost based on its declaration or initialization. -ParameterResolution.dfy(86,52): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ParameterResolution.dfy(88,58): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ParameterResolution.dfy(86,65): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ParameterResolution.dfy(88,71): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ParameterResolution.dfy(95,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(97,82): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(101,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. @@ -46,12 +46,12 @@ ParameterResolution.dfy(172,14): Error: a refining formal parameter ('x') in a r ParameterResolution.dfy(174,12): Error: a refining formal parameter ('x') in a refinement module is not allowed to give a default-value expression ParameterResolution.dfy(169,12): Error: wrong number of arguments (got 0, but function 'O' expects 1: (x: int)) ParameterResolution.dfy[RefinementB](147,12): Error: wrong number of arguments (got 0, but function 'O' expects 1: (x: int)) -ParameterResolution.dfy(193,21): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined -ParameterResolution.dfy(194,13): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined -ParameterResolution.dfy(196,29): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined -ParameterResolution.dfy(197,26): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined -ParameterResolution.dfy(197,26): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined -ParameterResolution.dfy(198,37): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(193,22): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(194,14): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(196,30): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(197,27): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(197,27): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined +ParameterResolution.dfy(198,38): Error: type parameter 'X' (inferred to be '?') in the function call to 'F' could not be determined ParameterResolution.dfy(211,23): Error: old expressions are not allowed in this context ParameterResolution.dfy(213,25): Error: old expressions are not allowed in this context ParameterResolution.dfy(216,32): Error: old expressions are not allowed in this context diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.refresh.expect index 4aaf2f3b776..e9c3c665ac6 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy.refresh.expect @@ -31,8 +31,8 @@ ParameterResolution.dfy(74,54): Error: default-valued expressions are cyclicly d ParameterResolution.dfy(99,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(109,32): Error: ghost variables such as y are allowed only in specification contexts. y was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(79,22): Error: ghost variables such as y are allowed only in specification contexts. y was inferred to be ghost based on its declaration or initialization. -ParameterResolution.dfy(86,52): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ParameterResolution.dfy(88,58): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ParameterResolution.dfy(86,65): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ParameterResolution.dfy(88,71): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ParameterResolution.dfy(95,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(97,82): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. ParameterResolution.dfy(101,89): Error: ghost variables such as x are allowed only in specification contexts. x was inferred to be ghost based on its declaration or initialization. @@ -46,12 +46,12 @@ ParameterResolution.dfy(172,14): Error: a refining formal parameter ('x') in a r ParameterResolution.dfy(174,12): Error: a refining formal parameter ('x') in a refinement module is not allowed to give a default-value expression ParameterResolution.dfy(169,12): Error: wrong number of arguments (function 'O' expects 1, got 0) ParameterResolution.dfy[RefinementB](147,12): Error: wrong number of arguments (function 'O' expects 1, got 0) -ParameterResolution.dfy(193,21): Error: type parameter 'X' (inferred to be '?0') in the function call to 'F' could not be determined -ParameterResolution.dfy(194,13): Error: type parameter 'X' (inferred to be '?1') in the function call to 'F' could not be determined -ParameterResolution.dfy(196,29): Error: type parameter 'X' (inferred to be '?3') in the function call to 'F' could not be determined -ParameterResolution.dfy(197,26): Error: type parameter 'X' (inferred to be '?4') in the function call to 'F' could not be determined -ParameterResolution.dfy(197,26): Error: type parameter 'X' (inferred to be '?4') in the function call to 'F' could not be determined -ParameterResolution.dfy(198,37): Error: type parameter 'X' (inferred to be '?27') in the function call to 'F' could not be determined +ParameterResolution.dfy(193,22): Error: type parameter 'X' (inferred to be '?0') in the function call to 'F' could not be determined +ParameterResolution.dfy(194,14): Error: type parameter 'X' (inferred to be '?1') in the function call to 'F' could not be determined +ParameterResolution.dfy(196,30): Error: type parameter 'X' (inferred to be '?3') in the function call to 'F' could not be determined +ParameterResolution.dfy(197,27): Error: type parameter 'X' (inferred to be '?4') in the function call to 'F' could not be determined +ParameterResolution.dfy(197,27): Error: type parameter 'X' (inferred to be '?4') in the function call to 'F' could not be determined +ParameterResolution.dfy(198,38): Error: type parameter 'X' (inferred to be '?27') in the function call to 'F' could not be determined ParameterResolution.dfy(211,23): Error: old expressions are not allowed in this context ParameterResolution.dfy(213,25): Error: old expressions are not allowed in this context ParameterResolution.dfy(216,32): Error: old expressions are not allowed in this context diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixTypeSubst.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixTypeSubst.dfy.expect index 88360b7fc14..f9c007a32cc 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixTypeSubst.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixTypeSubst.dfy.expect @@ -688,19 +688,19 @@ module DefaultValueExpressionSubstitution { } } PrefixTypeSubst.dfy(52,0): Error: a postcondition could not be proved on this return path -PrefixTypeSubst.dfy(51,30): Related location: this is the postcondition that could not be proved -PrefixTypeSubst.dfy(19,17): Related location: this proposition could not be proved +PrefixTypeSubst.dfy(51,40): Related location: this is the postcondition that could not be proved +PrefixTypeSubst.dfy(19,24): Related location: this proposition could not be proved PrefixTypeSubst.dfy(58,0): Error: a postcondition could not be proved on this return path -PrefixTypeSubst.dfy(57,30): Related location: this is the postcondition that could not be proved -PrefixTypeSubst.dfy(19,17): Related location: this proposition could not be proved +PrefixTypeSubst.dfy(57,40): Related location: this is the postcondition that could not be proved +PrefixTypeSubst.dfy(19,24): Related location: this proposition could not be proved PrefixTypeSubst.dfy(64,0): Error: a postcondition could not be proved on this return path -PrefixTypeSubst.dfy(63,30): Related location: this is the postcondition that could not be proved -PrefixTypeSubst.dfy(19,17): Related location: this proposition could not be proved +PrefixTypeSubst.dfy(63,40): Related location: this is the postcondition that could not be proved +PrefixTypeSubst.dfy(19,24): Related location: this proposition could not be proved PrefixTypeSubst.dfy(70,0): Error: a postcondition could not be proved on this return path -PrefixTypeSubst.dfy(69,30): Related location: this is the postcondition that could not be proved -PrefixTypeSubst.dfy(19,17): Related location: this proposition could not be proved +PrefixTypeSubst.dfy(69,40): Related location: this is the postcondition that could not be proved +PrefixTypeSubst.dfy(19,24): Related location: this proposition could not be proved PrefixTypeSubst.dfy(85,9): Error: a postcondition could not be proved on this return path -PrefixTypeSubst.dfy(81,30): Related location: this is the postcondition that could not be proved -PrefixTypeSubst.dfy(19,17): Related location: this proposition could not be proved +PrefixTypeSubst.dfy(81,40): Related location: this is the postcondition that could not be proved +PrefixTypeSubst.dfy(19,24): Related location: this proposition could not be proved Dafny program verifier finished with 12 verified, 5 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/QuantificationNewSyntax.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/QuantificationNewSyntax.dfy.expect index 12c32401b70..ad5488fa695 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/QuantificationNewSyntax.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/QuantificationNewSyntax.dfy.expect @@ -1,7 +1,7 @@ QuantificationNewSyntax.dfy(11,13): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. QuantificationNewSyntax.dfy(12,13): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. QuantificationNewSyntax.dfy(11,42): Error: possible division by zero -QuantificationNewSyntax.dfy(13,36): Error: function precondition could not be proved +QuantificationNewSyntax.dfy(13,37): Error: function precondition could not be proved QuantificationNewSyntax.dfy(19,48): Related location: this proposition could not be proved QuantificationNewSyntax.dfy(15,54): Error: result of operation might violate subset type constraint for 'nat' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/RankNeg.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/RankNeg.dfy.expect index d1d8c427d8f..0c448891373 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/RankNeg.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/RankNeg.dfy.expect @@ -1,6 +1,6 @@ -RankNeg.dfy(10,25): Error: cannot prove termination; try supplying a decreases clause -RankNeg.dfy(15,27): Error: cannot prove termination; try supplying a decreases clause -RankNeg.dfy(22,30): Error: cannot prove termination; try supplying a decreases clause -RankNeg.dfy(32,24): Error: cannot prove termination; try supplying a decreases clause +RankNeg.dfy(10,35): Error: cannot prove termination; try supplying a decreases clause +RankNeg.dfy(15,37): Error: cannot prove termination; try supplying a decreases clause +RankNeg.dfy(22,41): Error: cannot prove termination; try supplying a decreases clause +RankNeg.dfy(32,35): Error: cannot prove termination; try supplying a decreases clause Dafny program verifier finished with 1 verified, 4 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Reads.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Reads.dfy.expect index f23fdc08228..caf65274159 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Reads.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Reads.dfy.expect @@ -5,10 +5,10 @@ Reads.dfy(37,29): Error: insufficient reads clause to read field; Consider addin Reads.dfy(56,29): Error: insufficient reads clause to read field; Consider adding 'reads r' or 'reads r`r' in the enclosing function specification for resolution Reads.dfy(122,35): Error: function precondition could not be proved Reads.dfy(122,35): Error: insufficient reads clause to invoke function -Reads.dfy(125,37): Error: insufficient reads clause to invoke function +Reads.dfy(125,45): Error: insufficient reads clause to invoke function Reads.dfy(138,10): Error: insufficient reads clause to read field; Consider adding 'reads this' or 'reads this`Repr' in the enclosing predicate specification for resolution Reads.dfy(149,25): Error: insufficient reads clause to read field; Consider adding 'reads this' or 'reads this`y' in the enclosing function specification for resolution Reads.dfy(157,18): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls -Reads.dfy(159,18): Error: insufficient reads clause to invoke function +Reads.dfy(159,19): Error: insufficient reads clause to invoke function Dafny program verifier finished with 19 verified, 12 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ReadsOnMethods.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ReadsOnMethods.dfy.expect index 9a887a59af8..5fcfdebf415 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ReadsOnMethods.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ReadsOnMethods.dfy.expect @@ -10,15 +10,15 @@ ReadsOnMethods.dfy(54,29): Error: insufficient reads clause to read field; Consi ReadsOnMethods.dfy(73,29): Error: insufficient reads clause to read field; Consider adding 'reads r' or 'reads r`r' in the enclosing method specification for resolution ReadsOnMethods.dfy(147,35): Error: function precondition could not be proved ReadsOnMethods.dfy(147,35): Error: insufficient reads clause to invoke function -ReadsOnMethods.dfy(151,37): Error: insufficient reads clause to invoke function -ReadsOnMethods.dfy(162,25): Error: insufficient reads clause to invoke function -ReadsOnMethods.dfy(162,43): Error: insufficient reads clause to invoke function +ReadsOnMethods.dfy(151,45): Error: insufficient reads clause to invoke function +ReadsOnMethods.dfy(162,33): Error: insufficient reads clause to invoke function +ReadsOnMethods.dfy(162,48): Error: insufficient reads clause to invoke function ReadsOnMethods.dfy(169,10): Error: insufficient reads clause to read field; Consider adding 'reads this' or 'reads this`Repr' in the enclosing method specification for resolution ReadsOnMethods.dfy(172,19): Error: insufficient reads clause to read field; Consider adding 'reads this' or 'reads this`Repr' in the enclosing method specification for resolution ReadsOnMethods.dfy(183,25): Error: insufficient reads clause to read field; Consider adding 'reads this' or 'reads this`y' in the enclosing method specification for resolution ReadsOnMethods.dfy(245,9): Error: insufficient reads clause to read field; Consider adding 'reads b' or 'reads b`x' in the enclosing method specification for resolution ReadsOnMethods.dfy(304,33): Error: insufficient reads clause to read field; Consider adding 'reads cache' or 'reads cache`state' in the enclosing method specification for resolution -ReadsOnMethods.dfy(308,22): Error: insufficient reads clause to invoke function +ReadsOnMethods.dfy(308,25): Error: insufficient reads clause to invoke function ReadsOnMethods.dfy(313,13): Error: insufficient reads clause to call ReadsOnMethods.dfy(360,20): Error: insufficient reads clause to call ReadsOnMethods.dfy(402,23): Error: insufficient reads clause to read field; Consider adding 'reads b' or 'reads b`x' in the enclosing function specification for resolution @@ -30,8 +30,8 @@ ReadsOnMethods.dfy(469,9): Error: method might read an object not in the parent ReadsOnMethods.dfy(479,26): Error: insufficient reads clause to call ReadsOnMethods.dfy(484,24): Error: insufficient reads clause to call ReadsOnMethods.dfy(494,35): Error: insufficient reads clause to call -ReadsOnMethods.dfy(499,9): Error: insufficient reads clause to invoke function -ReadsOnMethods.dfy(505,9): Error: assertion might not hold +ReadsOnMethods.dfy(499,18): Error: insufficient reads clause to invoke function +ReadsOnMethods.dfy(505,14): Error: assertion might not hold ReadsOnMethods.dfy(516,11): Related location: this proposition could not be proved ReadsOnMethods.dfy(523,13): Error: insufficient reads clause to read field; Consider adding 'reads b' or 'reads b`x' in the enclosing method specification for resolution ReadsOnMethods.dfy(530,50): Error: insufficient reads clause to read field; Mutable fields cannot be accessed within certain scopes, such as default values, the right-hand side of constants, or co-recursive calls diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.expect index a9030966c2a..ede36cc876b 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.expect @@ -19,7 +19,7 @@ ResolutionErrors0.dfy(94,16): Error: the name 'David' denotes a datatype constru ResolutionErrors0.dfy(96,16): Error: the name 'David' denotes a datatype constructor, but does not do so uniquely; add an explicit qualification (for example, 'Abc.David') ResolutionErrors0.dfy(98,20): Error: wrong number of arguments (got 2, but datatype constructor 'David' expects 1: (x: int)) ResolutionErrors0.dfy(116,11): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. -ResolutionErrors0.dfy(117,11): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors0.dfy(117,12): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors0.dfy(121,13): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. ResolutionErrors0.dfy(122,12): Error: actual out-parameter is required to be a ghost variable ResolutionErrors0.dfy(133,25): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. @@ -37,9 +37,9 @@ ResolutionErrors0.dfy(345,27): Error: arguments must have comparable types (got ResolutionErrors0.dfy(343,18): Error: arguments must have comparable types (got int and DTD_List) ResolutionErrors0.dfy(344,18): Error: arguments must have comparable types (got DTD_List and int) ResolutionErrors0.dfy(358,17): Error: ghost variables such as b are allowed only in specification contexts. b was inferred to be ghost based on its declaration or initialization. -ResolutionErrors0.dfy(382,7): Error: incorrect argument type at index 1 for method in-parameter 'b' (expected GenericClass, found GenericClass) (non-variant type parameter would require int = bool) -ResolutionErrors0.dfy(396,13): Error: incorrect argument type at index 0 for datatype constructor parameter 'hd' (expected _T0, found int) -ResolutionErrors0.dfy(397,9): Error: incorrect argument type at index 0 for datatype constructor parameter 'hd' (expected _T0, found int) +ResolutionErrors0.dfy(382,11): Error: incorrect argument type at index 1 for method in-parameter 'b' (expected GenericClass, found GenericClass) (non-variant type parameter would require int = bool) +ResolutionErrors0.dfy(396,19): Error: incorrect argument type at index 0 for datatype constructor parameter 'hd' (expected _T0, found int) +ResolutionErrors0.dfy(397,15): Error: incorrect argument type at index 0 for datatype constructor parameter 'hd' (expected _T0, found int) ResolutionErrors0.dfy(406,8): Error: all lines in a calculation must have the same type (got int after bool) ResolutionErrors0.dfy(410,8): Error: all lines in a calculation must have the same type (got int after bool) ResolutionErrors0.dfy(413,8): Error: first argument to ==> must be of type bool (instead got int) diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.refresh.expect index a41828425eb..c7fe0d81f57 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors0.dfy.refresh.expect @@ -19,7 +19,7 @@ ResolutionErrors0.dfy(94,16): Error: the name 'David' denotes a datatype constru ResolutionErrors0.dfy(96,16): Error: the name 'David' denotes a datatype constructor, but does not do so uniquely; add an explicit qualification (for example, 'Abc.David') ResolutionErrors0.dfy(98,20): Error: wrong number of arguments (datatype constructor 'David' expects 1, got 2) ResolutionErrors0.dfy(116,11): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. -ResolutionErrors0.dfy(117,11): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors0.dfy(117,12): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors0.dfy(121,13): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. ResolutionErrors0.dfy(122,12): Error: actual out-parameter is required to be a ghost variable ResolutionErrors0.dfy(133,25): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors1.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors1.dfy.expect index 8f2753f6266..387a015543f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors1.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors1.dfy.expect @@ -5,7 +5,7 @@ ResolutionErrors1.dfy(51,30): Error: Wrong number of type arguments (0 instead o ResolutionErrors1.dfy(66,20): Error: unresolved identifier: w ResolutionErrors1.dfy(85,8): Error: the type of this local variable is underspecified ResolutionErrors1.dfy(86,25): Error: the type of this variable is underspecified -ResolutionErrors1.dfy(86,23): Error: type parameter 'T' (inferred to be '?') in the function call to 'P' could not be determined +ResolutionErrors1.dfy(86,24): Error: type parameter 'T' (inferred to be '?') in the function call to 'P' could not be determined ResolutionErrors1.dfy(86,18): Error: type of bound variable 'z' could not be determined; please specify the type explicitly ResolutionErrors1.dfy(99,13): Error: a lemma is not allowed to use 'new' ResolutionErrors1.dfy(100,9): Error: a lemma is not allowed to use 'new' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.expect index a5c7a7d045e..3637b047d63 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.expect @@ -1,6 +1,6 @@ -ResolutionErrors3.dfy(53,13): Error: type parameter 'PT' (inferred to be '?') in the function call to 'P' could not be determined +ResolutionErrors3.dfy(53,14): Error: type parameter 'PT' (inferred to be '?') in the function call to 'P' could not be determined ResolutionErrors3.dfy(54,14): Error: the type of this variable is underspecified -ResolutionErrors3.dfy(54,19): Error: type parameter 'QT' (inferred to be '?') in the function call to 'Q' could not be determined +ResolutionErrors3.dfy(54,20): Error: type parameter 'QT' (inferred to be '?') in the function call to 'Q' could not be determined ResolutionErrors3.dfy(54,20): Error: the type of this expression is underspecified ResolutionErrors3.dfy(55,4): Error: type parameter 'MT' (inferred to be '?') to the method 'M' could not be determined ResolutionErrors3.dfy(56,8): Error: the type of this variable is underspecified diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.refresh.expect index 6aff850b5dc..353a3e7b0f5 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors3.dfy.refresh.expect @@ -1,6 +1,6 @@ -ResolutionErrors3.dfy(53,13): Error: type parameter 'PT' (inferred to be '?40') in the function call to 'P' could not be determined +ResolutionErrors3.dfy(53,14): Error: type parameter 'PT' (inferred to be '?40') in the function call to 'P' could not be determined ResolutionErrors3.dfy(54,14): Error: the type of this variable is underspecified -ResolutionErrors3.dfy(54,19): Error: type parameter 'QT' (inferred to be '?42') in the function call to 'Q' could not be determined +ResolutionErrors3.dfy(54,20): Error: type parameter 'QT' (inferred to be '?42') in the function call to 'Q' could not be determined ResolutionErrors3.dfy(54,20): Error: the type of this expression is underspecified ResolutionErrors3.dfy(55,4): Error: type parameter 'MT' (inferred to be '?44') to the method 'M' could not be determined ResolutionErrors3.dfy(56,8): Error: the type of this variable is underspecified diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.expect index 1a41d63271f..9cdb2e42c5f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.expect @@ -2,9 +2,9 @@ ResolutionErrors5.dfy(50,33): Error: type of yield-parameter must support auto-i ResolutionErrors5.dfy(58,13): Error: a ghost function is allowed only in specification contexts ResolutionErrors5.dfy(72,8): Error: an ORDINAL type is not allowed to be used as a type argument ResolutionErrors5.dfy(73,8): Error: an ORDINAL type is not allowed to be used as a type argument -ResolutionErrors5.dfy(75,19): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL -ResolutionErrors5.dfy(76,9): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL -ResolutionErrors5.dfy(77,9): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(75,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL +ResolutionErrors5.dfy(76,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(77,27): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(78,18): Error: type parameter 'G' (passed in as 'ORDINAL') to the function 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(79,4): Error: type parameter 'G' (passed in as 'ORDINAL') to the method 'ParameterizedMethod' is not allowed to use ORDINAL ResolutionErrors5.dfy(83,8): Error: an ORDINAL type is not allowed to be used as a type argument @@ -68,9 +68,9 @@ ResolutionErrors5.dfy(425,32): Error: an abstemious function is allowed to invok ResolutionErrors5.dfy(430,12): Error: an abstemious function is allowed to codatatype-match only on its parameters ResolutionErrors5.dfy(437,9): Error: an abstemious function is not allowed to check codatatype equality ResolutionErrors5.dfy(439,14): Error: an abstemious function is not allowed to check codatatype equality -ResolutionErrors5.dfy(464,19): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL -ResolutionErrors5.dfy(465,13): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL -ResolutionErrors5.dfy(466,13): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(464,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL +ResolutionErrors5.dfy(465,24): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(466,31): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(467,18): Error: type parameter 'G' (passed in as 'ORDINAL') to the function 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(468,4): Error: type parameter 'G' (passed in as 'ORDINAL') to the lemma 'ParameterizedLemma' is not allowed to use ORDINAL ResolutionErrors5.dfy(469,18): Error: type of bound variable 'r' ('ORDINAL') is not allowed to use type ORDINAL diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.refresh.expect index da6eaa0c35c..9953c13159e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors5.dfy.refresh.expect @@ -2,9 +2,9 @@ ResolutionErrors5.dfy(50,33): Error: type of yield-parameter must support auto-i ResolutionErrors5.dfy(58,13): Error: a ghost function is allowed only in specification contexts ResolutionErrors5.dfy(72,8): Error: an ORDINAL type is not allowed to be used as a type argument ResolutionErrors5.dfy(73,8): Error: an ORDINAL type is not allowed to be used as a type argument -ResolutionErrors5.dfy(75,19): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL -ResolutionErrors5.dfy(76,9): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL -ResolutionErrors5.dfy(77,9): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(75,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL +ResolutionErrors5.dfy(76,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(77,27): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(78,18): Error: type parameter 'G' (passed in as 'ORDINAL') to the function 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(79,4): Error: type parameter 'G' (passed in as 'ORDINAL') to the method 'ParameterizedMethod' is not allowed to use ORDINAL ResolutionErrors5.dfy(83,8): Error: an ORDINAL type is not allowed to be used as a type argument @@ -69,9 +69,9 @@ ResolutionErrors5.dfy(425,32): Error: an abstemious function is allowed to invok ResolutionErrors5.dfy(430,12): Error: an abstemious function is allowed to codatatype-match only on its parameters ResolutionErrors5.dfy(437,9): Error: an abstemious function is not allowed to check codatatype equality ResolutionErrors5.dfy(439,14): Error: an abstemious function is not allowed to check codatatype equality -ResolutionErrors5.dfy(464,19): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL -ResolutionErrors5.dfy(465,13): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL -ResolutionErrors5.dfy(466,13): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(464,20): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F' is not allowed to use ORDINAL +ResolutionErrors5.dfy(465,24): Error: type parameter 'G' (passed in as 'ORDINAL') to function call 'F'' is not allowed to use ORDINAL +ResolutionErrors5.dfy(466,31): Error: type parameter 'G' (passed in as '(char, ORDINAL)') to function call 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(467,18): Error: type parameter 'G' (passed in as 'ORDINAL') to the function 'F'' is not allowed to use ORDINAL ResolutionErrors5.dfy(472,17): Error: type of bound variable 'r' ('ORDINAL') is not allowed to use type ORDINAL ResolutionErrors5.dfy(473,18): Error: type of bound variable 'r' ('ORDINAL') is not allowed to use type ORDINAL diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.expect index 99b6f7f5ab0..5bfa32af752 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.expect @@ -4,14 +4,14 @@ ResolutionErrors6.dfy(71,11): Error: name of type (Cache) is used as a variable ResolutionErrors6.dfy(71,17): Error: incorrect type for selection into ? (got X) ResolutionErrors6.dfy(79,13): Warning: the quantifier has the form 'exists x :: A ==> B', which most often is a typo for 'exists x :: A && B'; if you think otherwise, rewrite as 'exists x :: (A ==> B)' or 'exists x :: !A || B' to suppress this warning ResolutionErrors6.dfy(89,13): Warning: the quantifier has the form 'exists x :: A ==> B', which most often is a typo for 'exists x :: A && B'; if you think otherwise, rewrite as 'exists x :: (A ==> B)' or 'exists x :: !A || B' to suppress this warning -ResolutionErrors6.dfy(123,13): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(124,13): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(123,14): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(124,14): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors6.dfy(126,11): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. ResolutionErrors6.dfy(147,4): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. -ResolutionErrors6.dfy(157,15): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(158,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(164,15): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(165,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(157,16): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(158,23): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(164,16): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(165,23): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors6.dfy(182,23): Error: type of left argument to * (int) must agree with the result type (bool) ResolutionErrors6.dfy(182,23): Error: type of * must be of a numeric type, bitvector type, or a set-like type (instead got bool) ResolutionErrors6.dfy(181,13): Error: not resolving module 'V' because there were errors in resolving its nested module 'W' @@ -45,7 +45,7 @@ ResolutionErrors6.dfy(343,18): Error: map update requires the value to have the ResolutionErrors6.dfy(368,5): Error: type parameter (F) passed to method Q must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 363 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) ResolutionErrors6.dfy(371,5): Error: type parameter (F) passed to method Q must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 363 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) ResolutionErrors6.dfy(372,5): Error: type parameter (G) passed to method P must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 363 as 'Z(00)', which says it can only be instantiated with a nonempty type) -ResolutionErrors6.dfy(381,9): Error: type parameter (F) passed to function FQ must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 376 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors6.dfy(384,9): Error: type parameter (F) passed to function FQ must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors6.dfy(385,9): Error: type parameter (G) passed to function FP must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(00)', which says it can only be instantiated with a nonempty type) +ResolutionErrors6.dfy(381,11): Error: type parameter (F) passed to function FQ must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 376 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors6.dfy(384,11): Error: type parameter (F) passed to function FQ must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors6.dfy(385,11): Error: type parameter (G) passed to function FP must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(00)', which says it can only be instantiated with a nonempty type) 46 resolution/type errors detected in ResolutionErrors6.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.refresh.expect index 09a91ef2e9a..6d46a15c7e2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors6.dfy.refresh.expect @@ -4,14 +4,14 @@ ResolutionErrors6.dfy(44,50): Error: the argument of a fresh expression must den ResolutionErrors6.dfy(71,11): Error: name of type (Cache) is used as a variable ResolutionErrors6.dfy(79,13): Warning: the quantifier has the form 'exists x :: A ==> B', which most often is a typo for 'exists x :: A && B'; if you think otherwise, rewrite as 'exists x :: (A ==> B)' or 'exists x :: !A || B' to suppress this warning ResolutionErrors6.dfy(89,13): Warning: the quantifier has the form 'exists x :: A ==> B', which most often is a typo for 'exists x :: A && B'; if you think otherwise, rewrite as 'exists x :: (A ==> B)' or 'exists x :: !A || B' to suppress this warning -ResolutionErrors6.dfy(123,13): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(124,13): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(123,14): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(124,14): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors6.dfy(126,11): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. ResolutionErrors6.dfy(147,4): Error: ghost variables such as g are allowed only in specification contexts. g was inferred to be ghost based on its declaration or initialization. -ResolutionErrors6.dfy(157,15): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(158,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(164,15): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors6.dfy(165,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(157,16): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(158,23): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(164,16): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors6.dfy(165,23): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) ResolutionErrors6.dfy(182,23): Error: type of right argument to * (bool) must agree with the result type (int) ResolutionErrors6.dfy(181,13): Error: not resolving module 'V' because there were errors in resolving its nested module 'W' ResolutionErrors6.dfy(191,21): Error: type of right argument to * (bool) must agree with the result type (int) @@ -43,7 +43,7 @@ ResolutionErrors6.dfy(343,18): Error: map update requires the value to have the ResolutionErrors6.dfy(368,5): Error: type parameter (F) passed to method Q must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 363 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) ResolutionErrors6.dfy(371,5): Error: type parameter (F) passed to method Q must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 363 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) ResolutionErrors6.dfy(372,5): Error: type parameter (G) passed to method P must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 363 as 'Z(00)', which says it can only be instantiated with a nonempty type) -ResolutionErrors6.dfy(381,9): Error: type parameter (F) passed to function FQ must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 376 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors6.dfy(384,9): Error: type parameter (F) passed to function FQ must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors6.dfy(385,9): Error: type parameter (G) passed to function FP must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(00)', which says it can only be instantiated with a nonempty type) +ResolutionErrors6.dfy(381,11): Error: type parameter (F) passed to function FQ must support auto-initialization (got Y) (perhaps try declaring type parameter 'Y' on line 376 as 'Y(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors6.dfy(384,11): Error: type parameter (F) passed to function FQ must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors6.dfy(385,11): Error: type parameter (G) passed to function FP must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 376 as 'Z(00)', which says it can only be instantiated with a nonempty type) 44 resolution/type errors detected in ResolutionErrors6.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.expect index 2f9f7d8468d..7624fc3e4c3 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.expect @@ -1,9 +1,9 @@ -ResolutionErrors7.dfy(16,9): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors7.dfy(17,9): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) -ResolutionErrors7.dfy(18,9): Error: a call to a least predicate is allowed only in specification contexts -ResolutionErrors7.dfy(19,9): Error: a call to a greatest predicate is allowed only in specification contexts -ResolutionErrors7.dfy(20,9): Error: a call to a twostate function is allowed only in specification contexts -ResolutionErrors7.dfy(21,9): Error: a call to a twostate predicate is allowed only in specification contexts +ResolutionErrors7.dfy(16,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors7.dfy(17,23): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +ResolutionErrors7.dfy(18,23): Error: a call to a least predicate is allowed only in specification contexts +ResolutionErrors7.dfy(19,26): Error: a call to a greatest predicate is allowed only in specification contexts +ResolutionErrors7.dfy(20,20): Error: a call to a twostate function is allowed only in specification contexts +ResolutionErrors7.dfy(21,21): Error: a call to a twostate predicate is allowed only in specification contexts ResolutionErrors7.dfy(38,9): Error: function 'F0' expects 0 type arguments (got 1) ResolutionErrors7.dfy(40,9): Error: function 'F2' expects 2 type arguments (got 1) ResolutionErrors7.dfy(41,9): Error: function 'F0' expects 0 type arguments (got 2) @@ -16,23 +16,23 @@ ResolutionErrors7.dfy(67,10): Error: ghost variables such as c are allowed only ResolutionErrors7.dfy(71,14): Error: ghost variables such as t are allowed only in specification contexts. t was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(76,10): Error: ghost variables such as a' are allowed only in specification contexts. a' was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(77,10): Error: ghost variables such as c' are allowed only in specification contexts. c' was inferred to be ghost based on its declaration or initialization. -ResolutionErrors7.dfy(101,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(106,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(00)', which says it can only be instantiated with a nonempty type) -ResolutionErrors7.dfy(108,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(109,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(113,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors7.dfy(117,9): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(120,9): Error: type parameter (T) passed to function MustSupportEquality must support equality (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(125,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(127,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(!new)', which says it can only be instantiated with a type that contains no references) -ResolutionErrors7.dfy(134,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(140,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(155,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(101,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(106,26): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(00)', which says it can only be instantiated with a nonempty type) +ResolutionErrors7.dfy(108,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(109,33): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(113,26): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors7.dfy(117,40): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(120,31): Error: type parameter (T) passed to function MustSupportEquality must support equality (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(==)', which says it can only be instantiated with a type that supports equality) +ResolutionErrors7.dfy(125,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(127,24): Error: type parameter (T) passed to function NoReferences must contain no references (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(!new)', which says it can only be instantiated with a type that contains no references) +ResolutionErrors7.dfy(134,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(140,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(155,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) ResolutionErrors7.dfy(165,12): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 163 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(167,7): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 163 as 'T(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(170,12): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) -ResolutionErrors7.dfy(172,7): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) -ResolutionErrors7.dfy(175,19): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(170,30): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(172,25): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(175,37): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) ResolutionErrors7.dfy(183,13): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(188,13): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(190,23): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) @@ -42,33 +42,33 @@ ResolutionErrors7.dfy(193,15): Error: type parameter 1 (U) passed to type QuadEq ResolutionErrors7.dfy(193,15): Error: type parameter 1 (U) passed to type QuadEq must support equality (got seq) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(202,15): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 199 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(211,15): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 199 as 'T(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(229,11): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(230,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(231,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(232,11): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(233,11): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(237,47): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(238,12): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(242,11): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(243,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(244,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(245,11): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(246,11): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(250,50): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(251,12): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(254,12): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(258,12): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(263,53): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(266,63): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(229,40): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(230,40): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(231,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(232,42): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(233,31): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(237,76): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(238,41): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(242,40): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(243,40): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(244,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(245,42): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(246,31): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(250,79): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(251,41): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(254,43): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(258,43): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(263,82): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(266,92): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) ResolutionErrors7.dfy(283,6): Error: ghost variables such as m are allowed only in specification contexts. m was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(287,8): Error: non-ghost variable cannot be assigned a value that depends on a ghost ResolutionErrors7.dfy(291,18): Error: ghost variables such as m are allowed only in specification contexts. m was inferred to be ghost based on its declaration or initialization. -ResolutionErrors7.dfy(317,6): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(323,6): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(324,6): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(331,6): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(338,6): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(344,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(350,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(365,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(317,35): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(323,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(324,30): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(331,37): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(338,26): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(344,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(350,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(365,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) 73 resolution/type errors detected in ResolutionErrors7.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.refresh.expect index 2f9f7d8468d..7624fc3e4c3 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ResolutionErrors7.dfy.refresh.expect @@ -1,9 +1,9 @@ -ResolutionErrors7.dfy(16,9): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) -ResolutionErrors7.dfy(17,9): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) -ResolutionErrors7.dfy(18,9): Error: a call to a least predicate is allowed only in specification contexts -ResolutionErrors7.dfy(19,9): Error: a call to a greatest predicate is allowed only in specification contexts -ResolutionErrors7.dfy(20,9): Error: a call to a twostate function is allowed only in specification contexts -ResolutionErrors7.dfy(21,9): Error: a call to a twostate predicate is allowed only in specification contexts +ResolutionErrors7.dfy(16,22): Error: a call to a ghost function is allowed only in specification contexts (consider declaring the function without the 'ghost' keyword) +ResolutionErrors7.dfy(17,23): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +ResolutionErrors7.dfy(18,23): Error: a call to a least predicate is allowed only in specification contexts +ResolutionErrors7.dfy(19,26): Error: a call to a greatest predicate is allowed only in specification contexts +ResolutionErrors7.dfy(20,20): Error: a call to a twostate function is allowed only in specification contexts +ResolutionErrors7.dfy(21,21): Error: a call to a twostate predicate is allowed only in specification contexts ResolutionErrors7.dfy(38,9): Error: function 'F0' expects 0 type arguments (got 1) ResolutionErrors7.dfy(40,9): Error: function 'F2' expects 2 type arguments (got 1) ResolutionErrors7.dfy(41,9): Error: function 'F0' expects 0 type arguments (got 2) @@ -16,23 +16,23 @@ ResolutionErrors7.dfy(67,10): Error: ghost variables such as c are allowed only ResolutionErrors7.dfy(71,14): Error: ghost variables such as t are allowed only in specification contexts. t was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(76,10): Error: ghost variables such as a' are allowed only in specification contexts. a' was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(77,10): Error: ghost variables such as c' are allowed only in specification contexts. c' was inferred to be ghost based on its declaration or initialization. -ResolutionErrors7.dfy(101,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(106,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(00)', which says it can only be instantiated with a nonempty type) -ResolutionErrors7.dfy(108,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(109,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(113,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) -ResolutionErrors7.dfy(117,9): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(120,9): Error: type parameter (T) passed to function MustSupportEquality must support equality (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(125,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(127,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(!new)', which says it can only be instantiated with a type that contains no references) -ResolutionErrors7.dfy(134,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(140,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(155,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(101,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(106,26): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(00)', which says it can only be instantiated with a nonempty type) +ResolutionErrors7.dfy(108,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(109,33): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(113,26): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(0)', which says it can only be instantiated with a type that supports auto-initialization) +ResolutionErrors7.dfy(117,40): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(120,31): Error: type parameter (T) passed to function MustSupportEquality must support equality (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(==)', which says it can only be instantiated with a type that supports equality) +ResolutionErrors7.dfy(125,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(127,24): Error: type parameter (T) passed to function NoReferences must contain no references (got Z) (perhaps try declaring type parameter 'Z' on line 97 as 'Z(!new)', which says it can only be instantiated with a type that contains no references) +ResolutionErrors7.dfy(134,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(140,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(155,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) ResolutionErrors7.dfy(165,12): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 163 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(167,7): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 163 as 'T(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(170,12): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) -ResolutionErrors7.dfy(172,7): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) -ResolutionErrors7.dfy(175,19): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(170,30): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(172,25): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) +ResolutionErrors7.dfy(175,37): Error: type parameter (T) passed to function GetInt must support equality (got NoEquality) ResolutionErrors7.dfy(183,13): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(188,13): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(190,23): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) @@ -42,33 +42,33 @@ ResolutionErrors7.dfy(193,15): Error: type parameter 1 (U) passed to type QuadEq ResolutionErrors7.dfy(193,15): Error: type parameter 1 (U) passed to type QuadEq must support equality (got seq) (perhaps try declaring type parameter 'T' on line 182 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(202,15): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 199 as 'T(==)', which says it can only be instantiated with a type that supports equality) ResolutionErrors7.dfy(211,15): Error: == can only be applied to expressions of types that support equality (got T) (perhaps try declaring type parameter 'T' on line 199 as 'T(==)', which says it can only be instantiated with a type that supports equality) -ResolutionErrors7.dfy(229,11): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(230,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(231,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(232,11): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(233,11): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(237,47): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(238,12): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(242,11): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(243,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(244,11): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(245,11): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(246,11): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(250,50): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(251,12): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(254,12): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(258,12): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(263,53): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(266,63): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(229,40): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(230,40): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(231,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(232,42): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(233,31): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(237,76): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(238,41): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(242,40): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(243,40): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(244,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(245,42): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(246,31): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(250,79): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(251,41): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(254,43): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(258,43): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(263,82): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(266,92): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) ResolutionErrors7.dfy(283,6): Error: ghost variables such as m are allowed only in specification contexts. m was inferred to be ghost based on its declaration or initialization. ResolutionErrors7.dfy(287,8): Error: non-ghost variable cannot be assigned a value that depends on a ghost ResolutionErrors7.dfy(291,18): Error: ghost variables such as m are allowed only in specification contexts. m was inferred to be ghost based on its declaration or initialization. -ResolutionErrors7.dfy(317,6): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(323,6): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(324,6): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) -ResolutionErrors7.dfy(331,6): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) -ResolutionErrors7.dfy(338,6): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) -ResolutionErrors7.dfy(344,9): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) -ResolutionErrors7.dfy(350,9): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) -ResolutionErrors7.dfy(365,9): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(317,35): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(323,35): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(324,30): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got Nonempty) +ResolutionErrors7.dfy(331,37): Error: type parameter (T) passed to function MustSupportEquality must support equality (got NoEquality) +ResolutionErrors7.dfy(338,26): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) +ResolutionErrors7.dfy(344,38): Error: type parameter (T) passed to function MustBeNonempty must be nonempty (got PossiblyEmpty) +ResolutionErrors7.dfy(350,38): Error: type parameter (T) passed to function MustBeAutoInit must support auto-initialization (got PossiblyEmpty) +ResolutionErrors7.dfy(365,29): Error: type parameter (T) passed to function NoReferences must contain no references (got Class?) 73 resolution/type errors detected in ResolutionErrors7.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SmallTests.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SmallTests.dfy.expect index c48ba2ad2be..352e0f7ec43 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SmallTests.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SmallTests.dfy.expect @@ -37,10 +37,10 @@ SmallTests.dfy(338,2): Error: a postcondition could not be proved on this return SmallTests.dfy(332,10): Related location: this is the postcondition that could not be proved SmallTests.dfy(379,2): Error: assertion might not hold SmallTests.dfy(386,2): Error: assertion might not hold -SmallTests.dfy(396,3): Error: cannot prove termination; try supplying a decreases clause +SmallTests.dfy(396,8): Error: cannot prove termination; try supplying a decreases clause SmallTests.dfy(408,4): Error: assertion might not hold SmallTests.dfy(418,4): Error: assertion might not hold -SmallTests.dfy(428,5): Error: cannot prove termination; try supplying a decreases clause +SmallTests.dfy(428,10): Error: cannot prove termination; try supplying a decreases clause SmallTests.dfy(445,2): Error: a postcondition could not be proved on this return path SmallTests.dfy(443,40): Related location: this is the postcondition that could not be proved SmallTests.dfy(604,2): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SplitExpr.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SplitExpr.dfy.expect index b849528f64d..f8171dcbad5 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SplitExpr.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SplitExpr.dfy.expect @@ -1,4 +1,4 @@ -SplitExpr.dfy(96,14): Error: loop invariant violation +SplitExpr.dfy(96,26): Error: loop invariant violation SplitExpr.dfy(90,49): Related location: this proposition could not be proved Dafny program verifier finished with 8 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/StatementExpressions.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/StatementExpressions.dfy.expect index 2f8d955c6b6..fc5d3a4fa78 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/StatementExpressions.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/StatementExpressions.dfy.expect @@ -3,7 +3,7 @@ StatementExpressions.dfy(59,4): Error: assertion might not hold StatementExpressions.dfy(77,5): Error: possible division by zero StatementExpressions.dfy(88,4): Error: value does not satisfy the subset constraints of 'nat' StatementExpressions.dfy(98,17): Error: cannot prove termination; try supplying a decreases clause -StatementExpressions.dfy(178,2): Error: function precondition could not be proved +StatementExpressions.dfy(178,22): Error: function precondition could not be proved StatementExpressions.dfy(164,13): Related location: this proposition could not be proved Dafny program verifier finished with 20 verified, 6 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SubsetTypes.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SubsetTypes.dfy.expect index fa895e61eab..88422b2a72c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SubsetTypes.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/SubsetTypes.dfy.expect @@ -7,7 +7,7 @@ SubsetTypes.dfy(16,6): Error: cannot establish the existence of LHS values that SubsetTypes.dfy(19,11): Error: value does not satisfy the subset constraints of 'nat' SubsetTypes.dfy(21,15): Error: value does not satisfy the subset constraints of 'nat' SubsetTypes.dfy(23,8): Error: value does not satisfy the subset constraints of 'nat' -SubsetTypes.dfy(30,4): Error: value does not satisfy the subset constraints of 'nat' +SubsetTypes.dfy(31,6): Error: value does not satisfy the subset constraints of 'nat' SubsetTypes.dfy(31,7): Error: value does not satisfy the subset constraints of 'nat' SubsetTypes.dfy(42,24): Error: value does not satisfy the subset constraints of 'nat' SubsetTypes.dfy(44,15): Error: value does not satisfy the subset constraints of 'nat' @@ -23,7 +23,7 @@ SubsetTypes.dfy(72,6): Error: cannot establish the existence of LHS values that SubsetTypes.dfy(75,11): Error: value of expression (of type 'set') is not known to be an instance of type 'set' SubsetTypes.dfy(77,15): Error: value of expression (of type 'set') is not known to be an instance of type 'set' SubsetTypes.dfy(79,8): Error: value of expression (of type 'set') is not known to be an instance of type 'set' -SubsetTypes.dfy(86,4): Error: value of expression (of type 'set') is not known to be an instance of type 'set' +SubsetTypes.dfy(87,6): Error: value of expression (of type 'set') is not known to be an instance of type 'set' SubsetTypes.dfy(87,7): Error: value of expression (of type 'set') is not known to be an instance of type 'set' SubsetTypes.dfy(98,24): Error: value of expression (of type 'set') is not known to be an instance of type 'set' SubsetTypes.dfy(100,15): Error: value of expression (of type 'set') is not known to be an instance of type 'set' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TailCalls.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TailCalls.dfy.expect index 0571cf4009c..98cbc545474 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TailCalls.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TailCalls.dfy.expect @@ -2,29 +2,29 @@ TailCalls.dfy(21,16): Error: this recursive call is not recognized as being tail TailCalls.dfy(38,24): Error: sorry, tail-call optimizations are not supported for mutually recursive methods TailCalls.dfy(43,24): Error: sorry, tail-call optimizations are not supported for mutually recursive methods TailCalls.dfy(171,13): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(174,6): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(178,13): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(181,6): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(174,7): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(178,14): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(181,7): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call TailCalls.dfy(188,32): Error: tail recursion can be specified only for functions that will be compiled, not for ghost functions TailCalls.dfy(195,30): Error: tail recursion can be specified only for methods that will be compiled, not for ghost methods TailCalls.dfy(229,7): Error: if-then-else branches have different accumulator needs for tail recursion TailCalls.dfy(261,2): Error: if-then-else branches have different accumulator needs for tail recursion -TailCalls.dfy(288,14): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(310,19): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(316,24): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call -TailCalls.dfy(323,33): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(288,17): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(310,22): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(316,30): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call +TailCalls.dfy(323,41): Error: to be tail recursive, every use of this function must be part of a tail call or a simple accumulating tail call TailCalls.dfy(338,22): Error: this recursive call is not recognized as being tail recursive, because it is followed by non-ghost code TailCalls.dfy(369,21): Error: this recursive call is not recognized as being tail recursive, because it is followed by non-ghost code -TailCalls.dfy(380,31): Error: a recursive call in this context is not recognized as a tail call -TailCalls.dfy(416,31): Error: a recursive call in this context is not recognized as a tail call -TailCalls.dfy(416,48): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(380,35): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(416,35): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(416,52): Error: a recursive call in this context is not recognized as a tail call TailCalls.dfy(425,10): Error: the recursive call to 'FBM2' is not tail recursive because the actual out-parameter is not the formal out-parameter -TailCalls.dfy(425,13): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(425,17): Error: a recursive call in this context is not recognized as a tail call TailCalls.dfy(437,10): Error: the recursive call to 'FBM3' is not tail recursive because the actual out-parameter is not the formal out-parameter 'r' -TailCalls.dfy(437,13): Error: a recursive call in this context is not recognized as a tail call -TailCalls.dfy(449,14): Error: a recursive call in this context is not recognized as a tail call -TailCalls.dfy(451,19): Error: a recursive call in this context is not recognized as a tail call -TailCalls.dfy(462,11): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(437,17): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(449,18): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(451,23): Error: a recursive call in this context is not recognized as a tail call +TailCalls.dfy(462,15): Error: a recursive call in this context is not recognized as a tail call TailCalls.dfy(110,14): Error: the recursive call to '_ctor' is not tail recursive, because the assignment of the LHS happens after the call TailCalls.dfy(126,19): Error: the recursive call to 'Compute' is not tail recursive because the actual type argument is not the formal type parameter 'G' TailCalls.dfy(139,17): Error: the recursive call to 'Run' is not tail recursive because the actual type argument 1 is not the formal type parameter 'G' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.expect index f04a5ed0bcf..805b029c460 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.expect @@ -1,9 +1,9 @@ Termination.dfy(108,2): Error: cannot prove termination; try supplying a decreases clause for the loop Termination.dfy(125,2): Error: decreases expression might not decrease Termination.dfy(126,16): Error: decreases expression must be bounded below by 0 at end of loop iteration -Termination.dfy(255,34): Error: cannot prove termination; try supplying a decreases clause +Termination.dfy(255,41): Error: cannot prove termination; try supplying a decreases clause Termination.dfy(296,2): Error: decreases expression might not decrease -Termination.dfy(361,46): Error: decreases clause might not decrease +Termination.dfy(361,47): Error: decreases clause might not decrease Termination.dfy(534,2): Error: decreases expression might not decrease Termination.dfy(542,2): Error: decreases expression might not decrease Termination.dfy(549,2): Error: decreases expression might not decrease diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.refresh.expect index 68e96bebe1f..6b893c639cf 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Termination.dfy.refresh.expect @@ -1,9 +1,9 @@ Termination.dfy(108,2): Error: cannot prove termination; try supplying a decreases clause for the loop Termination.dfy(125,2): Error: decreases expression might not decrease Termination.dfy(126,16): Error: decreases expression must be bounded below by 0 at end of loop iteration -Termination.dfy(255,34): Error: cannot prove termination; try supplying a decreases clause +Termination.dfy(255,41): Error: cannot prove termination; try supplying a decreases clause Termination.dfy(296,2): Error: decreases expression might not decrease -Termination.dfy(361,46): Error: decreases clause might not decrease +Termination.dfy(361,47): Error: decreases clause might not decrease Termination.dfy(534,2): Error: decreases expression might not decrease Termination.dfy(542,2): Error: decreases expression might not decrease Termination.dfy(549,2): Error: decreases expression might not decrease diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TriggerInPredicate.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TriggerInPredicate.dfy.expect index e47d3f949d8..83ed96ed7b6 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TriggerInPredicate.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TriggerInPredicate.dfy.expect @@ -1,4 +1,4 @@ -TriggerInPredicate.dfy(9,20): Info: Some instances of this call are not inlined. -TriggerInPredicate.dfy(9,20): Info: Some instances of this call are not inlined. +TriggerInPredicate.dfy(9,21): Info: Some instances of this call are not inlined. +TriggerInPredicate.dfy(9,21): Info: Some instances of this call are not inlined. Dafny program verifier finished with 0 verified, 0 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Functions.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Functions.dfy.expect index 3dae7e8aabe..a613f45eff0 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Functions.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Functions.dfy.expect @@ -1,9 +1,9 @@ Twostate-Functions.dfy(11,27): Error: receiver could not be proved to be allocated in the state in which its fields are accessed Twostate-Functions.dfy(18,12): Error: receiver could not be proved to be allocated in the state in which its fields are accessed Twostate-Functions.dfy(23,8): Error: insufficient reads clause to read field; Consider adding 'reads u' or 'reads u`aa' in the enclosing twostate function specification for resolution -Twostate-Functions.dfy(66,17): Error: assertion might not hold +Twostate-Functions.dfy(66,29): Error: assertion might not hold Twostate-Functions.dfy(54,14): Related location: this proposition could not be proved -Twostate-Functions.dfy(68,15): Error: assertion might not hold +Twostate-Functions.dfy(68,27): Error: assertion might not hold Twostate-Functions.dfy(54,14): Related location: this proposition could not be proved Twostate-Functions.dfy(92,24): Error: argument for parameter 'u' could not be proved to be allocated in the two-state function's previous state -- if you add 'new' before the parameter declaration, like 'new u: U', arguments can refer to expressions possibly unallocated in the previous state Twostate-Functions.dfy(97,40): Error: argument at index 1 for parameter 'x' could not be proved to be allocated in the two-state function's previous state -- if you add 'new' before the parameter declaration, like 'new x: U', arguments can refer to expressions possibly unallocated in the previous state diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.expect index 2de5f62f282..dacaa7774d7 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.expect @@ -725,7 +725,7 @@ Twostate-Resolution.dfy(167,7): Error: two-state function ('P') can only be call Twostate-Resolution.dfy(218,6): Error: two-state lemmas can only be used in two-state contexts Twostate-Resolution.dfy(183,21): Error: 'this' is not allowed in a 'static' context Twostate-Resolution.dfy(184,21): Error: 'this' is not allowed in a 'static' context -Twostate-Resolution.dfy(229,9): Error: a call to a twostate predicate is allowed only in specification contexts +Twostate-Resolution.dfy(229,10): Error: a call to a twostate predicate is allowed only in specification contexts Twostate-Resolution.dfy(230,30): Error: a twostate predicate is allowed only in specification contexts Twostate-Resolution.dfy(242,26): Error: two-state function ('F') can only be called in a two-state context Twostate-Resolution.dfy(243,27): Error: two-state lemmas can only be used in two-state contexts diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.refresh.expect index 2de5f62f282..dacaa7774d7 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Twostate-Resolution.dfy.refresh.expect @@ -725,7 +725,7 @@ Twostate-Resolution.dfy(167,7): Error: two-state function ('P') can only be call Twostate-Resolution.dfy(218,6): Error: two-state lemmas can only be used in two-state contexts Twostate-Resolution.dfy(183,21): Error: 'this' is not allowed in a 'static' context Twostate-Resolution.dfy(184,21): Error: 'this' is not allowed in a 'static' context -Twostate-Resolution.dfy(229,9): Error: a call to a twostate predicate is allowed only in specification contexts +Twostate-Resolution.dfy(229,10): Error: a call to a twostate predicate is allowed only in specification contexts Twostate-Resolution.dfy(230,30): Error: a twostate predicate is allowed only in specification contexts Twostate-Resolution.dfy(242,26): Error: two-state function ('F') can only be called in a two-state context Twostate-Resolution.dfy(243,27): Error: two-state lemmas can only be used in two-state contexts diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeInstantiations.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeInstantiations.dfy.expect index 3d5af051e0c..81fd13519ad 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeInstantiations.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeInstantiations.dfy.expect @@ -25,6 +25,6 @@ TypeInstantiations.dfy(109,8): Error: the type of this variable is underspecifie TypeInstantiations.dfy(127,27): Error: RHS (of type int) not assignable to LHS (of type C.Classic) TypeInstantiations.dfy(137,8): Error: the type of this variable is underspecified TypeInstantiations.dfy(137,15): Error: type of type parameter could not be determined; please specify the type explicitly -TypeInstantiations.dfy(137,23): Error: type parameter 'A' (inferred to be '?') in the function call to 'F' could not be determined +TypeInstantiations.dfy(137,24): Error: type parameter 'A' (inferred to be '?') in the function call to 'F' could not be determined TypeInstantiations.dfy(137,24): Error: the type of this expression is underspecified 29 resolution/type errors detected in TypeInstantiations.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeParameters.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeParameters.dfy.expect index 1041be01327..e99329ad15a 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeParameters.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeParameters.dfy.expect @@ -1,17 +1,17 @@ TypeParameters.dfy(44,4): Error: assertion might not hold TypeParameters.dfy(66,4): Error: assertion might not hold -TypeParameters.dfy(153,11): Error: assertion might not hold +TypeParameters.dfy(153,15): Error: assertion might not hold TypeParameters.dfy(153,27): Related location: this proposition could not be proved -TypeParameters.dfy(155,11): Error: assertion might not hold +TypeParameters.dfy(155,20): Error: assertion might not hold TypeParameters.dfy(155,32): Related location: this proposition could not be proved -TypeParameters.dfy(157,11): Error: assertion might not hold +TypeParameters.dfy(157,18): Error: assertion might not hold TypeParameters.dfy(137,2): Related location: this proposition could not be proved -TypeParameters.dfy(159,11): Error: assertion might not hold -TypeParameters.dfy(144,4): Related location: this proposition could not be proved +TypeParameters.dfy(159,17): Error: assertion might not hold +TypeParameters.dfy(144,13): Related location: this proposition could not be proved TypeParameters.dfy(144,14): Related location: this proposition could not be proved -TypeParameters.dfy(161,11): Error: assertion might not hold +TypeParameters.dfy(161,17): Error: assertion might not hold TypeParameters.dfy(146,7): Related location: this proposition could not be proved -TypeParameters.dfy(175,14): Error: this invariant could not be proved to be maintained by the loop +TypeParameters.dfy(175,23): Error: this invariant could not be proved to be maintained by the loop Related message: loop invariant violation TypeParameters.dfy(175,37): Related location: this proposition could not be proved TypeParameters.dfy(376,20): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeTests.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeTests.dfy.expect index ecc486403b5..169f5d7882f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeTests.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TypeTests.dfy.expect @@ -15,19 +15,19 @@ TypeTests.dfy(92,3): Error: cannot assign to a range of array elements (try the TypeTests.dfy(94,3): Error: cannot assign to a range of array elements (try the 'forall' statement) TypeTests.dfy(95,3): Error: cannot assign to a range of array elements (try the 'forall' statement) TypeTests.dfy(96,3): Error: cannot assign to a range of array elements (try the 'forall' statement) -TypeTests.dfy(9,14): Error: incorrect argument type at index 0 for function parameter 'c' (expected C, found D) -TypeTests.dfy(9,14): Error: incorrect argument type at index 1 for function parameter 'd' (expected D, found C) -TypeTests.dfy(10,14): Error: incorrect argument type at index 0 for function parameter 'c' (expected C, found int) -TypeTests.dfy(10,14): Error: incorrect argument type at index 1 for function parameter 'd' (expected D, found int) -TypeTests.dfy(16,16): Error: incorrect argument type for method in-parameter 'x' (expected int, found bool) +TypeTests.dfy(9,17): Error: incorrect argument type at index 0 for function parameter 'c' (expected C, found D) +TypeTests.dfy(9,20): Error: incorrect argument type at index 1 for function parameter 'd' (expected D, found C) +TypeTests.dfy(10,15): Error: incorrect argument type at index 0 for function parameter 'c' (expected C, found int) +TypeTests.dfy(10,18): Error: incorrect argument type at index 1 for function parameter 'd' (expected D, found int) +TypeTests.dfy(16,17): Error: incorrect argument type for method in-parameter 'x' (expected int, found bool) TypeTests.dfy(16,16): Error: incorrect return type at index 1 for method out-parameter 'c' (expected C, got int) TypeTests.dfy(17,12): Error: incorrect return type at index 1 for method out-parameter 'c' (expected C, got int) TypeTests.dfy(169,7): Error: non-ghost variable cannot be assigned a value that depends on a ghost TypeTests.dfy(179,6): Error: cannot assign to non-ghost variable in a ghost context TypeTests.dfy(180,9): Error: cannot assign to non-ghost variable in a ghost context -TypeTests.dfy(198,10): Error: incorrect argument type for datatype constructor parameter (expected int -> Dt, found int -> int) (covariant type parameter 1 would require int <: Dt) -TypeTests.dfy(204,10): Error: incorrect argument type for datatype constructor parameter (expected ? -> Dt, found Dt -> Dt) (contravariance for type parameter at index 0 expects ? <: Dt) -TypeTests.dfy(211,10): Error: incorrect argument type for function parameter 'x' (expected ?, found set) +TypeTests.dfy(198,15): Error: incorrect argument type for datatype constructor parameter (expected int -> Dt, found int -> int) (covariant type parameter 1 would require int <: Dt) +TypeTests.dfy(204,15): Error: incorrect argument type for datatype constructor parameter (expected ? -> Dt, found Dt -> Dt) (contravariance for type parameter at index 0 expects ? <: Dt) +TypeTests.dfy(211,11): Error: incorrect argument type for function parameter 'x' (expected ?, found set) TypeTests.dfy(222,9): Error: assignment to array element is not allowed in this context, because this is a ghost method TypeTests.dfy(229,20): Error: using the type being defined ('A') here would cause a logical inconsistency by defining a type whose cardinality exceeds itself (like the Continuum Transfunctioner, you might say its power would then be exceeded only by its mystery) TypeTests.dfy(233,7): Error: recursive constraint dependency involving a subset type: Cyc -> Cycle -> Cyc diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/UserSpecifiedTypeParameters.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/UserSpecifiedTypeParameters.dfy.expect index 4427715483f..768bcfb0a5f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/UserSpecifiedTypeParameters.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/UserSpecifiedTypeParameters.dfy.expect @@ -1,13 +1,13 @@ UserSpecifiedTypeParameters.dfy(26,10): Error: the type of this variable is underspecified UserSpecifiedTypeParameters.dfy(26,16): Error: type of type parameter could not be determined; please specify the type explicitly UserSpecifiedTypeParameters.dfy(26,16): Error: type of type parameter could not be determined; please specify the type explicitly -UserSpecifiedTypeParameters.dfy(26,24): Error: type parameter 'T' (inferred to be '?') in the function call to 'H' could not be determined -UserSpecifiedTypeParameters.dfy(26,24): Error: type parameter 'U' (inferred to be '?') in the function call to 'H' could not be determined +UserSpecifiedTypeParameters.dfy(26,25): Error: type parameter 'T' (inferred to be '?') in the function call to 'H' could not be determined +UserSpecifiedTypeParameters.dfy(26,25): Error: type parameter 'U' (inferred to be '?') in the function call to 'H' could not be determined UserSpecifiedTypeParameters.dfy(46,16): Error: wrong number of arguments (got 1, but function 'F' expects 2: (x: bool, y: bool)) UserSpecifiedTypeParameters.dfy(46,22): Error: Type or type parameter is not declared in this scope: b (did you forget to qualify a name or declare a module import 'opened'?) (note that names in outer modules are not visible in contained modules) UserSpecifiedTypeParameters.dfy(46,26): Error: Type or type parameter is not declared in this scope: c (did you forget to qualify a name or declare a module import 'opened'?) (note that names in outer modules are not visible in contained modules) UserSpecifiedTypeParameters.dfy(46,18): Error: variable 'a' does not take any type parameters UserSpecifiedTypeParameters.dfy(46,30): Error: non-function expression (of type int) is called with parameters -UserSpecifiedTypeParameters.dfy(77,15): Error: incorrect argument type for lemma in-parameter 'y' (expected A, found int) -UserSpecifiedTypeParameters.dfy(89,14): Error: incorrect argument type for function parameter 'y' (expected A, found int) +UserSpecifiedTypeParameters.dfy(77,16): Error: incorrect argument type for lemma in-parameter 'y' (expected A, found int) +UserSpecifiedTypeParameters.dfy(89,15): Error: incorrect argument type for function parameter 'y' (expected A, found int) 12 resolution/type errors detected in UserSpecifiedTypeParameters.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/one-message-per-failed-precondition.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/one-message-per-failed-precondition.dfy.expect index 5391422767e..fc73d4bd8be 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/one-message-per-failed-precondition.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/one-message-per-failed-precondition.dfy.expect @@ -2,9 +2,9 @@ one-message-per-failed-precondition.dfy(13,3): Error: a precondition for this ca one-message-per-failed-precondition.dfy(8,13): Related location: this is the precondition that could not be proved one-message-per-failed-precondition.dfy(13,3): Error: a precondition for this call could not be proved one-message-per-failed-precondition.dfy(9,13): Related location: this is the precondition that could not be proved -one-message-per-failed-precondition.dfy(20,33): Error: function precondition could not be proved +one-message-per-failed-precondition.dfy(20,35): Error: function precondition could not be proved one-message-per-failed-precondition.dfy(17,13): Related location: this proposition could not be proved -one-message-per-failed-precondition.dfy(20,33): Error: function precondition could not be proved +one-message-per-failed-precondition.dfy(20,35): Error: function precondition could not be proved one-message-per-failed-precondition.dfy(18,13): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 4 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/snapshots/Snapshots2.run.legacy.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/snapshots/Snapshots2.run.legacy.dfy.expect index 6ae0c1a4456..73227d69808 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/snapshots/Snapshots2.run.legacy.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/snapshots/Snapshots2.run.legacy.dfy.expect @@ -1,10 +1,10 @@ Processing command (at Snapshots2.v0.dfy(4,3)) assert {:id "id1"} Lit(false); >>> DoNothingToAssert -Processing command (at Snapshots2.v0.dfy(11,11)) assert {:id "id5"} Lit(true); +Processing command (at Snapshots2.v0.dfy(11,12)) assert {:id "id5"} Lit(true); >>> DoNothingToAssert Processing command (at Snapshots2.v0.dfy(11,15)) assert {:id "id4"} _module.__default.P() <==> _module.__default.Q(); >>> DoNothingToAssert -Processing command (at Snapshots2.v0.dfy(14,11)) assert {:id "id8"} Lit(true); +Processing command (at Snapshots2.v0.dfy(14,12)) assert {:id "id8"} Lit(true); >>> DoNothingToAssert Processing command (at Snapshots2.v0.dfy(14,15)) assert {:id "id7"} _module.__default.Q() <==> Lit(_module.__default.R()); >>> DoNothingToAssert @@ -19,11 +19,11 @@ Processing implementation Q (well-formedness) (at Snapshots2.v1.dfy(13,11)): Processing command (at Snapshots2.v1.dfy(4,3)) assert {:id "id14"} Lit(false); >>> DoNothingToAssert Snapshots2.v1.dfy(4,2): Error: assertion might not hold -Processing command (at Snapshots2.v1.dfy(11,11)) assert {:id "id18"} Lit(true); +Processing command (at Snapshots2.v1.dfy(11,12)) assert {:id "id18"} Lit(true); >>> DoNothingToAssert Processing command (at Snapshots2.v1.dfy(11,15)) assert {:id "id17"} _module.__default.P() <==> _module.__default.Q(); >>> DoNothingToAssert -Processing command (at Snapshots2.v1.dfy(14,11)) assert {:id "id21"} Lit(true); +Processing command (at Snapshots2.v1.dfy(14,12)) assert {:id "id21"} Lit(true); >>> DoNothingToAssert Processing command (at Snapshots2.v1.dfy(14,15)) assert {:id "id20"} _module.__default.Q() <==> Lit(_module.__default.R()); >>> DoNothingToAssert diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny3/AbstemiousErrors.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny3/AbstemiousErrors.dfy.expect index 7591d67126c..bc6fea47a92 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny3/AbstemiousErrors.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny3/AbstemiousErrors.dfy.expect @@ -1,7 +1,7 @@ -AbstemiousErrors.dfy(39,6): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') -AbstemiousErrors.dfy(47,6): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') -AbstemiousErrors.dfy(53,2): Error: cannot prove termination; try supplying a decreases clause (note that the call is not sufficiently guarded to be used co-recursively) -AbstemiousErrors.dfy(60,6): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) -AbstemiousErrors.dfy(68,6): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') +AbstemiousErrors.dfy(39,9): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') +AbstemiousErrors.dfy(47,15): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') +AbstemiousErrors.dfy(53,21): Error: cannot prove termination; try supplying a decreases clause (note that the call is not sufficiently guarded to be used co-recursively) +AbstemiousErrors.dfy(60,12): Error: cannot prove termination; try supplying a decreases clause (note that a call can be co-recursive only if all intra-cluster calls are in non-destructive contexts) +AbstemiousErrors.dfy(68,19): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context; perhaps try declaring function 'voraciousAdd' with '{:abstemious}') Dafny program verifier finished with 0 verified, 5 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug146.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug146.dfy.expect index d22e9553311..90953eb4fc2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug146.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug146.dfy.expect @@ -1,5 +1,5 @@ Bug146.dfy(6,75): Error: insufficient reads clause to read array element; Consider adding 'reads world' in the enclosing function specification for resolution -Bug146.dfy(37,15): Error: assertion might not hold +Bug146.dfy(37,25): Error: assertion might not hold Bug146.dfy(26,4): Related location: this proposition could not be proved Dafny program verifier finished with 2 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug170.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug170.dfy.expect index 668f5801e02..9fc780dadfb 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug170.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Bug170.dfy.expect @@ -4,14 +4,14 @@ Bug170.dfy(18,14): Info: _k: ORDINAL Bug170.dfy(26,14): Info: _k: ORDINAL Bug170.dfy(19,14): Info: A#[_k] Bug170.dfy(18,14): Info: AA# with focal predicates A, B -Bug170.dfy(21,7): Info: B#[_k - 1] +Bug170.dfy(21,8): Info: B#[_k - 1] Bug170.dfy(22,6): Info: BB#[_k - 1] Bug170.dfy(27,14): Info: B#[_k] Bug170.dfy(26,14): Info: BB# with focal predicates B, A -Bug170.dfy(29,7): Info: A#[_k - 1] +Bug170.dfy(29,8): Info: A#[_k - 1] Bug170.dfy(30,6): Info: AA#[_k - 1] -Bug170.dfy(10,12): Info: B#[_k - 1] -Bug170.dfy(15,12): Info: A#[_k - 1] +Bug170.dfy(10,13): Info: B#[_k - 1] +Bug170.dfy(15,13): Info: A#[_k - 1] Bug170.dfy(18,14): Info: AA# decreases _k, x Bug170.dfy(26,14): Info: BB# decreases _k, x Bug170.dfy(36,21): Info: _k: ORDINAL @@ -21,13 +21,13 @@ Bug170.dfy(53,17): Info: _k: ORDINAL Bug170.dfy(47,13): Info: A#[_k] Bug170.dfy(46,17): Info: AA# with focal predicates A, B Bug170.dfy(49,4): Info: BB#[_k - 1] -Bug170.dfy(50,11): Info: B#[_k - 1] +Bug170.dfy(50,12): Info: B#[_k - 1] Bug170.dfy(54,13): Info: B#[_k] Bug170.dfy(53,17): Info: BB# with focal predicates B, A Bug170.dfy(56,4): Info: AA#[_k - 1] -Bug170.dfy(57,11): Info: A#[_k - 1] -Bug170.dfy(38,4): Info: B#[_k - 1] -Bug170.dfy(43,4): Info: A#[_k - 1] +Bug170.dfy(57,12): Info: A#[_k - 1] +Bug170.dfy(38,5): Info: B#[_k - 1] +Bug170.dfy(43,5): Info: A#[_k - 1] Bug170.dfy(46,17): Info: AA# decreases _k, x Bug170.dfy(53,17): Info: BB# decreases _k, x Bug170.dfy(46,17): Info: AA# {:induction _k, x} @@ -38,11 +38,11 @@ Bug170.dfy(64,18): Info: _k: ORDINAL Bug170.dfy(69,14): Info: _k: ORDINAL Bug170.dfy(70,14): Info: A#[_k] Bug170.dfy(69,14): Info: AA# with focal predicate A -Bug170.dfy(72,7): Info: A#[_k - 1] +Bug170.dfy(72,8): Info: A#[_k - 1] Bug170.dfy(73,6): Info: AA#[_k - 1] -Bug170.dfy(66,12): Info: A#[_k - 1] +Bug170.dfy(66,13): Info: A#[_k - 1] Bug170.dfy(69,14): Info: AA# decreases _k, x -Bug170.dfy(50,11): Info: Some instances of this call are not inlined. -Bug170.dfy(57,11): Info: Some instances of this call are not inlined. +Bug170.dfy(50,12): Info: Some instances of this call are not inlined. +Bug170.dfy(57,12): Info: Some instances of this call are not inlined. Dafny program verifier finished with 5 verified, 0 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/ExpandedGuardednessNeg.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/ExpandedGuardednessNeg.dfy.expect index 74351cc3738..1752c659c63 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/ExpandedGuardednessNeg.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/ExpandedGuardednessNeg.dfy.expect @@ -1,8 +1,8 @@ -ExpandedGuardednessNeg.dfy(8,17): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context) -ExpandedGuardednessNeg.dfy(8,17): Error: decreases expression must be bounded below by 0 +ExpandedGuardednessNeg.dfy(8,27): Error: cannot prove termination; try supplying a decreases clause (note that calls cannot be co-recursive in this context) +ExpandedGuardednessNeg.dfy(8,27): Error: decreases expression must be bounded below by 0 ExpandedGuardednessNeg.dfy(6,20): Related location: this proposition could not be proved -ExpandedGuardednessNeg.dfy(13,16): Error: cannot prove termination; try supplying a decreases clause -ExpandedGuardednessNeg.dfy(13,16): Error: decreases expression must be bounded below by 0 +ExpandedGuardednessNeg.dfy(13,27): Error: cannot prove termination; try supplying a decreases clause +ExpandedGuardednessNeg.dfy(13,27): Error: decreases expression must be bounded below by 0 ExpandedGuardednessNeg.dfy(11,27): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 4 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Regression8.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Regression8.dfy.expect index 0247b19adbd..cd90a425a91 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Regression8.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/Regression8.dfy.expect @@ -1,4 +1,4 @@ -Regression8.dfy(14,16): Error: function precondition could not be proved +Regression8.dfy(14,17): Error: function precondition could not be proved Regression8.dfy(5,13): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue149.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue149.dfy.expect index f23145570c5..b16d937185a 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue149.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue149.dfy.expect @@ -1,4 +1,4 @@ git-issue149.dfy(8,28): Error: the type of this variable is underspecified -git-issue149.dfy(8,33): Error: type parameter 'T' (inferred to be '?') in the function call to 'Foo' could not be determined +git-issue149.dfy(8,36): Error: type parameter 'T' (inferred to be '?') in the function call to 'Foo' could not be determined git-issue149.dfy(8,19): Error: type of bound variable 'm' could not be determined; please specify the type explicitly 3 resolution/type errors detected in git-issue149.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue23.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue23.dfy.expect index 522bd4a1bae..ccbb03eb50b 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue23.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny4/git-issue23.dfy.expect @@ -1,4 +1,4 @@ -git-issue23.dfy(14,11): Error: function precondition could not be proved -git-issue23.dfy(10,13): Related location: this proposition could not be proved +git-issue23.dfy(14,22): Error: function precondition could not be proved +git-issue23.dfy(10,22): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/parser_combinators.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/parser_combinators.dfy.expect index 0e95cee245b..696866c1d45 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/parser_combinators.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/parser_combinators.dfy.expect @@ -1,5 +1,5 @@ parser_combinators.dfy(38,27): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. -parser_combinators.dfy(39,33): Error: cannot prove termination; try supplying a decreases clause +parser_combinators.dfy(39,35): Error: cannot prove termination; try supplying a decreases clause Dafny program verifier finished with 8 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/exceptions/TypecheckErrors.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/exceptions/TypecheckErrors.dfy.expect index 62e9e41df03..13d5abc7d42 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/exceptions/TypecheckErrors.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/exceptions/TypecheckErrors.dfy.expect @@ -1,10 +1,10 @@ -TypecheckErrors.dfy(7,28): Error: incorrect argument type for method in-parameter 'n' (expected nat, found string) -TypecheckErrors.dfy(8,28): Error: incorrect argument type for method in-parameter 'n' (expected nat, found string) +TypecheckErrors.dfy(7,29): Error: incorrect argument type for method in-parameter 'n' (expected nat, found string) +TypecheckErrors.dfy(8,29): Error: incorrect argument type for method in-parameter 'n' (expected nat, found string) TypecheckErrors.dfy(39,10): Error: member IsFailure does not exist in BadOutcome1?, in :- statement TypecheckErrors.dfy(43,10): Error: member 'PropagateFailure' does not exist in trait 'BadOutcome2' TypecheckErrors.dfy(43,10): Error: The right-hand side of ':-', which is of type 'BadOutcome2?', must have functions 'IsFailure()', 'PropagateFailure()', and 'Extract()' TypecheckErrors.dfy(47,10): Error: number of lhs (1) must be one less than number of rhs (1) for a rhs type (BadOutcome3?) without member Extract -TypecheckErrors.dfy(51,22): Error: incorrect argument type for method in-parameter 'msg' (expected string, found int) +TypecheckErrors.dfy(51,23): Error: incorrect argument type for method in-parameter 'msg' (expected string, found int) TypecheckErrors.dfy(71,4): Error: member IsFailure does not exist in BadVoidOutcome1?, in :- statement TypecheckErrors.dfy(75,4): Error: member 'PropagateFailure' does not exist in trait 'BadVoidOutcome2' TypecheckErrors.dfy(75,4): Error: The right-hand side of ':-', which is of type 'BadVoidOutcome2?', must have functions 'IsFailure()' and 'PropagateFailure()', but not 'Extract()' diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/exports/OpaqueFunctions.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/exports/OpaqueFunctions.dfy.expect index 8c7c7f11ac5..ecac718e52d 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/exports/OpaqueFunctions.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/exports/OpaqueFunctions.dfy.expect @@ -1,4 +1,4 @@ -OpaqueFunctions.dfy(18,4): Error: a postcondition could not be proved on this return path +OpaqueFunctions.dfy(18,5): Error: a postcondition could not be proved on this return path OpaqueFunctions.dfy(17,14): Related location: this is the postcondition that could not be proved OpaqueFunctions.dfy(58,2): Error: a postcondition could not be proved on this return path OpaqueFunctions.dfy(57,16): Related location: this is the postcondition that could not be proved diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1127.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1127.dfy.expect index 2a2e1bfda66..20cd4ba1fc1 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1127.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1127.dfy.expect @@ -1,3 +1,3 @@ -git-issue-1127.dfy(15,7): Error: type parameter (T) passed to function Func must be nonempty (got PossiblyEmpty) -git-issue-1127.dfy(29,17): Error: type parameter (T) passed to function GetInhabitant must support auto-initialization (got EmptyInt) +git-issue-1127.dfy(15,26): Error: type parameter (T) passed to function Func must be nonempty (got PossiblyEmpty) +git-issue-1127.dfy(29,40): Error: type parameter (T) passed to function GetInhabitant must support auto-initialization (got EmptyInt) 2 resolution/type errors detected in git-issue-1127.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1637.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1637.dfy.expect index 60f35b398d3..ff37b311dbe 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1637.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1637.dfy.expect @@ -1,2 +1,2 @@ -git-issue-1637.dfy(19,5): Error: incorrect argument type for predicate parameter 'f' (expected Thing -> seq, found Thing -> Fii) (covariance for type parameter at index 1 expects seq :> Fii) +git-issue-1637.dfy(19,6): Error: incorrect argument type for predicate parameter 'f' (expected Thing -> seq, found Thing -> Fii) (covariance for type parameter at index 1 expects seq :> Fii) 1 resolution/type errors detected in git-issue-1637.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1700.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1700.dfy.expect index 84aa011805b..59ad783761b 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1700.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1700.dfy.expect @@ -1,2 +1,2 @@ -git-issue-1700.dfy(15,13): Error: incorrect argument type for datatype constructor parameter 'e' (expected B.E, found A.E) +git-issue-1700.dfy(15,21): Error: incorrect argument type for datatype constructor parameter 'e' (expected B.E, found A.E) 1 resolution/type errors detected in git-issue-1700.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-181.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-181.dfy.expect index 8919941cac0..eab0b7208ea 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-181.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-181.dfy.expect @@ -4,5 +4,5 @@ git-issue-181.dfy(13,10): Error: type parameter (T) passed to type ResultN must git-issue-181.dfy(15,10): Error: type parameter (T) passed to type ResultN must contain no references (got array) git-issue-181.dfy(22,13): Error: type parameter (T) passed to type D must support equality (got int -> int) git-issue-181.dfy(23,13): Error: type parameter (T) passed to type D must support equality (got E) -git-issue-181.dfy(53,11): Error: type parameter (T) passed to function gg must support equality (got T) (perhaps try declaring type parameter 'T' on line 50 as 'T(==)', which says it can only be instantiated with a type that supports equality) +git-issue-181.dfy(53,13): Error: type parameter (T) passed to function gg must support equality (got T) (perhaps try declaring type parameter 'T' on line 50 as 'T(==)', which says it can only be instantiated with a type that supports equality) 5 resolution/type errors detected in git-issue-181.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1958.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1958.dfy.expect index 7b3eb340bf6..071dcbfdc85 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1958.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1958.dfy.expect @@ -2,17 +2,17 @@ git-issue-1958.dfy(13,16): Error: value does not satisfy the subset constraints git-issue-1958.dfy(18,16): Error: value does not satisfy the subset constraints of 'R' git-issue-1958.dfy(32,4): Error: value does not satisfy the subset constraints of 'R' git-issue-1958.dfy(36,4): Error: value does not satisfy the subset constraints of 'R' -git-issue-1958.dfy(56,16): Error: function precondition could not be proved +git-issue-1958.dfy(56,20): Error: function precondition could not be proved git-issue-1958.dfy(49,13): Related location: this proposition could not be proved -git-issue-1958.dfy(61,4): Error: function precondition could not be proved +git-issue-1958.dfy(61,8): Error: function precondition could not be proved git-issue-1958.dfy(49,13): Related location: this proposition could not be proved -git-issue-1958.dfy(65,4): Error: function precondition could not be proved +git-issue-1958.dfy(65,8): Error: function precondition could not be proved git-issue-1958.dfy(49,13): Related location: this proposition could not be proved -git-issue-1958.dfy(70,9): Error: function precondition could not be proved +git-issue-1958.dfy(70,13): Error: function precondition could not be proved git-issue-1958.dfy(49,13): Related location: this proposition could not be proved git-issue-1958.dfy(77,13): Error: cannot establish the existence of LHS values that satisfy the such-that predicate git-issue-1958.dfy(81,4): Error: cannot establish the existence of LHS values that satisfy the such-that predicate -git-issue-1958.dfy(104,16): Error: function precondition could not be proved +git-issue-1958.dfy(104,20): Error: function precondition could not be proved git-issue-1958.dfy(97,13): Related location: this proposition could not be proved git-issue-1958.dfy(167,7): Error: index out of range diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19a.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19a.dfy.expect index 145a8ac9d07..e9b9efd2dc2 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19a.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19a.dfy.expect @@ -1,3 +1,3 @@ git-issue-19a.dfy(12,30): Error: a forall expression involved in a predicate definition is not allowed to depend on the set of allocated references, but values of 'x' (of type 'T') may contain references (perhaps declare its type as 'T(!new)') (see documentation for 'older' parameters) -git-issue-19a.dfy(54,11): Error: type parameter (T) passed to predicate AllP must contain no references (got C) +git-issue-19a.dfy(54,18): Error: type parameter (T) passed to predicate AllP must contain no references (got C) 2 resolution/type errors detected in git-issue-19a.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2197.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2197.dfy.expect index bfc60aace72..21d657afeb1 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2197.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2197.dfy.expect @@ -3,7 +3,7 @@ git-issue-2197.dfy(11,0): Error: a postcondition could not be proved on this ret 11 | { | ^ -git-issue-2197.dfy(10,10): Related location: this is the postcondition that could not be proved +git-issue-2197.dfy(10,14): Related location: this is the postcondition that could not be proved | 10 | ensures Test(y) | ^^^^^^^ diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211.dfy.expect index 05f2c7d600e..9124309709c 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211.dfy.expect @@ -1,5 +1,5 @@ git-issue-2211.dfy(17,0): Error: a postcondition could not be proved on this return path -git-issue-2211.dfy(16,10): Related location: this is the postcondition that could not be proved +git-issue-2211.dfy(16,11): Related location: this is the postcondition that could not be proved git-issue-2211.dfy(8,2): Related location: this proposition could not be proved Dafny program verifier finished with 2 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211a.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211a.dfy.expect index 9736327b4ef..a1772e35bc1 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211a.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211a.dfy.expect @@ -1,5 +1,5 @@ git-issue-2211a.dfy(18,0): Error: a postcondition could not be proved on this return path -git-issue-2211a.dfy(17,10): Related location: this is the postcondition that could not be proved +git-issue-2211a.dfy(17,11): Related location: this is the postcondition that could not be proved git-issue-2211a.dfy(9,2): Related location: this proposition could not be proved Dafny program verifier finished with 2 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2299.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2299.dfy.expect index 2bb07b70a75..45b46e76c15 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2299.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2299.dfy.expect @@ -1,19 +1,19 @@ -git-issue-2299.dfy(37,11): Error: assertion might not hold +git-issue-2299.dfy(37,21): Error: assertion might not hold git-issue-2299.dfy(10,11): Related location: this proposition could not be proved -git-issue-2299.dfy(48,11): Error: assertion might not hold +git-issue-2299.dfy(48,21): Error: assertion might not hold git-issue-2299.dfy(16,4): Related location: this proposition could not be proved -git-issue-2299.dfy(58,11): Error: assertion might not hold +git-issue-2299.dfy(58,20): Error: assertion might not hold git-issue-2299.dfy(21,4): Related location: this proposition could not be proved -git-issue-2299.dfy(67,13): Error: assertion might not hold +git-issue-2299.dfy(67,22): Error: assertion might not hold git-issue-2299.dfy(21,4): Related location: this proposition could not be proved -git-issue-2299.dfy(81,11): Error: assertion might not hold -git-issue-2299.dfy(27,4): Related location: this proposition could not be proved +git-issue-2299.dfy(81,16): Error: assertion might not hold +git-issue-2299.dfy(27,12): Related location: this proposition could not be proved git-issue-2299.dfy(10,11): Related location: this proposition could not be proved -git-issue-2299.dfy(81,11): Error: assertion might not hold -git-issue-2299.dfy(27,18): Related location: this proposition could not be proved +git-issue-2299.dfy(81,16): Error: assertion might not hold +git-issue-2299.dfy(27,26): Related location: this proposition could not be proved git-issue-2299.dfy(16,4): Related location: this proposition could not be proved -git-issue-2299.dfy(81,11): Error: assertion might not hold -git-issue-2299.dfy(27,32): Related location: this proposition could not be proved +git-issue-2299.dfy(81,16): Error: assertion might not hold +git-issue-2299.dfy(27,39): Related location: this proposition could not be proved git-issue-2299.dfy(21,4): Related location: this proposition could not be proved Dafny program verifier finished with 7 verified, 7 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2301.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2301.dfy.expect index cd266ff622d..ea026313873 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2301.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2301.dfy.expect @@ -1,5 +1,5 @@ git-issue-2301.dfy(15,14): Error: insufficient reads clause to read state of 'unchanged' object -git-issue-2301.dfy(23,11): Error: assertion might not hold +git-issue-2301.dfy(23,29): Error: assertion might not hold git-issue-2301.dfy(10,4): Related location: this proposition could not be proved git-issue-2301.dfy(39,6): Error: insufficient reads clause to read state of 'unchanged' object git-issue-2301.dfy(40,6): Error: insufficient reads clause to read state of 'unchanged' object diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2506.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2506.dfy.expect index 36697ad7114..3c62971e838 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2506.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2506.dfy.expect @@ -1,17 +1,17 @@ git-issue-2506.dfy(6,17): Error: const definition contains a cycle: T.a -> T.b -> T.a -git-issue-2506.dfy(10,33): Error: a recursive call from a least predicate can go only to other least predicates -git-issue-2506.dfy(13,41): Error: a least predicate can be called recursively only in positive positions +git-issue-2506.dfy(10,34): Error: a recursive call from a least predicate can go only to other least predicates +git-issue-2506.dfy(13,49): Error: a least predicate can be called recursively only in positive positions git-issue-2506.dfy(15,45): Error: a least predicate is not allowed to declare any ensures clause git-issue-2506.dfy(27,17): Error: const definition contains a cycle: T.a -> T.b -> T.a -git-issue-2506.dfy(31,33): Error: a recursive call from a least predicate can go only to other least predicates -git-issue-2506.dfy(34,41): Error: a least predicate can be called recursively only in positive positions +git-issue-2506.dfy(31,34): Error: a recursive call from a least predicate can go only to other least predicates +git-issue-2506.dfy(34,49): Error: a least predicate can be called recursively only in positive positions git-issue-2506.dfy(36,45): Error: a least predicate is not allowed to declare any ensures clause git-issue-2506.dfy(48,17): Error: const definition contains a cycle: T.a -> T.b -> T.a -git-issue-2506.dfy(52,33): Error: a recursive call from a least predicate can go only to other least predicates -git-issue-2506.dfy(55,41): Error: a least predicate can be called recursively only in positive positions +git-issue-2506.dfy(52,34): Error: a recursive call from a least predicate can go only to other least predicates +git-issue-2506.dfy(55,49): Error: a least predicate can be called recursively only in positive positions git-issue-2506.dfy(57,45): Error: a least predicate is not allowed to declare any ensures clause git-issue-2506.dfy(69,17): Error: const definition contains a cycle: T.a -> T.b -> T.a -git-issue-2506.dfy(73,33): Error: a recursive call from a least predicate can go only to other least predicates -git-issue-2506.dfy(76,41): Error: a least predicate can be called recursively only in positive positions +git-issue-2506.dfy(73,34): Error: a recursive call from a least predicate can go only to other least predicates +git-issue-2506.dfy(76,49): Error: a least predicate can be called recursively only in positive positions git-issue-2506.dfy(78,45): Error: a least predicate is not allowed to declare any ensures clause 16 resolution/type errors detected in git-issue-2506.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2693.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2693.dfy.expect index b6a2407c6b7..03944411c2d 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2693.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2693.dfy.expect @@ -1,7 +1,7 @@ git-issue-2693.dfy(10,10): Warning: Support for member 'PropagateFailure' in type 'EvenGood_OddBad?' (used indirectly via a :- statement) being a method is deprecated; declare it to be a function instead git-issue-2693.dfy(10,10): Warning: Support for member 'Extract' in type 'EvenGood_OddBad?' (used indirectly via a :- statement) being a method is deprecated; declare it to be a function instead git-issue-2693.dfy(10,10): Error: a postcondition could not be proved on this return path -git-issue-2693.dfy(6,37): Related location: this is the postcondition that could not be proved +git-issue-2693.dfy(6,46): Related location: this is the postcondition that could not be proved git-issue-2693.dfy(21,12): Related location: this proposition could not be proved git-issue-2693.dfy(11,4): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829.dfy.expect index e0dacc8644a..c3f63c571f5 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829.dfy.expect @@ -2,6 +2,6 @@ git-issue-2829.dfy(52,38): Error: second argument to "in" must be a set, multise git-issue-2829.dfy(53,23): Error: type of + must be of a numeric type, a bitvector type, ORDINAL, char, a sequence type, or a set-like or map-like type (instead got A) git-issue-2829.dfy(53,15): Error: arguments must have comparable types (got string and A) git-issue-2829.dfy(54,16): Error: arguments must have comparable types (got seq and seq) -git-issue-2829.dfy(56,18): Error: incorrect argument type at index 2 for function parameter 'input' (expected string, found A) -git-issue-2829.dfy(56,18): Error: incorrect argument type at index 3 for function parameter 'output' (expected seq, found seq) (covariant type parameter would require string <: A) +git-issue-2829.dfy(56,31): Error: incorrect argument type at index 2 for function parameter 'input' (expected string, found A) +git-issue-2829.dfy(56,37): Error: incorrect argument type at index 3 for function parameter 'output' (expected seq, found seq) (covariant type parameter would require string <: A) 6 resolution/type errors detected in git-issue-2829.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-370.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-370.dfy.expect index cac47f16163..e513f9a936d 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-370.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-370.dfy.expect @@ -1,5 +1,5 @@ git-issue-370.dfy(48,0): Error: a postcondition could not be proved on this return path -git-issue-370.dfy(46,7): Related location: this is the postcondition that could not be proved -git-issue-370.dfy(22,5): Related location: this proposition could not be proved +git-issue-370.dfy(46,17): Related location: this is the postcondition that could not be proved +git-issue-370.dfy(22,6): Related location: this proposition could not be proved Dafny program verifier finished with 1 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719.dfy.expect index 33250c5106b..bbceecbdce7 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719.dfy.expect @@ -1,4 +1,4 @@ -git-issue-3719.dfy(12,9): Error: assertion might not hold +git-issue-3719.dfy(12,18): Error: assertion might not hold git-issue-3719.dfy(7,37): Related location: this proposition could not be proved Dafny program verifier finished with 3 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-484.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-484.dfy.expect index 350b1047787..da23d432306 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-484.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-484.dfy.expect @@ -1,6 +1,6 @@ git-issue-484.dfy(10,6): Error: type of corresponding source/RHS (int) does not match type of bound variable (MyInt) git-issue-484.dfy(19,6): Error: type of corresponding source/RHS (real) does not match type of bound variable (MyInt) -git-issue-484.dfy(23,2): Error: incorrect argument type for datatype constructor parameter 'b' (expected MyInt, found int) +git-issue-484.dfy(23,6): Error: incorrect argument type for datatype constructor parameter 'b' (expected MyInt, found int) git-issue-484.dfy(34,6): Error: type of corresponding source/RHS (int) does not match type of bound variable (byte) -git-issue-484.dfy(40,2): Error: incorrect argument type for datatype constructor parameter 'b' (expected byte, found int) +git-issue-484.dfy(40,6): Error: incorrect argument type for datatype constructor parameter 'b' (expected byte, found int) 5 resolution/type errors detected in git-issue-484.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4926.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4926.dfy.expect index 62e31f8cfad..85866c843b1 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4926.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4926.dfy.expect @@ -1,39 +1,39 @@ -git-issue-4926.dfy(16,12): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(17,12): Error: type parameter (A) passed to function G must support auto-initialization (got Cell) -git-issue-4926.dfy(18,12): Error: type parameter (A) passed to function H must be nonempty (got Cell) -git-issue-4926.dfy(21,14): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(22,14): Error: type parameter (A) passed to function G must support auto-initialization (got Nonempty) -git-issue-4926.dfy(24,14): Error: type parameter (A) passed to function J must support equality (got Record) -git-issue-4926.dfy(25,20): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(32,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(33,16): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(34,12): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(35,14): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(38,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(39,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(40,12): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(41,14): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(52,38): Error: type parameter (A) passed to function J must support equality (got Record) +git-issue-4926.dfy(16,19): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(17,19): Error: type parameter (A) passed to function G must support auto-initialization (got Cell) +git-issue-4926.dfy(18,19): Error: type parameter (A) passed to function H must be nonempty (got Cell) +git-issue-4926.dfy(21,21): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(22,25): Error: type parameter (A) passed to function G must support auto-initialization (got Nonempty) +git-issue-4926.dfy(24,23): Error: type parameter (A) passed to function J must support equality (got Record) +git-issue-4926.dfy(25,27): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(32,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(33,23): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(34,19): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(35,21): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(38,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(39,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(40,19): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(41,21): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(52,47): Error: type parameter (A) passed to function J must support equality (got Record) git-issue-4926.dfy(60,42): Error: type parameter (A) passed to type Cmp must support equality (got Record) git-issue-4926.dfy(61,40): Error: type parameter (A) passed to type Cmp must support equality (got Record) -git-issue-4926.dfy(44,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(46,16): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(49,12): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(50,14): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(45,19): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(47,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(48,18): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(44,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(47,13): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(46,16): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(50,14): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(45,19): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(48,18): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(49,12): Error: type parameter (A) passed to function F must contain no references (got Cell) -git-issue-4926.dfy(56,22): Error: type parameter (A) passed to function J must support equality (got Record) -git-issue-4926.dfy(73,12): Error: type parameter (A) passed to greatest predicate Bisimilar must contain no references (got A) (perhaps try declaring type parameter 'A' on line 72 as 'A(!new)', which says it can only be instantiated with a type that contains no references) -git-issue-4926.dfy(85,12): Error: type parameter (A) passed to greatest predicate Bisimilar must contain no references (got Class) +git-issue-4926.dfy(44,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(46,23): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(49,19): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(50,21): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(45,26): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(47,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(48,25): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(44,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(47,20): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(46,23): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(50,21): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(45,26): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(48,25): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(49,19): Error: type parameter (A) passed to function F must contain no references (got Cell) +git-issue-4926.dfy(56,31): Error: type parameter (A) passed to function J must support equality (got Record) +git-issue-4926.dfy(73,24): Error: type parameter (A) passed to greatest predicate Bisimilar must contain no references (got A) (perhaps try declaring type parameter 'A' on line 72 as 'A(!new)', which says it can only be instantiated with a type that contains no references) +git-issue-4926.dfy(85,28): Error: type parameter (A) passed to greatest predicate Bisimilar must contain no references (got Class) git-issue-4926.dfy(87,31): Error: type parameter (A) passed to greatest lemma SelfSimilarCorrected must contain no references (got Class) -git-issue-4926.dfy(91,12): Error: type parameter (A) passed to prefix predicate Bisimilar# must contain no references (got Class) +git-issue-4926.dfy(91,32): Error: type parameter (A) passed to prefix predicate Bisimilar# must contain no references (got Class) git-issue-4926.dfy(93,35): Error: type parameter (A) passed to prefix lemma SelfSimilarCorrected# must contain no references (got Class) 38 resolution/type errors detected in git-issue-4926.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4939a.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4939a.dfy.expect index 5ec3e0aa53f..7526628ac4a 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4939a.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4939a.dfy.expect @@ -3,11 +3,11 @@ git-issue-4939a.dfy(142,11): Warning: because of cyclic dependencies among const git-issue-4939a.dfy(144,11): Warning: because of cyclic dependencies among constructor argument types, no instances of datatype 'Mutual' can be constructed git-issue-4939a.dfy(145,11): Warning: because of cyclic dependencies among constructor argument types, no instances of datatype 'Nutual' can be constructed git-issue-4939a.dfy(25,32): Error: cannot prove termination; try supplying a decreases clause -git-issue-4939a.dfy(68,12): Error: cannot prove termination; try supplying a decreases clause -git-issue-4939a.dfy(68,12): Error: decreases expression must be bounded below by 0 +git-issue-4939a.dfy(68,21): Error: cannot prove termination; try supplying a decreases clause +git-issue-4939a.dfy(68,21): Error: decreases expression must be bounded below by 0 git-issue-4939a.dfy(67,23): Related location: this proposition could not be proved -git-issue-4939a.dfy(105,27): Error: cannot prove termination; try supplying a decreases clause -git-issue-4939a.dfy(105,27): Error: decreases expression must be bounded below by 0 +git-issue-4939a.dfy(105,36): Error: cannot prove termination; try supplying a decreases clause +git-issue-4939a.dfy(105,36): Error: decreases expression must be bounded below by 0 git-issue-4939a.dfy(104,23): Related location: this proposition could not be proved Dafny program verifier finished with 12 verified, 5 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-551.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-551.dfy.expect index a21f3686e77..6e9fc4bc7f0 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-551.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-551.dfy.expect @@ -1,2 +1,2 @@ -git-issue-551.dfy(27,15): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) +git-issue-551.dfy(27,26): Error: a call to a ghost predicate is allowed only in specification contexts (consider declaring the predicate without the 'ghost' keyword) 1 resolution/type errors detected in git-issue-551.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.dfy.expect index 4f50ec8af07..702ffec04b3 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5586.dfy.expect @@ -1,4 +1,4 @@ -git-issue-5586.dfy(14,9): Error: assertion might not hold +git-issue-5586.dfy(14,10): Error: assertion might not hold git-issue-5586.dfy(10,4): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-615.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-615.dfy.expect index 44592500154..8093a4505e9 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-615.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-615.dfy.expect @@ -1,4 +1,4 @@ -git-issue-615.dfy(13,35): Error: insufficient reads clause to invoke function -git-issue-615.dfy(24,13): Error: insufficient reads clause to invoke function +git-issue-615.dfy(13,42): Error: insufficient reads clause to invoke function +git-issue-615.dfy(24,14): Error: insufficient reads clause to invoke function Dafny program verifier finished with 3 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-750.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-750.dfy.expect index e49654c388a..0abc7cf1da9 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-750.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-750.dfy.expect @@ -1,5 +1,5 @@ git-issue-750.dfy(8,4): Error: RHS (of type array) not assignable to LHS (of type array) (nonvariance for type parameter expects int = nat) git-issue-750.dfy(9,4): Error: RHS (of type array) not assignable to LHS (of type array) (nonvariance for type parameter expects nat = int) -git-issue-750.dfy(10,4): Error: incorrect argument type at index 0 for method in-parameter 'x' (expected array, found array) (nonvariance for type parameter expects nat = int) -git-issue-750.dfy(10,4): Error: incorrect argument type at index 1 for method in-parameter 'y' (expected array, found array) (nonvariance for type parameter expects int = nat) +git-issue-750.dfy(10,5): Error: incorrect argument type at index 0 for method in-parameter 'x' (expected array, found array) (nonvariance for type parameter expects nat = int) +git-issue-750.dfy(10,8): Error: incorrect argument type at index 1 for method in-parameter 'y' (expected array, found array) (nonvariance for type parameter expects int = nat) 4 resolution/type errors detected in git-issue-750.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-847.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-847.dfy.expect index af8bbdd3886..d39065e6bb5 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-847.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-847.dfy.expect @@ -1,4 +1,4 @@ -git-issue-847.dfy(40,39): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -git-issue-847.dfy(40,49): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas -git-issue-847.dfy(41,14): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +git-issue-847.dfy(40,44): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +git-issue-847.dfy(40,54): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas +git-issue-847.dfy(41,19): Error: a recursive call from a greatest lemma can go only to other greatest lemmas and prefix lemmas 3 resolution/type errors detected in git-issue-847.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-977.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-977.dfy.expect index dd5f009d9ff..b916d6d74aa 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-977.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-977.dfy.expect @@ -5,8 +5,8 @@ git-issue-977.dfy(237,36): Info: _k: ORDINAL git-issue-977.dfy(239,15): Info: Pos#[_k] git-issue-977.dfy(237,36): Info: Theorem2# with focal predicate Pos git-issue-977.dfy(241,4): Info: Theorem2#[_k - 1] -git-issue-977.dfy(229,13): Info: co-recursive call -git-issue-977.dfy(234,18): Info: Pos#[_k - 1] +git-issue-977.dfy(229,20): Info: co-recursive call +git-issue-977.dfy(234,21): Info: Pos#[_k - 1] git-issue-977.dfy(217,13): Info: Selected triggers: {AAA#[k](t)} git-issue-977.dfy(227,17): Info: decreases 1, n git-issue-977.dfy(237,36): Info: Theorem2# decreases _k, n @@ -16,8 +16,8 @@ git-issue-977.dfy(84,16): Info: tail recursive git-issue-977.dfy(95,19): Info: tail recursive git-issue-977.dfy(113,19): Info: tail recursive git-issue-977.dfy(146,16): Info: tail recursive -git-issue-977.dfy(97,21): Info: GreatestPredOrd#[_k - 1] -git-issue-977.dfy(115,21): Info: GreatestPredNat#[_k - 1] +git-issue-977.dfy(97,36): Info: GreatestPredOrd#[_k - 1] +git-issue-977.dfy(115,36): Info: GreatestPredNat#[_k - 1] git-issue-977.dfy(71,4): Info: Selected triggers: {RicochetOrd(m, num)}, {GreatestManualOrd(m, num)}, {GreatestPredOrd#[m](num)}, {m < k} git-issue-977.dfy(138,4): Info: Selected triggers: @@ -42,18 +42,18 @@ git-issue-977.dfy(77,6): Info: {:inductionTrigger RicochetNat(k, num)} git-issue-977.dfy(71,4): Info: ensures GreatestPredOrd#[m](num) git-issue-977.dfy(71,4): Info: ensures GreatestManualOrd(m, num) git-issue-977.dfy(71,4): Info: ensures RicochetOrd(m, num) -git-issue-977.dfy(110,9): Info: Some instances of this call are not inlined. -git-issue-977.dfy(143,9): Info: Some instances of this call are not inlined. -git-issue-977.dfy(162,2): Info: Some instances of this call are not inlined. -git-issue-977.dfy(39,11): Error: assertion might not hold -git-issue-977.dfy(14,20): Related location: this proposition could not be proved +git-issue-977.dfy(110,28): Info: Some instances of this call are not inlined. +git-issue-977.dfy(143,26): Info: Some instances of this call are not inlined. +git-issue-977.dfy(162,21): Info: Some instances of this call are not inlined. +git-issue-977.dfy(39,25): Error: assertion might not hold +git-issue-977.dfy(14,29): Related location: this proposition could not be proved git-issue-977.dfy(9,7): Related location: this proposition could not be proved -git-issue-977.dfy(41,11): Error: assertion might not hold -git-issue-977.dfy(22,4): Related location: this proposition could not be proved +git-issue-977.dfy(41,31): Error: assertion might not hold +git-issue-977.dfy(22,13): Related location: this proposition could not be proved git-issue-977.dfy(9,7): Related location: this proposition could not be proved -git-issue-977.dfy(43,11): Error: assertion might not hold -git-issue-977.dfy(30,20): Related location: this proposition could not be proved +git-issue-977.dfy(43,26): Error: assertion might not hold +git-issue-977.dfy(30,29): Related location: this proposition could not be proved git-issue-977.dfy(9,7): Related location: this proposition could not be proved -git-issue-977.dfy(220,11): Info: Some instances of this call are not inlined. +git-issue-977.dfy(220,18): Info: Some instances of this call are not inlined. Dafny program verifier finished with 20 verified, 3 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Classes.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Classes.dfy.expect index d72be90dc15..067d7a0f32f 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Classes.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Classes.dfy.expect @@ -1,4 +1,4 @@ -Classes.dfy(33,12): Error: function precondition could not be proved +Classes.dfy(33,17): Error: function precondition could not be proved Classes.dfy(60,2): Error: assertion might not hold Dafny program verifier finished with 4 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Frame.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Frame.dfy.expect index 27022df616d..8621a4760df 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Frame.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Frame.dfy.expect @@ -3,7 +3,7 @@ Frame.dfy(37,2): Error: assertion might not hold Frame.dfy(63,4): Error: assertion might not hold Frame.dfy(66,18): Error: insufficient reads clause to read array element; Consider extracting a[0] to a local variable before the lambda expression, or adding 'reads a' in the enclosing lambda specification for resolution Frame.dfy(68,27): Error: insufficient reads clause to read array element; Consider adding 'reads a' in the enclosing lambda specification for resolution -Frame.dfy(120,17): Error: function precondition could not be proved +Frame.dfy(120,22): Error: function precondition could not be proved Frame.dfy(123,6): Error: assertion might not hold Dafny program verifier finished with 6 verified, 7 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Naked.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Naked.dfy.expect index e023742658d..59e7e9af64b 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Naked.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/Naked.dfy.expect @@ -3,12 +3,12 @@ Naked.dfy(12,7): Error: cannot use naked function in recursive setting. Possible Naked.dfy(17,58): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(22,14): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(26,15): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. -Naked.dfy(30,50): Error: function precondition could not be proved +Naked.dfy(30,51): Error: function precondition could not be proved Naked.dfy(32,13): Related location: this proposition could not be proved Naked.dfy(32,14): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(38,10): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(42,11): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. -Naked.dfy(46,4): Error: cannot prove termination; try supplying a decreases clause +Naked.dfy(46,5): Error: cannot prove termination; try supplying a decreases clause Naked.dfy(49,10): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(56,12): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. Naked.dfy(60,13): Error: cannot use naked function in recursive setting. Possible solution: eta expansion. diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReads.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReads.dfy.expect index 4ce74cb012e..7f67349bb47 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReads.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReads.dfy.expect @@ -1,10 +1,10 @@ -ReadsReads.dfy(35,6): Error: function precondition could not be proved -ReadsReads.dfy(35,6): Error: insufficient reads clause to invoke function +ReadsReads.dfy(35,11): Error: function precondition could not be proved +ReadsReads.dfy(35,11): Error: insufficient reads clause to invoke function ReadsReads.dfy(40,4): Error: function precondition could not be proved ReadsReads.dfy(40,4): Error: insufficient reads clause to invoke function -ReadsReads.dfy(52,11): Error: function precondition could not be proved -ReadsReads.dfy(52,11): Error: insufficient reads clause to invoke function -ReadsReads.dfy(64,6): Error: insufficient reads clause to invoke function +ReadsReads.dfy(52,16): Error: function precondition could not be proved +ReadsReads.dfy(52,16): Error: insufficient reads clause to invoke function +ReadsReads.dfy(64,14): Error: insufficient reads clause to invoke function ReadsReads.dfy(93,18): Error: assertion might not hold ReadsReads.dfy(95,18): Error: assertion might not hold ReadsReads.dfy(105,18): Error: assertion might not hold diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReadsOnMethods.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReadsOnMethods.dfy.expect index 3fc0c239b47..9451b494e11 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReadsOnMethods.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ReadsReadsOnMethods.dfy.expect @@ -1,9 +1,9 @@ -ReadsReadsOnMethods.dfy(37,11): Error: function precondition could not be proved -ReadsReadsOnMethods.dfy(37,11): Error: insufficient reads clause to invoke function +ReadsReadsOnMethods.dfy(37,16): Error: function precondition could not be proved +ReadsReadsOnMethods.dfy(37,16): Error: insufficient reads clause to invoke function ReadsReadsOnMethods.dfy(43,9): Error: function precondition could not be proved ReadsReadsOnMethods.dfy(43,9): Error: insufficient reads clause to invoke function -ReadsReadsOnMethods.dfy(55,16): Error: function precondition could not be proved -ReadsReadsOnMethods.dfy(55,16): Error: insufficient reads clause to invoke function -ReadsReadsOnMethods.dfy(67,11): Error: insufficient reads clause to invoke function +ReadsReadsOnMethods.dfy(55,21): Error: function precondition could not be proved +ReadsReadsOnMethods.dfy(55,21): Error: insufficient reads clause to invoke function +ReadsReadsOnMethods.dfy(67,19): Error: insufficient reads clause to invoke function Dafny program verifier finished with 20 verified, 7 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ResolveError.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ResolveError.dfy.expect index e18c002572f..7379abb83e0 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ResolveError.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/hofs/ResolveError.dfy.expect @@ -5,9 +5,9 @@ ResolveError.dfy(32,12): Error: wrong number of arguments (got 2, but function t ResolveError.dfy(36,21): Error: wrong number of arguments (got 2, but function 'requires' expects 1: (x0: T0)) ResolveError.dfy(39,18): Error: wrong number of arguments (got 2, but function 'reads' expects 1: (x0: T0)) ResolveError.dfy(31,16): Error: arguments must have comparable types (got int and bool) -ResolveError.dfy(33,12): Error: incorrect argument type for function application parameter (expected int, found bool) -ResolveError.dfy(34,21): Error: incorrect argument type for function parameter 'x0' (expected int, found bool) -ResolveError.dfy(37,18): Error: incorrect argument type for function parameter 'x0' (expected int, found bool) +ResolveError.dfy(33,13): Error: incorrect argument type for function application parameter (expected int, found bool) +ResolveError.dfy(34,22): Error: incorrect argument type for function parameter 'x0' (expected int, found bool) +ResolveError.dfy(37,19): Error: incorrect argument type for function parameter 'x0' (expected int, found bool) ResolveError.dfy(35,25): Error: arguments must have comparable types (got bool and int) ResolveError.dfy(38,22): Error: arguments must have comparable types (got set and int) ResolveError.dfy(47,18): Error: Precondition must be boolean (got int) @@ -19,5 +19,5 @@ ResolveError.dfy(68,24): Error: unresolved identifier: _ ResolveError.dfy(86,6): Error: RHS (of type ((int, bool)) -> real) not assignable to LHS (of type (int, bool) -> real) ResolveError.dfy(101,6): Error: RHS (of type (()) -> real) not assignable to LHS (of type () -> real) ResolveError.dfy(102,6): Error: RHS (of type () -> real) not assignable to LHS (of type (()) -> real) -ResolveError.dfy(91,15): Error: incorrect argument type at index 0 for method in-parameter 'r' (expected int -> ?, found (int, bool) -> real) +ResolveError.dfy(91,16): Error: incorrect argument type at index 0 for method in-parameter 'r' (expected int -> ?, found (int, bool) -> real) 22 resolution/type errors detected in ResolveError.dfy diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/logger/ByProofRefactoring.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/logger/ByProofRefactoring.dfy.expect index 0c5d65f48ca..9bc12b98631 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/logger/ByProofRefactoring.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/logger/ByProofRefactoring.dfy.expect @@ -2,7 +2,7 @@ ByProofRefactoring.dfy(11,0): Info: Consider hiding this function, which is unus ByProofRefactoring.dfy(18,2): Info: This fact was only used to prove the precondition of the method call ByProofRefactoring.dfy(19,4). Consider moving it into a by-proof. ByProofRefactoring.dfy(31,2): Info: This fact was only used to prove the assertion ByProofRefactoring.dfy(32,3)-(32,13). Consider moving it into a by-proof. ByProofRefactoring.dfy(44,0): Info: Consider hiding this function, which is unused by the proof: P -ByProofRefactoring.dfy(43,11): Info: This requires clause was only used to prove the assertion ByProofRefactoring.dfy(45,3)-(45,13). Consider labelling it and revealing it in a by-proof. +ByProofRefactoring.dfy(43,12): Info: This requires clause was only used to prove the assertion ByProofRefactoring.dfy(45,3)-(45,13). Consider labelling it and revealing it in a by-proof. ByProofRefactoring.dfy(50,0): Info: Consider hiding this function, which is unused by the proof: P ByProofRefactoring.dfy(58,2): Info: This fact was only used to prove the assertion ByProofRefactoring.dfy(60,3)-(60,12). Consider moving it into a by-proof. diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/precondition-satisfied.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/precondition-satisfied.dfy.expect index d9523f61b87..e1677354d36 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/precondition-satisfied.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/precondition-satisfied.dfy.expect @@ -1,7 +1,7 @@ -precondition-satisfied.dfy(12,4): Error: function precondition could not be proved +precondition-satisfied.dfy(12,7): Error: function precondition could not be proved Asserted expression: b != 0 precondition-satisfied.dfy(5,15): Related location: this proposition could not be proved -precondition-satisfied.dfy(23,4): Error: divisor must be nonzero +precondition-satisfied.dfy(23,15): Error: divisor must be nonzero Asserted expression: b != 0 precondition-satisfied.dfy(16,72): Related location: this proposition could not be proved precondition-satisfied.dfy(29,4): Error: function precondition could not be proved diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/read-frame-subset.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/read-frame-subset.dfy.expect index 1c6c5d75bd8..433c7c55637 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/read-frame-subset.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/read-frame-subset.dfy.expect @@ -10,9 +10,9 @@ read-frame-subset.dfy(39,51): Error: insufficient reads clause to read array ele Asserted expression: s[0] == s[1] || s[0] in set a: array2 {:trigger a in s[2..]} | a in s[2..] read-frame-subset.dfy(54,2): Error: insufficient reads clause to invoke function Asserted expression: forall obj: object? | obj in lam.reads(s) :: obj == s[3] || obj in {s[4]} || obj in {s[5]} -read-frame-subset.dfy(72,2): Error: insufficient reads clause to invoke function +read-frame-subset.dfy(72,17): Error: insufficient reads clause to invoke function Asserted expression: (s[0] == s[3] || s[0] in {s[4]} || s[0] in {s[5]}) && (forall obj: C | obj in {s[1]} :: obj == s[3] || obj in {s[4]}) && forall obj: C | obj in {s[2]} :: obj == s[3] || obj in {s[5]} -read-frame-subset.dfy(81,33): Error: insufficient reads clause to invoke function +read-frame-subset.dfy(81,38): Error: insufficient reads clause to invoke function Asserted expression: (s[0] == s[3] || s[0] in {s[4]} || s[0] in {s[5]}) && (forall obj: C | obj in {s[1]} :: obj == s[3] || obj in {s[4]}) && forall obj: C | obj in {s[2]} :: obj == s[3] || obj in {s[5]} read-frame-subset.dfy(91,20): Error: insufficient reads clause to read state of 'unchanged' object Asserted expression: s[0] == s[3] || s[0] in {s[4]} || s[0] in {s[5]} diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-lower-bound.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-lower-bound.dfy.expect index b59657a0906..cfdac31f3f7 100755 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-lower-bound.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-lower-bound.dfy.expect @@ -1,4 +1,4 @@ -shift-lower-bound.dfy(5,6): Error: rotate amount must be non-negative +shift-lower-bound.dfy(5,16): Error: rotate amount must be non-negative Asserted expression: 0 <= -1 Dafny program verifier finished with 0 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-upper-bound.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-upper-bound.dfy.expect index fd55a173d16..6e181752b03 100755 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-upper-bound.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/proof-obligation-desc/shift-upper-bound.dfy.expect @@ -1,4 +1,4 @@ -shift-upper-bound.dfy(5,6): Error: rotate amount must not exceed the width of the result (2) +shift-upper-bound.dfy(5,16): Error: rotate amount must not exceed the width of the result (2) Asserted expression: 3 <= 2 Dafny program verifier finished with 0 verified, 1 error diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/traits/TraitOverride1.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/traits/TraitOverride1.dfy.expect index 7e26e87dc9f..6d5c968e8a8 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/traits/TraitOverride1.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/traits/TraitOverride1.dfy.expect @@ -1,6 +1,6 @@ TraitOverride1.dfy(200,9): Error: the method must provide an equal or more detailed postcondition than in its parent trait TraitOverride1.dfy(205,2): Error: a postcondition could not be proved on this return path -TraitOverride1.dfy(204,40): Related location: this is the postcondition that could not be proved +TraitOverride1.dfy(204,41): Related location: this is the postcondition that could not be proved TraitOverride1.dfy(188,32): Related location: this proposition could not be proved Dafny program verifier finished with 29 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.expect index 4f6393dcb36..95f24f8bd6e 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.expect @@ -4,25 +4,25 @@ InductionWithoutTriggers.dfy(46,24): Warning: Could not find a trigger for the i InductionWithoutTriggers.dfy(66,19): Warning: Could not find a trigger for the induction hypothesis. Without a trigger, this may cause brittle verification. Change or remove the {:induction} attribute to generate a different induction hypothesis, or add {:nowarn} to silence this warning. For more information, see the section quantifier instantiation rules in the reference manual. InductionWithoutTriggers.dfy(11,9): Error: assertion might not hold InductionWithoutTriggers.dfy(43,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(42,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(42,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(49,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(48,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(48,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(69,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(68,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(68,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(83,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(82,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(82,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(100,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(99,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(99,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(124,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(123,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(123,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(124,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(123,18): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(35,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(123,19): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(35,28): Related location: this proposition could not be proved Dafny program verifier finished with 17 verified, 8 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.refresh.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.refresh.expect index 566c53271f8..fe9d16c0bd7 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.refresh.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/InductionWithoutTriggers.dfy.refresh.expect @@ -4,25 +4,25 @@ InductionWithoutTriggers.dfy(46,24): Warning: Could not find a trigger for the i InductionWithoutTriggers.dfy(66,19): Warning: Could not find a trigger for the induction hypothesis. Without a trigger, this may cause brittle verification. Change or remove the {:induction} attribute to generate a different induction hypothesis, or add {:nowarn} to silence this warning. For more information, see the section quantifier instantiation rules in the reference manual. InductionWithoutTriggers.dfy(11,9): Error: assertion might not hold InductionWithoutTriggers.dfy(43,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(42,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(42,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(49,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(48,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(48,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(69,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(68,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(68,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(83,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(82,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(82,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(100,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(99,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(99,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(124,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(123,10): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(31,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(123,11): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(31,28): Related location: this proposition could not be proved InductionWithoutTriggers.dfy(124,0): Error: a postcondition could not be proved on this return path -InductionWithoutTriggers.dfy(123,18): Related location: this is the postcondition that could not be proved -InductionWithoutTriggers.dfy(35,27): Related location: this proposition could not be proved +InductionWithoutTriggers.dfy(123,19): Related location: this is the postcondition that could not be proved +InductionWithoutTriggers.dfy(35,28): Related location: this proposition could not be proved Dafny program verifier finished with 12 verified, 8 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/induction-triggers.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/induction-triggers.dfy.expect index 4c0f5c82886..ad56c7793da 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/induction-triggers.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/induction-triggers.dfy.expect @@ -16,13 +16,13 @@ induction-triggers.dfy(39,44): Info: {:induction n} induction-triggers.dfy(42,21): Warning: Could not find a trigger for the induction hypothesis. Without a trigger, this may cause brittle verification. Change or remove the {:induction} attribute to generate a different induction hypothesis, or add {:nowarn} to silence this warning. For more information, see the section quantifier instantiation rules in the reference manual. induction-triggers.dfy(19,2): Info: ensures f(ih_n) induction-triggers.dfy(13,58): Error: a postcondition could not be proved on this return path -induction-triggers.dfy(13,53): Related location: this is the postcondition that could not be proved -induction-triggers.dfy(3,47): Related location: this proposition could not be proved +induction-triggers.dfy(13,54): Related location: this is the postcondition that could not be proved +induction-triggers.dfy(3,48): Related location: this proposition could not be proved induction-triggers.dfy(25,42): Error: a postcondition could not be proved on this return path -induction-triggers.dfy(25,33): Related location: this is the postcondition that could not be proved -induction-triggers.dfy(3,47): Related location: this proposition could not be proved +induction-triggers.dfy(25,34): Related location: this is the postcondition that could not be proved +induction-triggers.dfy(3,48): Related location: this proposition could not be proved induction-triggers.dfy(39,80): Error: a postcondition could not be proved on this return path -induction-triggers.dfy(39,71): Related location: this is the postcondition that could not be proved -induction-triggers.dfy(3,47): Related location: this proposition could not be proved +induction-triggers.dfy(39,72): Related location: this is the postcondition that could not be proved +induction-triggers.dfy(3,48): Related location: this proposition could not be proved Dafny program verifier finished with 17 verified, 3 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-recovers-expressivity.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-recovers-expressivity.dfy.expect index b06c081fc7a..033ab546826 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-recovers-expressivity.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-recovers-expressivity.dfy.expect @@ -25,6 +25,6 @@ splitting-triggers-recovers-expressivity.dfy(58,11): Info: Selected triggers: splitting-triggers-recovers-expressivity.dfy(12,63): Error: a postcondition could not be proved on this return path splitting-triggers-recovers-expressivity.dfy(12,10): Related location: this is the postcondition that could not be proved splitting-triggers-recovers-expressivity.dfy(19,15): Error: a postcondition could not be proved on this return path -splitting-triggers-recovers-expressivity.dfy(19,10): Related location: this is the postcondition that could not be proved +splitting-triggers-recovers-expressivity.dfy(19,11): Related location: this is the postcondition that could not be proved Dafny program verifier finished with 5 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-yields-better-precondition-related-errors.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-yields-better-precondition-related-errors.dfy.expect index 98bb2797b8d..af17b521378 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-yields-better-precondition-related-errors.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/splitting-triggers-yields-better-precondition-related-errors.dfy.expect @@ -2,7 +2,7 @@ splitting-triggers-yields-better-precondition-related-errors.dfy(7,11): Warning: splitting-triggers-yields-better-precondition-related-errors.dfy(15,11): Warning: Could not find a trigger for this quantifier. Without a trigger, the quantifier may cause brittle verification. To silence this warning, add an explicit trigger using the {:trigger} attribute. For more information, see the section quantifier instantiation rules in the reference manual. splitting-triggers-yields-better-precondition-related-errors.dfy(11,3): Error: a precondition for this call could not be proved splitting-triggers-yields-better-precondition-related-errors.dfy(7,11): Related location: this is the precondition that could not be proved -splitting-triggers-yields-better-precondition-related-errors.dfy(20,2): Error: function precondition could not be proved +splitting-triggers-yields-better-precondition-related-errors.dfy(20,4): Error: function precondition could not be proved splitting-triggers-yields-better-precondition-related-errors.dfy(15,11): Related location: this proposition could not be proved Dafny program verifier finished with 0 verified, 2 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/triggers-prevent-some-inlining.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/triggers-prevent-some-inlining.dfy.expect index 89c40cc572a..89d7daeaccb 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/triggers-prevent-some-inlining.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/triggers/triggers-prevent-some-inlining.dfy.expect @@ -1,7 +1,7 @@ triggers-prevent-some-inlining.dfy(17,2): Info: Selected triggers: {sum(a, b)} -triggers-prevent-some-inlining.dfy(24,10): Info: Some instances of this call are not inlined. -triggers-prevent-some-inlining.dfy(25,10): Info: Some instances of this call are not inlined. -triggers-prevent-some-inlining.dfy(24,10): Info: Some instances of this call are not inlined. -triggers-prevent-some-inlining.dfy(25,10): Info: Some instances of this call are not inlined. +triggers-prevent-some-inlining.dfy(24,20): Info: Some instances of this call are not inlined. +triggers-prevent-some-inlining.dfy(25,20): Info: Some instances of this call are not inlined. +triggers-prevent-some-inlining.dfy(24,20): Info: Some instances of this call are not inlined. +triggers-prevent-some-inlining.dfy(25,20): Info: Some instances of this call are not inlined. Dafny program verifier finished with 1 verified, 0 errors diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/constructorFresh.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/constructorFresh.dfy.expect index 695e93af002..6bdd3dea757 100644 --- a/Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/constructorFresh.dfy.expect +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/constructorFresh.dfy.expect @@ -1,4 +1,4 @@ -constructorFresh.dfy(14,12): Error: function precondition could not be proved +constructorFresh.dfy(14,15): Error: function precondition could not be proved constructorFresh.dfy(21,11): Related location: this proposition could not be proved Dafny program verifier finished with 3 verified, 1 error diff --git a/Source/Scripts/Program.cs b/Source/Scripts/Program.cs new file mode 100644 index 00000000000..a680ca8b4d4 --- /dev/null +++ b/Source/Scripts/Program.cs @@ -0,0 +1,13 @@ +using System.CommandLine; +using System.CommandLine.Builder; +using System.CommandLine.Parsing; + +namespace IntegrationTests; + +public class Program { + public static Task Main(string[] args) { + var root = new RootCommand("Various scripts that help develop Dafny"); + root.AddCommand(UpdateTests.GetCommand()); + return root.InvokeAsync(args); + } +} \ No newline at end of file diff --git a/Source/Scripts/README.md b/Source/Scripts/README.md new file mode 100644 index 00000000000..7aad6575c3a --- /dev/null +++ b/Source/Scripts/README.md @@ -0,0 +1,2 @@ +Contains various scripts for developing Dafny. New scripts can be added by adding System.CommandLine commands. +You can invoke these scripts using `dotnet run --project Source/Scripts ` \ No newline at end of file diff --git a/Source/Scripts/Scripts.csproj b/Source/Scripts/Scripts.csproj new file mode 100644 index 00000000000..bc3f09d58c3 --- /dev/null +++ b/Source/Scripts/Scripts.csproj @@ -0,0 +1,14 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + diff --git a/Source/Scripts/UpdateTests.cs b/Source/Scripts/UpdateTests.cs new file mode 100644 index 00000000000..70d0c11c81e --- /dev/null +++ b/Source/Scripts/UpdateTests.cs @@ -0,0 +1,76 @@ +using System.CommandLine; +using System.Diagnostics; +using System.IO.Compression; +using System.Text.RegularExpressions; + +namespace IntegrationTests; + +public class UpdateTests { + + public static Command GetCommand() { + var result = new Command("update-expect-files", "Use the 'log archive' file downloaded from CI to update the integration tests"); + var fileArgument = new Argument(); + result.AddArgument(fileArgument); + result.SetHandler(file => Handle(file.Name), fileArgument); + return result; + } + + public static async Task Handle(string file) { + Environment.SetEnvironmentVariable("DAFNY_INTEGRATION_TESTS_UPDATE_EXPECT_FILE", "true"); + + await using var zipFile = new FileStream(file, FileMode.Open); + using var archive = new ZipArchive(zipFile, ZipArchiveMode.Read); + var integrationFiles = archive.Entries.Where(entry => { + var fileName = entry.Name; + var regex = new Regex(@"\d+_integration-tests"); + var match = regex.Match(fileName); + return match.Success; + }); + var failedTestNames = integrationFiles.SelectMany(entry => { + var content = new StreamReader(entry.Open()).ReadToEnd(); + var regex = new Regex(@"Failed (.*) \["); + var matches = regex.Matches(content); + return matches.Select(m => m.Groups[1].Value); + }).ToList(); + + string? repoRoot = Directory.GetCurrentDirectory(); + while (repoRoot != null) { + var currentFiles = Directory.GetDirectories(repoRoot); + if (currentFiles.Any(f => Path.GetFileName(f) == ".git")) { + break; + } + + repoRoot = Path.GetDirectoryName(repoRoot)!; + } + + Console.WriteLine($"Tests to update:\n{string.Join("\n", failedTestNames)}\n"); + + var needsBuilds = true; + for (var index = 0; index < failedTestNames.Count; index++) { + var failedTestName = failedTestNames[index]; + Console.WriteLine($"Updating test {index + 1}/{failedTestNames.Count} '{failedTestName}'"); + var integrationTestsDir = $"{repoRoot}/Source/IntegrationTests"; + var arguments = new List { "test", integrationTestsDir, $"--filter=DisplayName~{failedTestName}" }; + if (!needsBuilds) { + arguments.Add("--no-build"); + } + needsBuilds = false; + var process = Process.Start( + new ProcessStartInfo("dotnet", arguments) { + RedirectStandardOutput = true, + RedirectStandardError = true, + WorkingDirectory = repoRoot, + })!; + var outputTask = process.StandardOutput.ReadToEndAsync(); + var errorTask = process.StandardError.ReadToEndAsync(); + await process.WaitForExitAsync(); + var output = await outputTask; + var error = await errorTask; + var exitCode = process.ExitCode; + if (exitCode != 0) { + await Console.Error.WriteLineAsync($"Non-zero exit code. Output:\n{output}\nError:{error}"); + throw new Exception("Non-zero exit code"); + } + } + } +} \ No newline at end of file diff --git a/customBoogie.patch b/customBoogie.patch index 9887a911223..d1ce3d699e2 100644 --- a/customBoogie.patch +++ b/customBoogie.patch @@ -4,7 +4,7 @@ index 426b132e2..18db4aebb 100644 +++ b/Source/Dafny.sln @@ -43,6 +43,32 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoExtern.Test", "AutoExte EndProject - Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DafnyCore.Test", "DafnyCore.Test\DafnyCore.Test.csproj", "{33C29F26-A27B-474D-B436-83EA615B09FC}" + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scripts", "Scripts\Scripts.csproj", "{3FAB051A-1745-497B-B4C0-D49194BB5D32}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boogie", "Boogie", "{60332269-9C5D-465E-8582-01F9B738BD90}" +EndProject diff --git a/docs/DafnyRef/Statements.8b.expect b/docs/DafnyRef/Statements.8b.expect index 7e599dfb192..0732822b503 100644 --- a/docs/DafnyRef/Statements.8b.expect +++ b/docs/DafnyRef/Statements.8b.expect @@ -1,4 +1,4 @@ -text.dfy(6,12): Error: function precondition could not be proved +text.dfy(6,13): Error: function precondition could not be proved text.dfy(3,30): Related location: this proposition could not be proved Dafny program verifier finished with 8 verified, 1 error diff --git a/docs/DafnyRef/Topics.3.expect b/docs/DafnyRef/Topics.3.expect index a5f9b7e52ef..66c482d6870 100644 --- a/docs/DafnyRef/Topics.3.expect +++ b/docs/DafnyRef/Topics.3.expect @@ -1,3 +1,3 @@ text.dfy(6,10): Error: the type of this variable is underspecified -text.dfy(6,15): Error: type parameter 'T' (inferred to be '?') in the function call to 'EmptySet' could not be determined +text.dfy(6,23): Error: type parameter 'T' (inferred to be '?') in the function call to 'EmptySet' could not be determined 2 resolution/type errors detected in text.dfy diff --git a/docs/DafnyRef/Types.20.expect b/docs/DafnyRef/Types.20.expect index b80b729c5fc..df1d037df0b 100644 --- a/docs/DafnyRef/Types.20.expect +++ b/docs/DafnyRef/Types.20.expect @@ -1,5 +1,5 @@ text.dfy(26,0): Error: a postcondition could not be proved on this return path -text.dfy(25,10): Related location: this is the postcondition that could not be proved +text.dfy(25,15): Related location: this is the postcondition that could not be proved text.dfy(10,9): Related location: this proposition could not be proved Dafny program verifier finished with 1 verified, 1 error From 416575a14dd0098c1129705b6bc0ec739ac15960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Mayer?= Date: Mon, 13 Jan 2025 05:11:10 -0600 Subject: [PATCH 08/16] Fix: Explicit assertions no longer considered implicit for code actions (#6030) Fixes #6025 ### What was changed? Explicit assertions (which as of today are prefixed with ensures and assert) are no longer suggested in code actions where the same expression fails. This was redundant and useless. ### How has this been tested? I added a test for the language server in the assertion case, verified that this test did not pass before the change, and the test passes after the change. Since ensures are also explicit assertions, I added a test for them as well. However, the test does not work if the ensures is not on the same line as the opening curly brace. I don't know why, but for now I'm writing the test in a way that was surely failing before and now passes. By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- .../CodeActions/CodeActionsTest.cs | 36 +++++++++++++++++-- ...licitFailingAssertionCodeActionProvider.cs | 4 ++- docs/dev/news/6025.fix | 1 + 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 docs/dev/news/6025.fix diff --git a/Source/DafnyLanguageServer.Test/CodeActions/CodeActionsTest.cs b/Source/DafnyLanguageServer.Test/CodeActions/CodeActionsTest.cs index bd28edcf2ae..0a07486e222 100644 --- a/Source/DafnyLanguageServer.Test/CodeActions/CodeActionsTest.cs +++ b/Source/DafnyLanguageServer.Test/CodeActions/CodeActionsTest.cs @@ -1,4 +1,4 @@ -using Microsoft.Dafny.LanguageServer.IntegrationTest.Extensions; +using System; using OmniSharp.Extensions.LanguageServer.Protocol.Document; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using System.Collections.Generic; @@ -8,7 +8,7 @@ using Microsoft.Dafny.LanguageServer.IntegrationTest.Util; using Xunit; using Xunit.Abstractions; -using XunitAssertMessages; +using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range; namespace Microsoft.Dafny.LanguageServer.IntegrationTest.CodeActions { public class CodeActionTest : ClientBasedLanguageServerTest { @@ -76,6 +76,21 @@ assert x !is B.>< Assert.Empty(completionList); } + [Fact] + public async Task TestAssertFalseNotSuggestingItself() { + await TestNoCodeAction(@" +method NoCodeAction() { + assert fal> message == "Assert postcondition at return location where it fails"); + } + [Fact] public async Task TestInsertion() { await TestCodeAction(@" @@ -371,6 +386,23 @@ match i { private static readonly Regex NewlineRegex = new Regex("\r?\n"); + private async Task TestNoCodeAction(string source, Func excepted = null) { + await SetUp(o => o.Set(CommonOptionBag.RelaxDefiniteAssignment, true)); + MarkupTestFile.GetPositionsAndAnnotatedRanges(source.TrimStart(), out var output, out var positions, + out var ranges); + var documentItem = await CreateOpenAndWaitForResolve(output); + var diagnostics = await GetLastDiagnostics(documentItem); + Assert.Equal(0, ranges.Count); + foreach (var position in positions) { + var completionList = await RequestCodeActionAsync(documentItem, new Range(position, position)); + completionList = excepted == null + ? completionList + : completionList.Where(completion => + completion.CodeAction is not { Title: var title } || !excepted(title)).ToList(); + Assert.Empty(completionList); + } + } + private async Task TestCodeAction(string source) { await SetUp(o => o.Set(CommonOptionBag.RelaxDefiniteAssignment, true)); diff --git a/Source/DafnyLanguageServer/Language/ImplicitFailingAssertionCodeActionProvider.cs b/Source/DafnyLanguageServer/Language/ImplicitFailingAssertionCodeActionProvider.cs index 3f67298ffba..ca0fd8b2726 100644 --- a/Source/DafnyLanguageServer/Language/ImplicitFailingAssertionCodeActionProvider.cs +++ b/Source/DafnyLanguageServer/Language/ImplicitFailingAssertionCodeActionProvider.cs @@ -126,7 +126,9 @@ public override IEnumerable GetEdits() { assertTree.StatusVerification is GutterVerificationStatus.Error or GutterVerificationStatus.Inconclusive && assertTree.GetAssertion()?.Description is ProofObligationDescription description && description.GetAssertedExpr(options) is { } assertedExpr) { - failingExpressions.Add(assertedExpr); + if (description.IsImplicit) { + failingExpressions.Add(assertedExpr); + } } }); if (failingExpressions.Count == 0) { diff --git a/docs/dev/news/6025.fix b/docs/dev/news/6025.fix new file mode 100644 index 00000000000..f861d68ac82 --- /dev/null +++ b/docs/dev/news/6025.fix @@ -0,0 +1 @@ +The code action for assertion no longer suggests asserting the same assertion. \ No newline at end of file From b79708edc871d0cd8149a03739641af63d06f8b5 Mon Sep 17 00:00:00 2001 From: Remy Willems Date: Mon, 13 Jan 2025 15:41:08 +0100 Subject: [PATCH 09/16] Add a script.sh file to run scripts (#6047) ### What was changed? Add a script.sh file to run scripts ### How has this been tested? Manually ran the shell file with a few different commands By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- script.sh | 1 + 1 file changed, 1 insertion(+) create mode 100755 script.sh diff --git a/script.sh b/script.sh new file mode 100755 index 00000000000..523d8653e16 --- /dev/null +++ b/script.sh @@ -0,0 +1 @@ +dotnet run --project Source/Scripts/Scripts.csproj -- "$@" \ No newline at end of file From e7e3ed4cf99453da40632f2435d2ed01431c8f84 Mon Sep 17 00:00:00 2001 From: olivier-aws Date: Mon, 13 Jan 2025 11:13:00 -0500 Subject: [PATCH 10/16] Avoid name clashes with Default method (#6031) ### What was changed? Avoid name clash between user defined and Dafny generated Default method for data types. ### How has this been tested? Add test Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy Fixes #3809 By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt). --- .../Backends/CSharp/CsharpCodeGenerator.cs | 1 + .../Backends/GoLang/GoCodeGenerator.cs | 3 ++- .../Backends/Java/JavaCodeGenerator.cs | 1 + .../LitTest/git-issues/git-issue-3809.dfy | 26 +++++++++++++++++++ .../git-issues/git-issue-3809.dfy.expect | 3 +++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy create mode 100644 Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy.expect diff --git a/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs b/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs index dbfb67041ad..d8092b84678 100644 --- a/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs +++ b/Source/DafnyCore/Backends/CSharp/CsharpCodeGenerator.cs @@ -2490,6 +2490,7 @@ public override string PublicIdProtect(string name) { case "ToString": case "GetHashCode": case "Main": + case "Default": return "_" + name; default: return name; diff --git a/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs b/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs index 953f7d43470..12dfa815b05 100644 --- a/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs +++ b/Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs @@ -2515,7 +2515,7 @@ private string IdName(Declaration decl) { // Don't use Go_ because Capitalize might use it and we know there's a conflict return "Go__" + decl.GetCompileName(Options); } else { - return Capitalize(decl.GetCompileName(Options)); + return IdProtect(Capitalize(decl.GetCompileName(Options))); } } @@ -2579,6 +2579,7 @@ public override string PublicIdProtect(string name) { case "String": case "Equals": case "EqualsGeneric": + case "Default": // Built-in types (can also be used as functions) case "bool": diff --git a/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs b/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs index 88a80e524e6..89c86b482ad 100644 --- a/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs +++ b/Source/DafnyCore/Backends/Java/JavaCodeGenerator.cs @@ -2440,6 +2440,7 @@ private static string PublicIdProtectAux(string name) { case "toString": case "equals": case "hashCode": + case "Default": return name + "_"; // TODO: figure out what to do here (C# uses @, Go uses _, JS uses _$$_) default: return name; // Package name is not a keyword, so it can be used diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy new file mode 100644 index 00000000000..be8e13ec89b --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy @@ -0,0 +1,26 @@ +// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" + +module m { + datatype D = A + | B + | C { + static const Default: D := B // This one will be translated as Default_ + method Default_() { // Just to be sure there is no clash: this is translated as Default__ + print "Default_ Method\n"; + } + } + + + + method Main() { + var x := D.Default; + x.Default_(); + match x { + case A => print "A!\n"; + case B => print "B!\n"; + case C => print "C!\n"; + } + print "Hello!\n"; + } + +} diff --git a/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy.expect b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy.expect new file mode 100644 index 00000000000..9ba695c450c --- /dev/null +++ b/Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy.expect @@ -0,0 +1,3 @@ +Default_ Method +B! +Hello! From 9532b8b9caa377b1a3dbe88850b2932c4633a687 Mon Sep 17 00:00:00 2001 From: olivier-aws Date: Mon, 13 Jan 2025 17:39:56 -0500 Subject: [PATCH 11/16] Add links to public Zulip channel from Github and Dafny web sites. (#6039) --- README.md | 2 +- docs/index.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a47c0d189c9..065b4134367 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ A reference manual is available both [online](https://dafny-lang.github.io/dafny ## Community -You can ask questions about Dafny on [Stack Overflow](https://stackoverflow.com/questions/tagged/dafny) or participate in general discussion on Dafny's [![Gitter](https://badges.gitter.im/dafny-lang/community.svg)](https://gitter.im/dafny-lang/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge). +Feel free to report issues here on GitHub or to ask for questions on our :speech_balloon: [Zulip](https://dafny.zulipchat.com/) channel. ## Try Dafny diff --git a/docs/index.html b/docs/index.html index 1799d660c3d..5ed73cbf3f0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,6 +31,7 @@

Quick Links