You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the first production lowering path from validated typed DEL HIR into workshop_rs::wir::Program for the core DEL/OSTW surface, using canonical Workshop identities and returning structured diagnostics for constructs whose runtime lowering is not yet implemented.
Context
The Workshop integration boundary is concrete: released workshop-rs 0.1.1 provides the canonical catalog/WIR contract, including the full reviewed rule-event surface from workshop-rs#12, and #29 establishes the direct dependency/catalog provider seam.
This issue should prove the HIR -> canonical WIR boundary before adding the more complex object/reference runtime encodings tracked separately.
Scope
Build canonical WIR file/source provenance from the DEL source registry.
Allocate global variables, player variables, and subroutines deterministically, honoring evidence-backed explicit source IDs/reservations where applicable.
Lower top-level initializers into correct Workshop initialization behavior without adding semantics to workshop-rs.
Lower supported control flow, including if, while, and direct Workshop for forms where the current HIR carries sufficient intent.
Lower the declared DEL rule-event inventory through the canonical event contract shipped in workshop-rs 0.1.1; do not introduce a local event representation.
Validate every produced program through workshop_rs::wir::Program::validate and canonical Workshop validation where applicable.
Preserve DEL spans/provenance on WIR variables, rules, actions, and values wherever the public WIR model supports it.
Add focused positive/negative tests tying each supported lowering category to DEL corpus evidence and canonical WIR invariants.
Return stable structured lowering diagnostics for advanced/runtime/project constructs not yet supported; never silently drop or approximate them as successful compilation.
Non-goals
Class/object allocation, delete, stale-reference generation checks, virtual dispatch, recursion stacks, closure runtime encoding, or other advanced runtime layout decisions.
Duplicating catalog/WIR/emitter logic from workshop-rs.
Parent: #8
Goal
Implement the first production lowering path from validated typed DEL HIR into
workshop_rs::wir::Programfor the core DEL/OSTW surface, using canonical Workshop identities and returning structured diagnostics for constructs whose runtime lowering is not yet implemented.Context
The Workshop integration boundary is concrete: released
workshop-rs 0.1.1provides the canonical catalog/WIR contract, including the full reviewed rule-event surface fromworkshop-rs#12, and #29 establishes the direct dependency/catalog provider seam.This issue should prove the HIR -> canonical WIR boundary before adding the more complex object/reference runtime encodings tracked separately.
Scope
workshop-rs.if,while, and direct Workshopforforms where the current HIR carries sufficient intent.workshop-rs 0.1.1; do not introduce a local event representation.workshop_rs::wir::Program::validateand canonical Workshop validation where applicable.Non-goals
delete, stale-reference generation checks, virtual dispatch, recursion stacks, closure runtime encoding, or other advanced runtime layout decisions.workshop-rs.Acceptance criteria
Dependencies
workshop-rs 0.1.1dependency, provider, and provenance bridge.wrightkit/workshop-rs#12— complete; its event contract is already included inworkshop-rs 0.1.1.