feat(pbs): add service constants and runtime math integration

This commit is contained in:
2026-10-17 11:21:58 +01:00
parent 2a418085d2
commit d1e9259085
32 changed files with 1117 additions and 40 deletions
+29
View File
@@ -131,3 +131,32 @@ threshold collections, retained closure/object reachability after frame one,
and reclamation after release. The remaining root is the global array.
PBS publishes FRAME_ROOT and the existing guarded wrapper returns normally.
No sync syntax, new frame integration, suspension or coroutine is introduced.
## PBS service constants and runtime math
`PbsRuntimeMathTest` produces 261 independent numeric cases in both ordinary and
optimized bytecode (522 mandatory executions per runtime profile), covering all
26 math/mathf signatures. The checked-in corpus preserves 240 provider scalar
fixture rows and exact contract examples (duplicates removed); provenance is in
`prometeu-architecture-tests/src/test/resources/math/provenance.txt`.
The harness verifies exact bits/faults, selected intrinsic identity and one
retained call per case. Single-step charging is compared with the provider's
opcode costs and independent fixture call cost; full-budget charging must equal
their sum, and optimization must preserve total cycles. Additional cases exercise
pi/tau, literal sin, ordinary int/long service constants, constant dependencies,
and real module imports with service aliases. The installed example also imports
both SDK services, so installedKnowledgeTest covers their packaged resources.
```sh
./gradlew :prometeu-architecture-tests:test --tests '*PbsRuntimeMathTest'
python3 tools/pbx-conformance/run.py --runtime ../runtime --math-only
python3 tools/pbx-conformance/run.py --runtime ../runtime --math-only --release
```
Omit `--math-only` for the full existing corpus. `--release` selects the optimized
Rust runtime harness; it is independent of the PBS optimizer variants included in
every run. Optional `CARGO_TARGET_DIR` can retain build artifacts outside the
runtime checkout. Each invocation prints runtime revision, platform, profile,
features, lockfile and provider catalog/oracle hashes. Local evidence qualifies
macOS/arm64 only; macOS/x86_64 and Linux/x86_64 remain pending.