Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/issues/7267b79c1f2ec35f # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers # [SEM-2 P1] Replace M11 accounting-only refactoring with real verified executable byte reduction Open · #722 · open 2026-10-25 01:45 UTC Imported from GitHub aien-dev/omega-mv#722, by drakestapleton drakestapleton wrote on 2026-10-25 01:45 UTC ## Reproduced code-backed gap omega_discovery.c::omega_refactor_program copies `orig->realization.code_bytes` to `out_refactored->realization.code_bytes`, keeps `code_len` unchanged and only subtracts `match_len_insns-1` from `cost.insn_count`. That does not compress the final executable! Closed historical M11 #17 remains an authentic prior qualification; do not rewrite it or label it a measured byte reduction. ## Goal Implement a new seeded `.om` lowering for a small exact, side-effect-free, typed profile such that a repeated semantic subroutine is stored once and actual bytes emitted for calls + body + tables are fewer where economically beneficial. Preserve the original semantic identity and tie each machine-code realization to a distinct realization identity. ## Delivery - Freeze one legal original pure-u64 program set (>=10 examples and deliberately bad cases); choose a repeated 4-15-op slice with varying parameters, alongside an exact duplicate control. Align current seeded AArch64 function-call ABI with Omega #636 and #621 ; no new foreign compiler. - Implement real code emission through the current compiler owner: one procedure body, bounded actual call instructions, typed bound constants, linker/relocation where required. No "estimated" code size masquerading as physical size; return original when factoring costs more or correctness unsupported. - Independently inspect emitted binary lengths/opcode structure and execution outputs on public held-out inputs, including aliasing, overflow-wrap, error/refusal, recursion limit and cross-program collisions where applicable. Test out-of-range calls, malformed ID, stale body, wrong parameter. - Charge dictionary size, code/metadata/alignment, branch/call, register spill/clobber, verifier/runtime overhead, cold compile/setup amortization, and cache footprint. Compare stored archive bytes, emitted executable bytes, dynamic instructions, and actual latency separately, never equate these. - Preserve body/contract semantic ID, compute new separate realization ID. Verify source-to-binary under existing #623 validation; no fake proof from hash equality. - Follow upstream SEM-1 local codebook contract (link exact child once created). Coordinate active GEN-3 #478 , but this is binary lowering, not the GEN records/extraction owner. ## Gates - G0 reproducible before-graph and before-binary identity and exact baseline bytes. - G1 native .om candidate produces actually fewer executable bytes on a positive repeated fixture, same outputs; nonbeneficial shape refuses or keeps original; unexpected no-op replacement fails gate. - G2 negative tests for semantic differences, arithmetic, effects, alias, bad refs and stale bindings. - G3 cold/warm total costs and break-even n > definition+setup / per-use savings, no fabricated time gains. - G4 independent review/receipt; GB10 performance NOT_RUN until an authorized chip test. Ownership: bounded executable factoring and controlled compiler-lowering integration via the current seed owner. Do not overwrite active seed/compiler changes. ## Delivery protocol Issue-first under https://github.com/aien-dev/aien-architecture-mv/issues/315 , PLAN_AUTHORITY , CURRENT_EXECUTION_PLAN , owner AGENTS/.crumb, existing Honeycomb claims and issue-first delivery . New first-party executable work, tooling, tests and successor are seeded .om, not a permanent .osc/C/Rust/Python runtime. Independent third-party oracle allowed outside runtime, with provenance. Exclusive file owner and reviewed isolated PR; preserve private serving/GPU lease. Attach exact source, seed, binary, commands, output, independent reviewer and explicit PASS/FAIL/INCONCLUSIVE/NOT_RUN. No automatic release/merge. drakestapleton wrote on 2026-10-25 02:51 UTC 2026-10-24 semantic grammar follow-up: SEM-4 #728 will add recursive grammar encoding/unfolding and separately qualified invertible primitive transitions. This #722 continues to own actual emitted AArch64 executable code bytes and dynamic instruction/physical cost accounting; #728's smaller serialized grammar is not by itself executable shrinking or a GB10 throughput improvement. Evaluate lazy native .om unfolding versus eager expansion and existing #722 real factoring with all library, codec, error/witness, dynamic instruction and cache costs charged. Do not call current omega_refactor_program's adjusted cost metadata physical compression. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:15 UTC Recovered GitHub comment. Original comment `6392732778` ## First real emitted-byte measurement with the pinned seed compiler (2026-10-24) Not M11 accounting: these are bytes written by `seed/out/omc` (`734f0a39…6b61`, omega-mv main `a0eafa39`) for two forms of the same program, both executed natively (same exit 42 at N=128). Block factored: 6 Omegese lines (`get acc`, `add k`, `mul 3`, `xor 255`, `shr 1`, `put acc`), repeated N times inline versus one `fn step k ulong` plus N calls. N inline bytes procedure bytes saving 8 648 580 68 32 1800 1348 452 128 6408 4420 1988 Fit (exact, linear in N): inline costs 48 B per use; a one-argument call costs 32 B per use (8 A64 words: argument materialisation, caller-saved traffic, `bl`); the shared body plus prologue/epilogue is a fixed 60 B. Break-even is 4 uses; the asymptotic saving is 16 B per use, i.e. one third of this block. A 32-byte call sequence is the real floor the seed convention imposes on any "short code → procedure" scheme at the machine level: an 8-bit index can select the procedure, but invoking it still spends 8 words until the compiler emits a tighter call (register-passed args without the stack round trip). That compiler change belongs to the seed owners (#696/L813 line); the measurement here is the baseline it must beat. Runtime work was not measured separately (both forms run in microseconds); dynamic instruction counts need the IR-mode emitter or a counting harness, next step. Scripts: generated from a 12-line shell loop, no library, reproducible with the pinned omc; happy to attach the `.om` sources to this issue on request. Refs #721, aien-dev/aien-architecture-mv#315 (P1 "report stored bytes and resulting instructions"). Sign in to comment