interplane.Get Omega
Read in your language

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

[SEM-4 P1] Build reversible hierarchical semantic grammar and bounded .om unfolding

Open · #728 · open 2026-10-25 02:51 UTC

Imported from GitHub aien-dev/omega-mv#728, by drakestapleton

drakestapleton wrote on 2026-10-25 02:51 UTC

SEM-4: Reversible hierarchical semantic grammar and bounded native .om "unfolder"

Status: PROPOSED / native implementation NOT_RUN. Type: bounded new component under SEM-0 Architecture #315, NOT A MASTER PLAN. This is the missing encoding/decoding contract for the user's analogy of mixing colored syrup and reversing the flow: ordered, typed transformations can be reconstructed or inverted when enough information is retained. The goal is not "infinite arbitrary information in finite bits", a generic binary decompiler, or a new second compiler.

Distinctions and existing owners (inspected live source)

  • Omega canonical semantic IDs, body-sensitive program-id v2 and omega_program_lift_body already support constrained meaning and lifting rigid unary machine templates. That lifter is NOT a generic proof that arbitrary SASS/ELF can recover source/meaning.
  • SEM-1 #721 owns full-identity/short-code codebook; SEM-2 #722 owns actual executable-byte factoring; SEM-3 #723 owns typed parameterized extraction. This issue owns only hierarchical semantic rule serialization/streaming unfolding and explicitly bounded inverse/residual semantics. Integrate with #651 verified library and #623 semantic lowering/validation; do not edit their concurrent owned sources.
  • Architecture E17 #260 already owns specified compression after decode/check cost. It consumes the science/economics; don't create a second cost evaluator. Benchmarks #43 independent scorecard.
  • Historical Omega M11 discovery implementation currently reports adjusted cost without changing emitted bytes, so do not call this proposal physical compression before measured actual bytes.

Physical/mathematical model

The fluid analogy corresponds to a low-Reynolds-number reversible advection experiment (not general turbulent stirring; molecular diffusion and viscosity impose practical irreversibility). The computer analogue:

  1. lossless hierarchical compression maps a canonical finite typed semantic graph G to a finite grammar capsule C with shared subrules, lexical arguments, exceptions/residual side information and a fully versioned decoder/codebook;
  2. expansion/unfolding must recover exactly the same canonical finite semantic graph: Decode(C,version)=G. Encoder roundtrip for all accepted G: Decode(Encode(G))=G; the converse Encoder(Decode(C))=C requires canonicalized encodings and is not assumed for arbitrary noncanonical C;
  3. reversible state transitions are separately selected bijective functions f with a checked inverse f^-1. Compositions reverse in opposite order, f_n^-1∘...∘f_1^-1. Non-injective hash, averaging, rounding, dropping fields, inference sampling, lossy compression and effects cannot be undone from output alone: preserve sufficient witness/residual, restrict domain, or return NON_REVERSIBLE. For side effects, a journal/compensating action is not literally reversal of reality;
  4. approximate explanatory compression of experience is a separate predictive/lossy class, never a claim to reconstruct original raw traces. Charge exceptions, uncertainty and held-out predictive bits under CEXP-2/Turing rules.
  5. no infinite compression: for all 256 possible input bytes, only 255 distinct bitstrings of length <8 exist; no injective codec maps every byte to a shorter string. Nested rules can generate 2^20 copies of a symbol from about 20 doubling rules, but emitting them still costs >=2^20 symbol-operations and the decoder/grammar must be stored. Secure in-place/streaming evaluation does not make arbitrary payload bandwidth disappear.

Independent Wolfram check performed 2026-10-24: f_a(x)= (5x+a) mod 256 has inverse f_a^-1(y)=205(y-a) mod 256 because 5*205 mod256=1; five independent a-values [7,13,29,42,71] roundtrip all 256 states, including 42→16→42. Mathematical oracle only, NOT a native .om implementation or hardware receipt.

Precedent: SEQUITUR hierarchical grammar for recursively shared phrases; Bennett logical reversibility for compute/copy/uncompute with history tradeoffs; Integer Discrete Flows demonstrates invertible discrete transformations + entropy coder (invertible transform alone does not compress).

Frozen first experiment and source ownership

  • Build additive native handwritten seeded .om files for one public-synthetic, pure program/story corpus under an owner-approved new subpath, e.g. examples/semantic-unfold/*.om and versioned canonical schema/fixture, not another runtime or compiler.
  • Grammar productions Atom, Sequence, Parameter, Repeat(count), Reference, Exception/Residual and optionally ApplyInverse. Rules form a dependency DAG for finite exact output; a bounded repeat explicitly consumes work/output budget. Refuse cycles, forward-undefined refs, deep recursion, length integer overflow, too many expansions, unauthorized effects, unknown full-ID/codebook epoch, unsupported numerical/effect profile, mismatched canonical graph and missing witnesses.
  • Decoder must have streaming/lazy graph traversal with bounded stack, fuel, total expanded size and explicit cancellation. Prefer dispatching already verified operations by existing #651/AEGIS owner rather than materializing all source text/data. Only pure operations in v0; output is canonical semantic IR, not native decompilation of arbitrary raw machine code.
  • For bijective operations implement inverse law on at least a tiny finite state domain and independently check exhaustive inputs + mutated inverse. For non-bijective operations explicitly report required residual size or refusal. Do not accidentally invert effects.
  • Small corpus has (A) exact repeats, (B) repeated structure with differing typed parameters, (C) random/incompressible symbols, (D) semantically equal but different syntactic forms with independently proved normalization, (E) adversarial deep/cyclic grammar. Freeze equal-information baselines: raw canonical format, existing SEM-2 factoring, whole-program cache, generic external file compression (oracle only).
  • Predeclare bit-accurate serialized ledger: model/decoder, grammar, definition IDs, parameters, dictionary/install, provenance, residual/witness, output digest. Separate cold/warm encode/decode time and GPU traffic where physically measured. A short "capsule" that relies on an uncharged giant shared decoder/dictionary is not a compression win.

Acceptance gates

  • Reviewed, canonical versioned lossless grammar/capsule format and 32-byte full canonical semantic identity linkage; independent decoder fixture.
  • Native seeded .om Encode/Decode exact roundtrip on >= 1000 synthetic disjoint finite programs/graphs with equal behavior and emitted canonical bytes; negative input tampering, collision injection, stale/refusal and recursion bombs rejected.
  • A nontrivial hierarchically nested example saves real total serialized bytes including entire grammar/library on repeated corpus; on random/incompressible controls admits NO_GAIN or raw fallback, no artificial savings.
  • Inverse semantics for typed bijective transforms proven on tiny exhaustive finite domain (and general mathematical preconditions), with wrong-inverse mutant caught. Noninvertible operations carry enough witness or return NON_REVERSIBLE.
  • Lazy unfolding produces identical independently verified results to full expansion with correct fuel, stack, memory, constraints, termination and cancellation. No hidden effect or capability bypass.
  • Equal-task budget end-to-end time+physical memory/energy qualification (when available), with honest NO_GAIN / FAIL / INCONCLUSIVE / NOT_RUN; no GB10 speedup inference solely from source compression.
  • Existing owner handoff, production eligibility only after #623/#651 acceptance and independent reviewer; first-party product implementation .om per zero-legacy #316, no new C/Rust/Python/OSC fallback.

No destructive action/merge authority: issue only, one owned worktree, respect active seed compiler and release desk, existing 35B server and all trace privacy/consent rules.

No comments.

Sign in to comment