Skip to main content

Module analysis

Module analysis 

Source
Expand description

Semantic analysis pass over the parsed AST.

The parser produces a syntactic AST and catches structural errors. This module walks the AST to find semantic issues: undefined references, unused bindings, state-machine gaps, and migration hints.

Structs§

AmbiguousImports
Names declared, and triggers provided or emitted, by more than one of a file’s imported modules. Computed by multi-file checking; an unqualified reference to one of these names cannot be attributed to a single import (issue #15). Each entry maps the ambiguous name to the sorted use aliases it could resolve to — one alias per distinct target file, so two aliases for the same file are not ambiguous.

Functions§

analyse
Run structural checks plus process-level analysis (allium analyse). Returns diagnostics and typed findings with evidence.
analyse_with_cross_module
Run structural checks plus process-level analysis with full cross-module context.
analyse_with_external_refs
Run structural checks plus process-level analysis, accounting for cross-module references.
analyze
Run structural checks on a parsed module (allium check). Returns line-level diagnostics only.
analyze_with_cross_module
Run structural checks with full cross-module context.
analyze_with_external_refs
Run structural checks, accounting for cross-module references.
collect_all_referenced_idents
Collect all uppercase identifiers referenced in expressions across a module.
collect_declared_names
Collect all type names declared by a module (entities, external entities, values, enums, actors, contracts, variants).
collect_qualified_references
Collect all qualified-name references (qualifier/Name) from a module.
collect_trigger_outputs
Collect the trigger names a module makes available to listeners: triggers provided by its surfaces plus triggers emitted by its rules’ ensures clauses (the same sets the unreachable-trigger check consults locally).