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

Update LLBC backend for new version of Charon #3807

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

thanhnguyen-aws
Copy link
Contributor

@thanhnguyen-aws thanhnguyen-aws commented Jan 2, 2025

  1. Update LLBC backend to adapt to the changes of Charon submodule to AeneasVerif/charon@adc0a85: Adding the HashMap of filename to file_id which was removed from Charon TranslatedCrate and changing translate_place to fit with the current place representation of Charon.
  2. Support translation of programs that use Trait, but translating the trait impl functions into monomorphized functions.

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

@thanhnguyen-aws thanhnguyen-aws requested a review from a team as a code owner January 2, 2025 17:47
@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Jan 2, 2025
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.

As discussed offline: split this PR into two (or build upon #3801) to separate the changes required to update the Charon submodule from the ones that add support for traits/generics.

kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@carolynzech carolynzech left a comment

Choose a reason for hiding this comment

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

(Had a bit of a race condition with Zyad reviewing, so there may be some repetition with the comments here.)

As a more high-level comment, it'd be great to write some more thorough documentation for each function so that people unfamiliar with Charon can have a basic intuition for what's going on. Nothing too crazy--just 1/2 sentences above each function would help a lot.

kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
}
DefPathData::ValueNs(symbol) => {
// I think `disambiguator != 0` only with names introduced by macros (though
// not sure).
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a TODO to come back and check?

kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs Outdated Show resolved Hide resolved
@zhassan-aws
Copy link
Contributor

Now that #3801 is merged, please change the title of this PR and its description.

@thanhnguyen-aws thanhnguyen-aws changed the title Update charon submodule version Update LLBC backend for new version of Charon Jan 3, 2025
@zhassan-aws
Copy link
Contributor

Update LLBC backend for new version of Charon

I'm not sure the updated title accurately captures what this PR is doing. Are any of the updates needed for the new version of Charon? I thought all such updates were made in #3801.

It seems to me that this PR is primarily about adding support for traits? If so, the title and description should capture that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants