omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / tests / native / g1 / README.md
| 1 | # G1 sample units |
| 2 | |
| 3 | - `calc.om`: hand-written, in the translation-v1 section 5 form, with no semantic `note` line. |
| 4 | - `calc.lowered.om`: generated, never edited. It was produced in aien-dev/omega-mv at commit |
| 5 | `2ef4834754bef95036c9df792fad3d17ebecccbf` (branch `universal/624-g1-integration`). First, |
| 6 | `make -f mk/translation.mk test-translation-g1 SA_SEED_REPO=~/workspace/omega-bridge` was run (rc 0, |
| 7 | `TRANSLATION-G1 PASS`), which built `build/L589/c-import` (sha256 `d3cf7793…cb01`) and |
| 8 | `build/L831/lower` (sha256 `e8ac7f14…6e98`). Then, in that tree: |
| 9 | `printf '#include <stdint.h>\nuint64_t calc(uint64_t a, uint64_t b) { return (a+b)*(a-b); }\n' | build/L589/c-import | tools/adapters/lower > calc.lowered.om` |
| 10 | Both stages exited 0. The output sha256 is |
| 11 | `5a86d68bd0b30a89656552f6075bddbda5b12e39cd96e6ac97d03891b2b0a187`, and the semantic identity is |
| 12 | `8dc67eafc9e818d649f0cbcc59d226acbb7b2fd7fd4318f2e6b9a4d67a69fd1b`. The extra `put v 5 0` and |
| 13 | `add` before `ret` come from the section 4 `+0` root normalization. |
| 14 | |
| 15 | To run the callers on a unit: `OMEGA_NATIVE_OMC=<seed omc> OMEGA_G1_UNIT=tests/native/g1/calc.lowered.om sh tests/native/g1/run.sh` |