Use partial MASM advice lint in the compiler pipeline
- Langage dominant
- Rust
- Étoiles
- 115
- Forks
- 84
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 15
Description
## Parent
[0xMiden/compiler#1209](https://github.com/0xMiden/compiler/issues/1209)
## What to build
`MasmProjectFrontend::analyze` uses strict MASM disassembly and an unbounded advice taint run. One unsupported procedure can stop the whole lint. A large project can also keep the data flow solver busy for too long.
The frontend can return a partial HIR world with a reason for each skipped procedure. Advice taint analysis can stop at a work limit and keep the findings it has already found. Use these paths in `MasmProjectFrontend::analyze`:
- Call `disassemble_project_target_for_lint` with the parsed target sources and `cx.assembly().dependency_graph`.
- Emit one warning for each skipped procedure. Include its path, source span, and reason.
- Run `AdviceTaintAnalysis::run_with_config_allow_partial` with interprocedural analysis and a worklist limit of 10,000.
- Emit all findings collected before the limit.
- Emit a warning when the solver stops at the limit.
Keep the current root target check and `hir.analyzed` checkpoint. Keep strict compilation unchanged. The fixed limit is a hard cutoff. No fallback path is needed.
## Acceptance criteria
- [ ] A project with one skipped procedure still reports a finding from another procedure.
- [ ] A small worklist limit returns partial findings and an incomplete analysis warning.
- [ ] The lint uses the target already chosen by the compiler and the full resolved source dependency graph.
- [ ] Skipped and incomplete warnings follow `-Dwarnings`.
- [ ] With no promoted warning, `-Canalyze-only` publishes the result and stops at `hir.analyzed`.
- [ ] Dependencies are not linted as root targets.
- [ ] A Miden VM core lint run reaches advice analysis and reports findings plus skipped coverage within the fixed limit.
## Blocked by
- [0xMiden/miden-vm#3457](https://github.com/0xMiden/miden-vm/issues/3457)
- [0xMiden/compiler#1304](https://github.com/0xMiden/compiler/issues/1304)
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The work is in `MasmProjectFrontend::analyze`. Start by reading the linked parent issue #1209 and the blocked issues #3457 and #1304 to understand the context. Look at the existing `disassemble_project_target_for_lint` and `AdviceTaintAnalysis` implementations. The goal is to modify the analysis to handle partial results and emit warnings for skipped procedures and incomplete analysis. Run the compiler's lint tests to verify the new warnings are emitted correctly and the analysis stops at the specified work limit.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- compilers, devtools
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100