Skip to content

LLBC: name methods with Charon's impl path elements instead of a type suffix #4884

Closed

Description

@feliperodri

The LLBC backend names a method by appending the implementing type to its name, because the {impl} path element is dropped: test::getCounter for impl Counter { fn get() }, core::num::wrapping_addu8 for u8::wrapping_add, test::get_valA for impl T for A { fn get_val() }.

Charon's own translation keeps the impl in the path instead (PathElem::Impl(ImplElem::Ty(..)) / ImplElem::Trait(..)), which is what Aeneas and Charon's name matching expect — compute_short_names, for instance, looks for PathElem::Impl(ImplElem::Trait(..)) to shorten trait impl names.

Worth switching once the Charon bump (#4883) lands. It renames every method in the output, so it's better as its own change than folded into the bump. The name builder is defid_to_name / def_to_name in kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs (consolidated in #4882).

Activity

  1. added
    [C] InternalTracks some internal work. I.e.: Users should not be affected.
    on Sep 27, 2026
  2. added 2 commits that reference this issue on Sep 29, 2026
    1e22d6f
    bd66942
  3. added a commit that references this issue on Sep 30, 2026
    9fafffb
  4. added a commit that references this issue on Sep 30, 2026
    358baf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] InternalTracks some internal work. I.e.: Users should not be affected.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions