Skip to content

Validate canonical Workshop WIR contracts required by remaining OPY interoperability gaps #123

Description

@e54-bot

Goal

Validate that the canonical Workshop semantics required by the remaining OPY interoperability fixtures are representable by workshop-rs, and complete only missing Workshop-owned contracts.

Source-language constructs must be lowered before WIR unless Workshop itself owns an equivalent canonical semantic construct. WIR preserves canonical Workshop semantics, not OPY source structure.

Context

The completed opy-rs compiler baseline exposed remaining interoperability fixtures around:

  • dictionary-indexed assignment/value access (opy-rs synthetic/issue-46-unsupported)
  • nested conditional switch break (opy-rs synthetic/issue-47-unsupported)
  • multiple reachable switch breaks (opy-rs synthetic/issue-47-switch-multiple-break)

These fixtures do not by themselves justify OPY-specific WIR carriers:

  • OPY dictionaries remain an OPY/HIR concept. WIR carries only the resulting canonical Workshop indexed/member operations.
  • OPY switch / break remain source-language control-flow constructs. They must lower to canonical Workshop control-flow primitives before WIR unless Workshop independently defines an equivalent semantic construct.
  • Skip / Skip If and similar native Workshop actions should remain canonical catalog actions represented through the existing generic action carrier rather than new OPY-motivated WIR variants.
  • AssignMember represents a canonical Workshop assignment target that is not a plain declared global/player variable. It does not imply dictionary, object, map, or other source-language container semantics.

Scope

  • Validate the canonical Workshop indexed/member-access semantics required by the dictionary interoperability fixture, including the existing memberAccess / AssignMember contract.
  • Validate the canonical Workshop control-flow primitives required to lower the two break fixtures, including catalog/WIR/parser/emitter/validation support for the required native actions.
  • Add or correct Workshop-owned catalog, WIR, parser, emitter, or validation behavior only where the canonical Workshop contract is actually incomplete.
  • Add independent Workshop evidence for supported semantics and keep unsupported states explicit where Workshop itself has no canonical representation.
  • Establish a consumable owner contract that opy-rs can use without copying Workshop semantics.

Non-goals

  • No Dictionary, Break, or Switch WIR nodes solely to preserve OPY source structure.
  • No OPY parser, HIR, preprocessing, dictionary semantics, switch semantics, or lowering logic in workshop-rs.
  • No widening of AssignMember into a source-language container abstraction.
  • No opportunistic solution of nested/multidimensional OPY indexed-assignment policy; that remains owned by opy-rs.
  • No acceptance based only on emitted text/reparse round-trip.
  • No live-runtime guarantee beyond the reviewed Workshop contract.

Acceptance criteria

  • The Workshop semantics required by each remaining interoperability fixture are classified using independent Workshop evidence, not inferred from OPY syntax.
  • The dictionary fixture's lowered indexed/member operations are either representable through the canonical Workshop WIR contract or fail at a documented Workshop-owned boundary.
  • The two break fixtures' required native Workshop control-flow primitives are either representable through canonical catalog/WIR/parser/emitter/validation behavior or the missing Workshop-owned contract is completed here.
  • Supported semantics have direct canonical-WIR equivalence coverage and deterministic parse/emit behavior where applicable.
  • No OPY-specific Dictionary, Break, or Switch semantic carrier is introduced into WIR.
  • AssignMember remains a Workshop assignment-target contract and does not acquire dictionary/object/container type semantics.
  • Any remaining gap after the Workshop owner contract is complete is explicitly handed back to opy-rs lowering rather than bypassed in workshop-rs or Wright.
  • opy-rs can consume the released Workshop contract without duplicating canonical Workshop semantics or introducing fallback behavior.

Dependencies / ownership

  • Owning repo: workshop-rs for canonical Workshop semantics, WIR, catalog, parsing, emission, and validation.
  • Consumer: opy-rs for OPY HIR semantics and lowering into the released Workshop contract.
  • Cross-repository order: owner contract/evidence → consumable workshop-rs release → opy-rs integration → interoperability verification.

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