14.3 Semantic pipeline
Analysis rules, typing, mod analyze/rewrite, and the diagnostic registry.
Semantic pipeline
Parsing proves you speak Beskid syntax. Semantic analysis proves you meant something allowed.
Rules pipeline
Section titled “Rules pipeline”Hub: Rules pipeline contract.
- Staged rules in
beskid_analysis::analysis::rules::staged - Diagnostic codes in Diagnostic code registry
- Language-meta bands (e.g. E16xx contracts) referenced, not duplicated
Mod phases (semantic-adjacent)
Section titled “Mod phases (semantic-adjacent)”After optional generate/merge/reparse, mods run analyze and rewrite on the merged program:
flowchart LR parse[Parsed AST] gen[mod.generate + merge] sem[Semantic rules] rewrite[mod.rewrite fixes] lower[codegen.lower] parse --> gen --> sem --> rewrite --> lower
beskid analyze
Section titled “beskid analyze”Runs analysis without requiring a successful JIT—your CI friend for “no, you cannot call that.”
Book reference: Semantic analysis, Semantic rules.