feat(pbs): add parametric arrays and concrete generic contracts
Support explicit contract type parameters, canonical nominal applications, recursive substitution, concrete implementations and instantiated editor views. Complete parametric Array syntax and contextual construction integration. Preserve type origins across imports and reexports, fix trait argument stack order, and relocate global slots before lifecycle assembly. Publish specs, installed examples and consolidated discussion lessons. Validate frontend, common pipeline, architecture, LSP and installed knowledge gates, plus the full production VM conformance corpus with 14 generic fixtures.
This commit is contained in:
@@ -7,7 +7,7 @@ From the Studio root:
|
||||
|
||||
```sh
|
||||
./gradlew :prometeu-compiler:prometeu-build-pipeline:test --tests '*LinkedRegistryTest' --tests '*PbxRegistryConformanceTest' --tests '*TypedCommonPipelineTest' --tests '*RuntimeCatalogPipelineTest'
|
||||
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeAlignmentTest' --tests '*PbsStructuredValuesTest' --tests '*PbsClosuresTest'
|
||||
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeAlignmentTest' --tests '*PbsStructuredValuesTest' --tests '*PbsClosuresTest' --tests '*PbsGenericContractsTest'
|
||||
python3 tools/pbx-conformance/run.py --runtime ../runtime
|
||||
```
|
||||
|
||||
@@ -196,3 +196,31 @@ claims. Qualify those separately with the provider's `random_contract` suite and
|
||||
`cargo test -p prometeu-vm --lib random` in debug/release. No alternate RNG or
|
||||
public injection hook is used. Installed knowledge validation remains a separate
|
||||
gate for packaged SDK/spec/example resources.
|
||||
|
||||
## PBS generic contracts
|
||||
|
||||
`PbsGenericContractsTest` generates fourteen mandatory source fixtures:
|
||||
`identity`, `manual`, `multiple`, `tuple`, `optional`, `function`, `contract`,
|
||||
`native`, `recursive`, `phantom`, `receiver`, `gc`, `installed` and `imports`.
|
||||
The corpus uses ordinary concrete Trait descriptors on the existing runtime.
|
||||
It checks several applications on one owner, ordered substitution, composed
|
||||
multi-slot values, finite recursion, canonical aliases/reexports and distinct
|
||||
same-named argument declarations. The imported program uses the production
|
||||
workspace builder and lifecycle assembler.
|
||||
|
||||
The generic and handwritten concrete identity fixtures both execute with one
|
||||
heap handle, establishing that contract adaptation needs no generic wrapper.
|
||||
Typed absence and implementation index zero are valid. A mismatched Trait call
|
||||
must be rejected by the verifier or trap with the runtime type check. The GC
|
||||
fixture retains a contract receiver through a closure while at least 1,100
|
||||
discarded objects are reclaimed. Reduced GuestBytes, HandleSlots and loader
|
||||
implementation limits verify refusal and ownership release. Descriptor counts
|
||||
and PBX byte sizes are printed as evidence, without a performance threshold.
|
||||
|
||||
```sh
|
||||
./gradlew :prometeu-architecture-tests:test --tests '*PbsGenericContractsTest'
|
||||
python3 tools/pbx-conformance/run.py --runtime ../runtime --generic-contracts-only
|
||||
```
|
||||
|
||||
The full harness also requires these fixtures. The driver uses an external
|
||||
runtime checkout without editing its sources or changing PBX, ISA or quotas.
|
||||
|
||||
Reference in New Issue
Block a user