Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in Translator.GetField #1316

Open
keyboardDrummer opened this issue Jul 19, 2021 · 0 comments
Open

Exception in Translator.GetField #1316

keyboardDrummer opened this issue Jul 19, 2021 · 0 comments
Labels
crash Dafny crashes on this input, or generates malformed code that can not be executed kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: verifier Translation from Dafny to Boogie (translator)

Comments

@keyboardDrummer
Copy link
Member

module M1 {
  trait {:termination false} T0 {
    var b: bool
  }

  trait T1 extends T0 { }
}

module M2 refines M1 {
  trait T1 ...  {
    predicate p()
    {
      b
    }
  }
}

Results in

Process terminated. Assertion failed.
   at Microsoft.Dafny.Translator.GetField(Field f) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 9495
   at Microsoft.Dafny.Translator.ExpressionTranslator.<>c__DisplayClass45_1.<TrExpr>b__0(Field field) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 15454
   at Microsoft.Dafny.MemberSelectExpr.MemberSelectCase[A](Func`2 fieldK, Func`2 functionK) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/DafnyAst.cs:line 10329
   at Microsoft.Dafny.Translator.ExpressionTranslator.TrExpr(Expression expr) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 15432
   at Microsoft.Dafny.Translator.FunctionAxiom(Function f, Expression body, List`1 lits) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 3393
   at Microsoft.Dafny.Translator.AddFunctionAxiom(Function f, Expression body) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 2881
   at Microsoft.Dafny.Translator.AddClassMember_Function(Function f) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 2455
   at Microsoft.Dafny.Translator.AddFunction_Top(Function f) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 2356
   at Microsoft.Dafny.Translator.AddClassMembers(TopLevelDeclWithMembers c, Boolean includeMethods) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 2340
   at Microsoft.Dafny.Translator.AddTypeDecl(RevealableTypeDecl d) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 1262
   at Microsoft.Dafny.Translator.DoTranslation(Program p, ModuleDefinition forModule) in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 824
   at Microsoft.Dafny.Translator.Translate(Program p, ErrorReporter reporter, TranslatorFlags flags)+MoveNext() in /Users/rwillems/Documents/SourceCode/dafny/Source/Dafny/Verifier/Translator.cs:line 895
   at Microsoft.Dafny.DafnyDriver.Translate(Program dafnyProgram)+MoveNext() in /Users/rwillems/Documents/SourceCode/dafny/Source/DafnyDriver/DafnyDriver.cs:line 302
   at Microsoft.Dafny.DafnyDriver.Boogie(String baseName, IEnumerable`1 boogiePrograms, String programId, Dictionary`2& statss, PipelineOutcome& oc) in /Users/rwillems/Documents/SourceCode/dafny/Source/DafnyDriver/DafnyDriver.cs:line 352
   at Microsoft.Dafny.DafnyDriver.ProcessFiles(IList`1 dafnyFiles, ReadOnlyCollection`1 otherFileNames, ErrorReporter reporter, Boolean lookForSnapshots, String programId) in /Users/rwillems/Documents/SourceCode/dafny/Source/DafnyDriver/DafnyDriver.cs:line 277
   at Microsoft.Dafny.DafnyDriver.ThreadMain(String[] args) in /Users/rwillems/Documents/SourceCode/dafny/Source/DafnyDriver/DafnyDriver.cs:line 57
   at Microsoft.Dafny.DafnyDriver.<>c__DisplayClass1_0.<Main>b__0() in /Users/rwillems/Documents/SourceCode/dafny/Source/DafnyDriver/DafnyDriver.cs:line 36
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
@keyboardDrummer keyboardDrummer added kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: verifier Translation from Dafny to Boogie (translator) labels Jul 19, 2021
@keyboardDrummer keyboardDrummer added the crash Dafny crashes on this input, or generates malformed code that can not be executed label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Dafny crashes on this input, or generates malformed code that can not be executed kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: verifier Translation from Dafny to Boogie (translator)
Projects
None yet
Development

No branches or pull requests

1 participant