4.0 KiB
4.0 KiB
PBS Frontend IR and Lowering Agenda
Status: Active
Purpose
Drive closure of 13. Lowering IRBackend Specification.md for frontend scope only.
This agenda exists to define the first normative lowering boundary:
- PBS source to frontend IR (
IRBackend/IRBackendFile), - deterministic diagnostic behavior for unsupported or invalid source forms,
- and test-backed acceptance criteria for Gate U.
Scope Boundary
In scope:
- lexer/parser/AST/linking outputs consumed by frontend lowering,
- semantic facts that must be preserved in frontend IR,
- deterministic rejection classes and diagnostic attribution,
- and conformance evidence for frontend gates.
Out of scope:
- VM lowering,
- bytecode/PBX mapping,
- runtime execution behavior,
- verifier/loader algorithms.
Decisions To Produce
- Decide whether
13standardizes one frontend IR shape or only preserved obligations. - Decide the minimum preconditions before frontend lowering begins.
- Decide which semantic facts must be explicit in frontend IR for v1.
- Decide the minimum deterministic rejection set for unsupported frontend-lowering cases.
- Decide the gate evidence expected from tests (
lexer/parser/AST/IRBackend/diagnostics).
Core Questions
- What is the minimum frontend IR contract that keeps implementation practical and testable now?
- Which source-observable guarantees must already be explicit before any backend stage exists?
- Which constructs are in-scope for v1 lowering and which must fail deterministically?
- What diagnostics identity must be stable for lowering-related frontend failures?
- Which regression fixtures become mandatory Gate U evidence?
Proposed Workshop Sequence
Workshop 1: Frontend Lowering Contract and Preconditions
Purpose:
- close input preconditions,
- and close the normative status of frontend IR.
Expected decisions:
- obligations-only versus canonical frontend IR model,
- and minimum required bound-program state before lowering.
Workshop 2: Expressions, Control Flow, and Propagation in Frontend IR
Purpose:
- close frontend-lowering obligations for core expression/control-flow forms.
Expected decisions:
- once-only evaluation obligations in frontend IR terms,
- representation obligations for branching and propagation constructs.
Workshop 3: Callable Categories in Frontend IR
Purpose:
- close frontend-lowering obligations for functions, callbacks, services, and contracts as source-level categories.
Expected decisions:
- minimum callable metadata preserved in frontend IR,
- and deterministic rejection boundaries for unsupported callable forms.
Workshop 4: Builtins, Diagnostics, and Test Gates
Purpose:
- close builtin-facing frontend obligations plus gate-ready diagnostics/test evidence.
Expected decisions:
- frontend treatment of builtin shells/metadata at lowering boundary,
- minimum diagnostics identity and attribution for lowering-related failures,
- and required fixture families for Gate U.
Expected Spec Material
The resulting 13 content should close:
- lowering preconditions for frontend scope,
- frontend IR preserved-obligation model,
- construct-by-construct frontend lowering baseline,
- deterministic unsupported-case rejection policy,
- and frontend-facing diagnostic/test evidence hooks.
Non-Goals
- Defining VM or bytecode artifacts.
- Freezing runtime semantics in this agenda.
- Defining verifier or loader internals.
- Freezing optimizer architecture.
Inputs
docs/pbs/specs/3. Core Syntax Specification.mddocs/pbs/specs/4. Static Semantics Specification.mddocs/pbs/specs/9. Dynamic Semantics Specification.mddocs/pbs/specs/10. Memory and Lifetime Specification.mddocs/pbs/specs/12. Diagnostics Specification.mddocs/pbs/specs/13. Lowering IRBackend Specification.mddocs/general/specs/13. Conformance Test Specification.mddocs/general/specs/14. Name Resolution and Module Linking Specification.mddocs/general/specs/19. Verification and Safety Checks Specification.md