Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Edited Unassigned: Crash when mistakenly using multiset in reads clause [155]

$
0
0
The following function causes Dafny to crash.

```
function foo(m: multiset<object>): int
reads m
{
0
}
```

I tested with the most recent commit (1848d82bd90c).

Here is the backtrace.

```
[ERROR] FATAL UNHANDLED EXCEPTION: System.Diagnostics.Contracts.ContractException: Assertion failed.
at System.Runtime.CompilerServices.ContractHelper.TriggerFailureImplementation (ContractFailureKind kind, System.String displayMessage, System.String userMessage, System.String conditionText, System.Exception innerException) <0x108fe3a00 + 0x00057> in <filename unknown>:0
at System.Runtime.CompilerServices.ContractHelper.TriggerFailure (ContractFailureKind kind, System.String displayMessage, System.String userMessage, System.String conditionText, System.Exception innerException) <0x108fe3390 + 0x00020> in <filename unknown>:0
at System.Diagnostics.Contracts.Contract.ReportFailure (ContractFailureKind failureKind, System.String userMessage, System.String conditionText, System.Exception innerException) <0x108fe31a0 + 0x0006a> in <filename unknown>:0
at System.Diagnostics.Contracts.Contract.Assert (Boolean condition) <0x108fe2930 + 0x0001f> in <filename unknown>:0
at Microsoft.Dafny.Resolver.FrameToObjectSet (System.Collections.Generic.List`1 fexprs) <0x10f633870 + 0x008ae> in <filename unknown>:0
at Microsoft.Dafny.Resolver.FillInDefaultDecreases (ICallable clbl, Boolean addPrefixInCoClusters) <0x10f632da0 + 0x00505> in <filename unknown>:0
at Microsoft.Dafny.Resolver.FillInDefaultDecreasesClauses (Microsoft.Dafny.Program prog) <0x10f6327e0 + 0x001ad> in <filename unknown>:0
at Microsoft.Dafny.Resolver.ResolveProgram (Microsoft.Dafny.Program prog) <0x10f5a1000 + 0x024fa> in <filename unknown>:0
at Microsoft.Dafny.Main.ParseCheck (IList`1 fileNames, System.String programName, Microsoft.Dafny.ErrorReporter reporter, Microsoft.Dafny.Program& program) <0x10f56b4f0 + 0x00536> in <filename unknown>:0
at Microsoft.Dafny.DafnyDriver.ProcessFiles (IList`1 dafnyFileNames, System.Collections.ObjectModel.ReadOnlyCollection`1 otherFileNames, Microsoft.Dafny.ErrorReporter reporter, Boolean lookForSnapshots, System.String programId) <0x10f56a3c0 + 0x00632> in <filename unknown>:0
at Microsoft.Dafny.DafnyDriver.ThreadMain (System.String[] args) <0x10f5147d0 + 0x0071a> in <filename unknown>:0
at Microsoft.Dafny.DafnyDriver+<Main>c__AnonStorey0.<>m__0 () <0x10769a8f0 + 0x0001b> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x10911f320 + 0x0009a> in <filename unknown>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10911db00 + 0x001c6> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10911dad0 + 0x00020> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x10911da20 + 0x00059> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart () <0x10911f4e0 + 0x0002e> in <filename unknown>:0
```

Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>