implements PLN-0005

This commit is contained in:
2026-03-27 17:01:40 +00:00
parent 124c6d078e
commit e0c57814e1
12 changed files with 143 additions and 10 deletions
@@ -52,6 +52,24 @@ Rules:
- Builtin simple types are resolved without import or declaration.
- User-authored type declarations must not reuse builtin simple type names.
### 2.2.1 Backend-provided symbolic asset surface
PBS static semantics may consume a backend-provided symbolic asset surface.
Rules:
- The frontend-facing symbolic asset surface is rooted at `assets`.
- `assets` is a compile-time namespace root, not an ordinary runtime value by default.
- Intermediate `assets...` nodes are namespace-only and MUST NOT be treated as terminal asset values.
- Terminal asset leaves are represented statically as `Addressable`.
- For PBS v1, `Addressable` is the canonical public/editorial type shape for symbolic asset references.
- The PBS frontend may use a fake/frontend-owned `Addressable` type surface for semantics and tooling.
- This frontend-owned surface MUST NOT transfer final validation or executable lowering ownership away from the backend.
- The backend-provided asset surface contract for v1 is `List<Addressable(address, asset_id)>`.
- The canonical symbolic identity of an asset reference is its normalized `address`, not `asset_name`.
- `asset_name` MUST NOT remain the operational compile-time identity for symbolic asset lookup.
- A terminal asset path MUST NOT also act as a namespace prefix for descendant assets.
### 2.3 Attribute metadata
Attributes are compile-time metadata attached to declaration surfaces.
@@ -217,6 +235,9 @@ Rules:
- `BuiltinConst.target` and `BuiltinConst.name` MUST be non-empty string literals.
- `BuiltinConst.version` MUST be a positive integer literal.
- Two builtin constant declarations in the same resolved stdlib environment MUST NOT lower to the same canonical `(target, name, version)` unless they denote the same builtin constant declaration after project/module resolution.
- 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.
### 3.4 Constant expressions