[anneal] Spec generation uses unqualified type names for imported Rust types
Open
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
When a Rust function uses a type via `use` import (e.g., `use std::sync::atomic::Ordering`), Anneal's spec generator derives the Lean type name from the syn AST, which only contains the short name `Ordering`. This conflicts with Lean's native `Ordering` type brought into scope by `open Aeneas.Std`, causing type mismatches in generated `Pre`/`Post` structs.
Aeneas already has the fully-qualified type information in its generated `Funs.lean` signatures (e.g., `core.sync.atomic.Ordering`). The spec generator could parse these signatures and use the qualified names as overrides.
Contributor guide
Assessment
This issue has not been assessed yet.