implements PLN-0007

This commit is contained in:
2026-03-27 17:24:36 +00:00
parent 4a6cc35989
commit d28916578b
14 changed files with 357 additions and 12 deletions
@@ -203,6 +203,9 @@ At minimum, the PBS diagnostics baseline must cover:
- unresolved terminal asset reference,
- namespace-versus-terminal asset misuse,
- structurally invalid symbolic asset path admitted by source syntax but rejected by semantic surface rules.
10. ignored-value diagnostics for expression statements, including:
- a stable warning when a materialized value is produced and then ignored,
- and no warning for unit-like expression statements.
At minimum, host-admission diagnostics must cover missing or malformed host capability metadata and unknown or undeclared capability names.
@@ -229,7 +232,9 @@ When failures exist, implementations must still preserve deterministic diagnosti
## 11. Cost Diagnostics and Warning Policy
Warnings are supported and recommended in v1, but they are not part of the minimum mandatory conformance baseline.
Warnings are supported in v1, and one warning is mandatory for PBS core: ignored materialized values in expression statements.
The mandatory warning identity for this rule is `W_SEM_IGNORED_VALUE`.
Tooling may surface qualitative cost facts as warnings or notes, especially for:
@@ -188,6 +188,12 @@ When a host-backed callsite also depends on backend-owned symbolic asset lowerin
- the preserved symbolic operand MUST remain attributable to a backend-provided `Addressable` identity;
- backend stages MUST be able to rewrite that symbolic operand into runtime-facing `asset_id` before the final low-level host path is emitted.
When an expression statement leaves a materialized runtime value on the stack:
- `IRBackend` lowering MUST emit explicit discard behavior rather than relying on implicit backend stack cleanup;
- for single-slot materialized values this discard is represented by `POP`;
- and the discard path MUST preserve stack-accounting validity for subsequent backend lowering stages.
### 12.4 VM-owned metadata obligations
VM-owned intrinsic callsites admitted at this boundary must preserve canonical intrinsic identity:
@@ -238,6 +238,9 @@ Rules:
- Symbolic asset references admitted by the frontend MUST resolve against the backend-provided `Addressable` surface rather than by direct packer queries.
- A valid symbolic asset reference MUST correspond to a terminal `Addressable` entry in the backend-provided surface.
- Intermediate `assets...` namespace nodes MUST NOT type-check as `Addressable` values.
- An expression statement MAY evaluate an expression that has a materialized value type.
- When an expression statement ignores a materialized value, PBS v1 MUST emit the ignored-value warning defined by the diagnostics specification.
- Unit-like expression statements MUST NOT emit the ignored-value warning.
### 3.4 Constant expressions