Skip to content

refactor(parser): separate authored binding labels from printer-generated SSA names #112

Description

@zhen8838

Context

The parser migration keeps BindingMetadata on authored HIR expressions, while the inspection printer also synthesizes names for nested expressions and loop yields. These concerns currently overlap.

The GQA round-trip case exposes the boundary: score, m_new, corr, and p are authored bindings, while names such as score_2 or v5 are printer-generated implementation details. The canonical inspection contract requires unique bindings and a round-trippable script; it does not require a particular numeric suffix.

Proposed follow-up

  • Define ownership and propagation rules for authored BindingMetadata.
  • Keep printer-generated SSA names separate from authored metadata.
  • Ensure grid-loop yields and nested calls receive deterministic, unique canonical names.
  • Update the inspection round-trip assertions to check the public contract rather than incidental suffixes.

CallFeed is intentionally out of scope for this issue. No behavior change is requested in the parser-migration PR beyond preserving the existing authored inputs and fixing placed-layout construction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions