Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Handling of #[test] is a hack #4

Open
alastairreid opened this issue Sep 1, 2020 · 0 comments
Open

Handling of #[test] is a hack #4

alastairreid opened this issue Sep 1, 2020 · 0 comments
Labels
CargoVerify Related to cargo-verify driver script enhancement New feature or request

Comments

@alastairreid
Copy link
Contributor

alastairreid commented Sep 1, 2020

The right way to support #[test] in a formal verification tool is almost certainly to implement it as part of rustc because that is how it is supported for testing.
Instead, we jump through a number of hoops to

  • make a list of all the tests
  • find the mangled names of tests
  • invoke each test individually
  • find whether a test #[should_panic]
  • run N copies of the verifier in parallel

This allows us to write tests that work for both dynamic verification (testing / fuzzing) and static verification (symbolic execution, model checking, ...) but the result is that scripts/cargo-verify is a collection of hacks to do the above.

The current approach makes it possible to experiment with the interface and understand the issues - but, in the long run, some changes to rustc will probably be required.

@alastairreid alastairreid added the enhancement New feature or request label Sep 1, 2020
@alastairreid alastairreid added the CargoVerify Related to cargo-verify driver script label Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CargoVerify Related to cargo-verify driver script enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant