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

Edited Unassigned: Dafny crash when same module is imported with two different names [125]

$
0
0
The following code causes Dafny to crash:

abstract module AbstractModuleA
{
type T
}

abstract module AbstractModuleB
{
import opened AMA as AbstractModuleA

method Foo(t:T)
}

abstract module AbstractModuleC refines AbstractModuleB
{
import opened AMA2 as AbstractModuleA
}

Here's the stack trace:

> DafnyPipeline.dll!Microsoft.Dafny.Translator.TrType(Microsoft.Dafny.Type type) Line 6866 C#
DafnyPipeline.dll!Microsoft.Dafny.Translator.GenerateMethodParametersChoose(Microsoft.Boogie.IToken tok, Microsoft.Dafny.IMethodCodeContext m, Microsoft.Dafny.Translator.MethodTranslationKind kind, bool includeReceiver, bool includeInParams, bool includeOutParams, Microsoft.Dafny.Translator.ExpressionTranslator etran, out System.Collections.Generic.List<Microsoft.Boogie.Variable> inParams, out System.Collections.Generic.List<Microsoft.Boogie.Variable> outParams) Line 6669 C#
DafnyPipeline.dll!Microsoft.Dafny.Translator.GenerateMethodParameters(Microsoft.Boogie.IToken tok, Microsoft.Dafny.Method m, Microsoft.Dafny.Translator.MethodTranslationKind kind, Microsoft.Dafny.Translator.ExpressionTranslator etran, out System.Collections.Generic.List<Microsoft.Boogie.Variable> inParams, out System.Collections.Generic.List<Microsoft.Boogie.Variable> outParams) Line 6650 C#
DafnyPipeline.dll!Microsoft.Dafny.Translator.AddMethod(Microsoft.Dafny.Method m, Microsoft.Dafny.Translator.MethodTranslationKind kind) Line 6266 C#
DafnyPipeline.dll!Microsoft.Dafny.Translator.AddClassMembers(Microsoft.Dafny.ClassDecl c) Line 1435 C#
DafnyPipeline.dll!Microsoft.Dafny.Translator.Translate(Microsoft.Dafny.Program p) Line 523 C#
dafny.exe!Microsoft.Dafny.DafnyDriver.ProcessFiles(System.Collections.Generic.IList<string> fileNames, Microsoft.Dafny.ErrorReporter reporter, bool lookForSnapshots, string programId) Line 165 C#
dafny.exe!Microsoft.Dafny.DafnyDriver.ThreadMain(string[] args) Line 96 C#
dafny.exe!Microsoft.Dafny.DafnyDriver.Main.AnonymousMethod__0() Line 33 C#


Viewing all articles
Browse latest Browse all 1106

Trending Articles



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