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

Verification symbols not correct when a declaration is marked {:only} #4544

Open
MikaelMayer opened this issue Sep 13, 2023 · 6 comments
Open
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label priority: not yet Will reconsider working on this when we're looking for work

Comments

@MikaelMayer
Copy link
Member

Dafny version

4.2.0

Code to produce this issue

method NotVerified() { // Should not be highlighted in green
  assert 1 == 0;
}
method {:only} Verified() { // Verified
  assert true;
}
method NotVerified2() { // Should not be highlighted in green
  assert 1 == 0;
}

Command to run and resulting output

Paste in VSCode with "Verification as tests" turned on, and gutter icons turned off.

What happened?

image

It's an issue similar to #4432 although verification symbols are a different API so it requires a different fix.

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

Windows

@MikaelMayer MikaelMayer added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Sep 13, 2023
@keyboardDrummer keyboardDrummer added priority: not yet Will reconsider working on this when we're looking for work during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program labels Apr 24, 2024
@keyboardDrummer
Copy link
Member

keyboardDrummer commented Apr 24, 2024

I plan to make play icons appear in front of assertions when --isolate-assertions or {:isolate_assertions} is used, at which point I think the IDE play icons and --filter-position option fill a similar role as {:only}. @MikaelMayer how do you feel about having these similar features? {:only} also has variations with before and after, and I could imagine a similar feature in --filter-position, where you space a line range instead of a single line.

@MikaelMayer
Copy link
Member Author

It sounds like these icons would integrate nicely with {:only}

@keyboardDrummer
Copy link
Member

It sounds like these icons would integrate nicely with {:only}

How do you mean? I would think they solve a similar problem as {:only}, but in the IDE only, just like --filter-position solves a similar problem as {:only}, but only on the CLI.

@MikaelMayer
Copy link
Member Author

I mean that if you put {:only} on one assertion, you would only see the green or red icons next to the assertion to verify.
But the purpose of {:only} is when verification is on change. Would you have a way in your icons so that verification on change would be constrained?

@keyboardDrummer
Copy link
Member

Would you have a way in your icons so that verification on change would be constrained?

No, the play icons are purely output when you're using verification on change.

I guess when we have assertion level verification caching, you will be able to use verification on change and not need to use either the play icons or {:only}.

@MikaelMayer
Copy link
Member Author

I guess when we have assertion level verification caching, you will be able to use verification on change and not need to use either the play icons or {:only}.

Oh yeah, that would be fantastic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label priority: not yet Will reconsider working on this when we're looking for work
Projects
None yet
Development

No branches or pull requests

2 participants