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

Idea: Program analyses/annotation for not verifying 'dead code' #1222

Open
sakehl opened this issue Jul 9, 2024 · 0 comments
Open

Idea: Program analyses/annotation for not verifying 'dead code' #1222

sakehl opened this issue Jul 9, 2024 · 0 comments
Labels
A-Enh Enhancement F-C Frontend: C F-GPU Frontend: OpenCL/Cuda

Comments

@sakehl
Copy link
Contributor

sakehl commented Jul 9, 2024

So with C/CUDA/OpenCL files we can and should include headers. These headers are automatically inserted in the file send to VerCors, due to the preprocessor.

But if functionality of a header is never used, it is still verified by VerCors.

There are several things to consider here.

  • We could make all functions in headers abstract. This helps, but can cause unsoundness.

    • The unsoundness can be counteracted to also have a version of the header with a concrete implementation, from which we automatically generate the abstract headers. Or something similar.
  • Even if all functions are abstract, we still do the 'pre-condition is not false' check, thus still overhead.

  • We could also add an annotation, which marks a function to be not checked. Something like /*@ unchecked @*/ or /*@ header @*/. Then if such a function is included, we always make it abstract/do not check the precondition. Or we could do a dead-code analyses, which removes any such function if it is never called.

I don't think it matters to much at the moment, but some header files can get quite big, thus could lead to slower verification if we keep adding new features.

It also pollutes the generated .vpr files with backend-file-base which is annoying but meh.

@sakehl sakehl added A-Enh Enhancement F-C Frontend: C F-GPU Frontend: OpenCL/Cuda labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Enh Enhancement F-C Frontend: C F-GPU Frontend: OpenCL/Cuda
Projects
None yet
Development

No branches or pull requests

1 participant