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

AutoValue unsoundness, Test Suite runner, Paths with spaces #1252

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

superaxander
Copy link
Member

This PR adds an error for a case where AutoValue was unsound namely when it was combined with other permission resources for the same field which could result in permission amounts greater than 1 (but in a way where you could still call the method erroneously without warning if you disabled smoke checks) At first I thought simply adding an implication perm(a.f) == none ==> Perm(a.f, read$()) would fix the issue since that prevents you from getting more than write permission, however we can then no longer perform the leak check. I might try later to see if I can do something like \old(perm(a.f)) == none in the postcondition to conditionally add the leak check when necessary, this would still mean restricting the order in which the permissions may appear. (AutoValue must come after the normal permission resource statements)

Additionally this PR also adds bin/testSuite which you can use to run the entire testSuite or specific test cases from the command line. To run all tests simply run bin/testSuite, to run a specific test class run bin/testSuite -s vct.test.integration.examples.AutoValueSpec replacing the class with your test class, or to run a specific test using its name (or part of its name use bin/testSuite -s vct.test.integration.examples.AutoValueSpec combination. (this last command runs the test added by this PR whose name contains the filename combination.pvl which we can match on with -z) Full usage details are here: https://www.scalatest.org/user_guide/using_the_runner

Finally this PR also updates the runner scripts (on linux at least) and the classpath files (on all platforms) to work when VerCors is run from a path containing spaces.

command, fix runner commands when running vercors in a path with spaces
@superaxander superaxander merged commit 3cb0d92 into dev Sep 27, 2024
19 checks passed
@superaxander superaxander deleted the unsound-auto-value branch October 9, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant