3.6 KiB
3.6 KiB
PBS IR and Lowering Workshop 1
Status: Active
Purpose
Run the first focused discussion for 12. IR and Lowering Specification.md on the front door of lowering:
- what the lowering contract consumes,
- whether IR itself is normative,
- and which semantic obligations must be preserved independent of IR shape.
Why This Slice First
This slice should come first because every later lowering discussion depends on knowing:
- what counts as a well-formed input to lowering,
- and whether the spec standardizes one IR shape or only semantic preservation duties.
Proposed Meeting Order
- Reconfirm already-settled lowering inputs.
- Close the preconditions for lowering.
- Close the normative status of IR.
- Close the minimum preserved semantic obligations.
- Record construct-specific issues for later workshops.
Decisions To Produce
- The normative status of IR in PBS v1.
- The minimum required input state before lowering begins.
- The semantic facts that lowering must preserve regardless of IR architecture.
- The boundary between
12and15.
Candidate Decisions
1. Standardize Preserved Obligations, Not One Canonical In-Memory IR
Candidate direction:
- PBS v1 does not require one canonical compiler IR data model,
- but it does require one stable set of preserved semantic obligations.
Rationale:
- This keeps the spec implementation-neutral while still preventing semantic drift.
Alternative to discuss:
- define one normative abstract IR grammar in the spec.
2. Lowering Preconditions Require A Fully Bound Program
Candidate direction:
- parsing, name resolution, visibility/linking, and type checking must already be complete,
- reserved builtin and host metadata must already be validated,
- callable sets and canonical identities must already be resolved.
Rationale:
- Lowering should not invent unresolved semantic answers.
3. Minimum Preserved Obligations Include Evaluation Order, Identity, and Host Boundary Facts
Candidate direction:
- lowering must preserve: source-observable evaluation order, abrupt-completion behavior, value-identity and aliasing facts, host-boundary crossings, and trap-versus-propagation distinctions.
Rationale:
- These are the semantic anchors later workshops will rely on.
4. 15 Owns Final Artifact Layout, 12 Owns The Contract Before It
Candidate direction:
12defines the semantic and artifact-facing invariants a lowered program must satisfy,15defines the final PBX and bytecode mapping details.
Rationale:
- This keeps the lowering spec from collapsing into artifact byte layout.
Questions To Resolve In The Room
- Is obligations-only precise enough, or does PBS need a normative abstract IR?
- Should canonical identity resolution be fully complete before lowering?
- Which semantic facts are mandatory to preserve explicitly rather than infer later?
- Does
12need one explicit “bound program” model? - How much artifact vocabulary can
12use before it starts stealing15's job?
Expected Outputs
- a decision record on IR status,
- a decision record on lowering preconditions,
- and a checklist of preserved semantic obligations for
12.
Explicit Deferrals For Workshop 2
- control-flow shapes,
- propagation operators,
- and callable-category-specific lowering.
Inputs
docs/pbs/specs/9. Dynamic Semantics Specification.mddocs/pbs/specs/10. Memory and Lifetime Specification.mddocs/pbs/specs/12. IR and Lowering Specification.mddocs/pbs/specs/15. Bytecode and PBX Mapping Specification.mddocs/pbs/agendas/12. IR and Lowering Agenda.md