interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / evidence / typed-views.md

231 lines · 15279 bytes Raw Blame History Source

Typed views and explicit float profiles

Revision and scope

IMPLEMENTED and EXERCISED on branch feat/portable-typed-views in ~/work/cudastack/lanes/BridgeViews. A fresh git fetch origin main still reported base 3d01b49be9503d967a9f891c747222aff0aaf67d before publication. The accompanying commit fixes the exact sources below:

SourceSHA-256
src/toc.omb6abf22d1bd26da164e6b3a883806511ba3f63cfa633d832b735f4583ff3b09e
tools/bridge-seeded65778db0d82c994f8606f6b868645f7b89c0a5062a1f23d1eccc65690f1b55d0
src/native.om62e606762de623d611d05dd8764a35d343eb82e4b625bb65643a22debdcc9913
tools/native8ee0fc4668f2a4438a4d3f09c63da4a9993aebb054edaa3b01cec9e95c1fa873
tests/seeded_next_literals.want069ce343ddb4b88e076b26368b6bcaccec473402b0b7b860f7fd2d9b4b89c8b0

Native generator/tool/documentation edits were coordinated with BridgeHost. Their default compiler pins, existing sp[7] zero-initialization, and freestanding OM-2/array lane were not replaced. Public native floats require explicit profiles; they are not admitted through the default or freestanding generator.

Source semantics checked before lowering

The frozen reference is omega-mv e5b32567a7aff3ce594e3254a622a846a6cd190b: seed/omc/omc.om SHA-256 7703da00055fc0c7a91fcae43071df76a3f277dbe867cb284a3bdff3bedb7e1b, compiler SHA-256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. The source checks covered twid/tlog, ldop/stop, elemtype, and fintr (omc.om lines 2130, 2156, 2225, 2259, 2684 and 3142 at that revision), plus OMEGESE.md's unsigned/view and floating contracts (lines 429–474 and 548–578). MCP keyword lookup/run evidence was used alongside the source.

The portable extension is bridge-seeded, the path used by GemmEx. The separate bridge-freest stateless, nontrapping, import-free integer-scalar profile remains unchanged; it did not previously support array views. Native OM-2 floats and freestanding floats are not claimed by this change. f64 arrays still refuse 24.

Explicit candidate and compiler contribution

Draft compiler PR: https://github.com/aien-dev/omega-mv/pull/1049

Compiler worker evidence is filed at ~/work/cudastack/lanes/OmcFloat/evidence/SEED-0/fma-exact-literals/REPORT.md and in #1049. Its recorded commands, all under taskset -c 10-14 nice -n 10, were:

CommandrcObserved result
sh seed/omega-from-seed.sh0all three bootstrap/fixpoint stages identical
make -j3 build/omegese/omegese build/omega_emit/omega_emit build/checker2/checker20existing oracle tools built
sh seed/host/check.sh0PASS native-host qualification; seeded build, C tools are comparison oracles only

That receipt also records 48 FMA cases, 512 exact literals, wrong-opcode, unfused, remainder and ties-down mutants killed, 300 gate-17 programs identical, and 163 gate-18 keyword packs. These are worker-filed CPU receipts, not an independent chip qualification. They predate Main's device-namespace instruction; they are not retroactively described as namespace-isolated.

At the publication check, both #1049 and shared-core #1027 were OPEN/DRAFT and CONFLICTING against current main. No merge or default-pin refresh was performed. Integrating the common source into current main requires a fresh fixpoint/host receipt and explicit pin refresh under Main's integration decision, preserving BridgeHost's integrated-pin priority. The immutable candidate above is what the bridge tests actually executed.

Bridge execution evidence

typed-views-commands.json records exact argv, environment, start time, rc, final line and final-source digests. All new logs replace the home directory prefix with ~; source and result bytes are not altered. Historical rows and logs are retained rather than edited into successful runs. The final runs below use Main's device-free wrapper literally:

bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 <command>

The JSON records the complete expanded argv for each command. Environment pins are the frozen bridge bootstrap (191b776e...), e5 frontend (2c824805...), native generator compiler (734f0a39...), OM-2 compiler (c000ec02...), and the explicit candidate (d89bdc08...). It records executable paths for Rust, Zig 0.13.0, Go 1.27.3 and the x86 QEMU/Python oracles. No GPU gate was opened.

Command after the wrapperrcFinal line / resultLog suffix after typed-views-
sh tools/test.sh0ALL SUITES RC=0baseline-device-free.log
python3 tests/seeded.py0SEEDED CONVERTER differential C/Python/native/x86 and pin/arithmetic/ABI controls PASS; device NOT_RUNseeded-device-free.log
python3 tests/seeded_float.py0PASS seeded binary32/binary64 byte differential (native/C/x86, 132 constants vs exact oracle, one-ulp mutant detected); baseline/Python/f64-array/converter refusalsfloat-sqrt-final.log
python3 tests/seeded_views.py0SEEDED-VIEWS PASSviews-device-free.log
python3 tests/seeded_next.py0SEEDED-NEXT PASSnext-device-free.log
python3 tests/freest.py0PASS direct structural converter refusals independently of frontend, including recursive call graphfreest-device-free.log
python3 tests/native/float.py (e5)0NATIVE-FLOAT PASS (see per-language NOT_RUN lines); all five languages actually PASSnative-float-e5-mixed-final.log
env OMEGA_NATIVE_FLOAT_PROFILE=next python3 tests/native/float.py0same final line; all five languages actually PASSnative-float-next-mixed-final.log
sh tests/native/test_build_failures.sh0PASS native callers: Zig and Go built and executed; no missing languagesnative-build-controls-profile.log
sh tests/native/kinds.sh0NATIVE-KINDS PASSnative-kinds-profile.log
sh tests/native/v2/run.sh1NATIVE-V2 FAIL 1 — unchanged, permitted baselinenative-v2-profile.log
sh tests/native/x86/run.sh0NATIVE-X86 EMULATED PASS (six languages built and run; native x86 NOT_RUN)native-x86-device-free.log
python3 tests/native/x86/test_build_failures.py0NATIVE-X86 CONTROLS PASS (EMULATED; native x86 NOT_RUN)native-x86-controls-device-free.log

The v2 failure is exactly the frozen OM-2 compiler not hoisting: 0 writes of x20–x26 and 3 of d8–d15. Its 72 unit/output ABI-v1 parity cases and the rest of that gate still pass. No baseline, refusal, parity comparison or gate was weakened. The controls mutation-site update follows the changed bytewise helper text; it still deletes the same bounds check, and all seven controls are killed.

Differential coverage and negative controls

An intermediate final-profile attempt failed with omc: line 472: error 3 because its new global flag was declared after its first use. The flag was moved before use; the failed source digest/log remain in the JSON and typed-views-native-float-e5-final.log. Subsequent profile and mixed-unit runs pass. Earlier development attempts also exposed, then corrected, a test that incorrectly used a global pool in function mode and a freest invocation missing OMEGA_SEED; neither was suppressed or reclassified as a passing invocation.

Wolfram receipts used by the test sizing and exact-literal oracle:

Required omega-harness guide text

The matching guide is skills/omega-encoding/SKILL.md, including the observed limits in harness draft #183. This lane does not own that repository or #183. The exact updates needed are:

  1. Keep the frozen CUDApp consumer's bc11b30b/69d629df refusal observation as historical evidence; add the separately pinned bridge draft's ushort, uint, f32 views/local arrays and standalone globals, fixed-width LE storage, wrap, counts/alias/alignment checks and status-preserving ABI.
  2. Distinguish portable C public float/double scalars from the native --float/--float-next profiles. Document the native raw integer-slot ABI, 4/8-byte result contracts, all five language bindings and direct-generator profile requirement. Do not imply OM-2/freestanding floats or f64 arrays work.
  3. State that fsqrt already exists in e5; compatibility C uses AArch64/x86 instructions without libm. Do not call sqrt a new compiler keyword.
  4. State that fma is absent in e5 and only available through the exact #1049 candidate above. Record single rounding and left-to-right evaluation; x86 compiler targets refuse 9 and the portable candidate profile is AArch64-only.
  5. Retain #1024's e5 limitation. Describe correct rounding only under the candidate's explicit source/executable pins, with shared #1027 provenance, fixpoint/host/mutant evidence, current merge conflicts and no automatic reseed.
  6. Keep #183's unrelated bool-to-integer function-mode error-9 witness unchanged. Cite the current CUDApp #295 consumer when adding these new typed-view results.
  7. Label these results CPU/EMULATED and EXERCISED, not chip QUALIFIED, MERGED or DEPLOYED. Keep BridgeHost's separate freestanding OM-2/array work distinct.

Deliberate non-claims

PASS means only the exercised source/profile combinations above. The native-v2 aggregate remains FAIL 1 at its known baseline. Physical x86 execution, GPU/chip qualification, deployment and merge are NOT_RUN. The external Wycheproof corpus is NOT_RUN (not vendored), as stated in the compiler receipt. Both contributions remain draft and require Drake's approval to merge.