You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LLBC backend: uses of const items produce LLBC that Charon and Aeneas reject #5046
kani test.rs -Zlean writes the file, but charon pretty-print on it panics (called Option::unwrap() on a None value in TranslatedCrate::item_name), and Aeneas fails with an uncaught Not_found exception. This happens on main and on #5045.
translate_constant_value translates ConstantKind::Unevaluated as a reference to a global (register_global_decl_id), but the backend never translates the global itself, so the crate refers to an item it doesn't declare. At rustc's default MIR optimization level, many such constants are folded into plain values before the backend sees them; at -Zmir-opt-level=0, which #5045 uses for LLBC runs, they stay unevaluated, so this comes up for more code (for example a zero-sized const item, which is how I hit it while reviewing #5045).
Two ways to fix it: translate the referenced globals as GlobalDecls (with their initializer bodies, as Charon does), or evaluate constants that have no generic parameters and emit their value. The first matches Charon's output; the second is simpler but loses the link to the item.
Activity
Experiment TODO: link model-checking#5045, model-checking#5046 and th…