google / google/zerocopy

[anneal] Spec generation uses unqualified type names for imported Rust types

Open
#3,350 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.