Skip to content

LLBC backend: translate a crate's generic items without a proof harness #5050

Description

@feliperodri

-Zlean translates what a #[kani::proof] harness reaches. A library with no harness produces no LLBC at all:

pub fn id<T>(x: T) -> T { x }

kani lib.rs -Zlean writes no .llbc file. To prove a property of generic code for every T, the natural input is the crate's public items, the way charon translates a crate. Today the workaround is a dummy harness that calls each function with some concrete type, which only adds noise (the backend translates the generic body anyway).

The compiler's LLBC interface has a ReachabilityType::PubFns branch, but I haven't found a driver option that selects it together with -Zlean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Z-Kani CompilerIssues that require some changes to the compiler[C] Feature / EnhancementA new feature request or enhancement to an existing feature.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions