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

Remove --harness requirement from stubbing #2495

Merged
merged 4 commits into from
Jun 3, 2023

Conversation

celinval
Copy link
Contributor

@celinval celinval commented May 30, 2023

Description of changes:

The compiler can now generate code for different combinations of harnesses with and without stubs. For that, we implemented a little state machine that may execute the underlying rust compiler multiple times. The first run is always for harnesses that don't have stub, while the subsequent runs are for harnesses with stubs.

Resolved issues:

Resolves #1841

Related RFC:

#1809

Call-outs:

  1. I have not changed how the compiler handles Tests and PublicFns reachability yet to minimize the changes in this PR. I created Finish refactoring on how we handle the metadata file for Tests and PubFns #2493 to capture that work.
  2. We should also optimize the number of compiler sessions we execute when multiple harnesses use the same set of stubs. For simplicity, we only handle one harness at a time in this PR: Reduce the compilation overhead for harnesses with the same set of stubs. #2494
    3. Keeping this as a draft since we are blocked waiting for Simplify compiler queries structure (internal) #2486. Once this change goes through, I'll drop the first commit.

Testing:

  • How is this change tested? New tests

  • Is this a refactor change? Kinda

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

For now, nothing has changed for other reachability analysis types.
@celinval celinval marked this pull request as ready for review May 31, 2023 19:08
@celinval celinval requested a review from a team as a code owner May 31, 2023 19:08
Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Thanks @celinval! I have a few comments.

kani-compiler/src/kani_compiler.rs Outdated Show resolved Hide resolved
kani-compiler/src/kani_compiler.rs Show resolved Hide resolved
Copy link
Contributor

@zhassan-aws zhassan-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

celinval and others added 2 commits June 2, 2023 16:15
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
@celinval celinval enabled auto-merge (squash) June 3, 2023 00:10
@celinval celinval merged commit faa4086 into model-checking:main Jun 3, 2023
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.

Remove --harness argument from kani-compiler
3 participants