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

Delay writing metadata file (no UX impact) #2628

Merged
merged 4 commits into from
Jul 29, 2023

Conversation

celinval
Copy link
Contributor

@celinval celinval commented Jul 27, 2023

Description of changes:

Kani compiler will now only store KaniMetadata after compiling all harnesses. Before, we were storing before codegen in the first iteration of the compiler.

This will still allow us to generate metadata without actually performing codegen, if we ever implement a kani list subcommand. The metadata won't be stored though if Kani fails to codegen. However, we don't do anything extra with that file if the compilation fails.

This change is required for #2493 and contracts work. This will allow us to store information collected during code generation.

Resolved issues:

Related to #2493

Related RFC:

N/A

Call-outs:

Testing:

  • How is this change tested? Existing tests

  • Is this a refactor change? yes

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.

Change required for model-checking#2493
and contracts work. This will allow us to store information collected
during code generation.
@celinval celinval requested a review from a team as a code owner July 27, 2023 01:33
@zhassan-aws
Copy link
Contributor

Can you clarify in the description which compilation stage the writing of the metadata file was delayed to (and which stage it was currently written in)?

Copy link
Contributor

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

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

LGTM.

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

Also, not trying to rush (well maybe a bit) but I'm sorta waiting for this to get merged so I can finish the contracts rewrite that uses stubbing.

@celinval celinval enabled auto-merge (squash) July 28, 2023 23:17
@JustusAdam
Copy link
Contributor

Nice

@celinval celinval merged commit f024d23 into model-checking:main Jul 29, 2023
12 checks passed
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.

4 participants