Skip to content
New issue

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

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

Already on GitHub? # to your account

Verifier crash when dereferencing map constant/function #6099

Open
erniecohen opened this issue Feb 7, 2025 · 1 comment
Open

Verifier crash when dereferencing map constant/function #6099

erniecohen opened this issue Feb 7, 2025 · 1 comment
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label

Comments

@erniecohen
Copy link

Dafny version

4.10.0

Code to produce this issue

function c():map<nat,nat>
function f(v:nat):nat { c()[v]}

Command to run and resulting output

vscode

What happened?

Dafny encountered an internal error. Please report it at https://github.com/dafny-lang/dafny/issues.
System.ArgumentException: Boogie program had 8 resolution errors:
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
Microsoft.Dafny.SourceOrigin: undeclared identifier: smt.lc.Env$V
at Microsoft.Boogie.ExecutionEngine.GetVerificationTasks(Program program, CancellationToken cancellationToken)
at Microsoft.Dafny.LanguageServer.Language.DafnyProgramVerifier.GetVerificationTasksAsync(ExecutionEngine engine, ResolutionResult resolution, ModuleDefinition moduleDefinition, CancellationToken cancellationToken)
at Microsoft.Dafny.Compilation.<>c__DisplayClass58_0.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Dafny.Compilation.VerifyUnverifiedSymbol(Boolean onlyPrepareVerificationForGutterTests, ICanVerify canVerify, ResolutionResult resolution, Func2 taskFilter, Nullable1 randomSeed)
at Microsoft.Dafny.Compilation.VerifyUnverifiedSymbol(Boolean onlyPrepareVerificationForGutterTests, ICanVerify canVerify, ResolutionResult resolution, Func2 taskFilter, Nullable1 randomSeed)

What type of operating system are you experiencing the problem on?

Mac

@erniecohen erniecohen added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Feb 7, 2025
@erniecohen
Copy link
Author

Same problem occurs if c is a constant, and/or it is given a definition.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
Projects
None yet
Development

No branches or pull requests

1 participant