aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
GitHub aien-dev/aien-train#37 (code only)
Fetch it
curl -fsSL https://interplane.io/drakestapleton/aien-train/patches/440a444cd62ed299.bundle -o 440a444cd62ed299.bundle git fetch 440a444cd62ed299.bundle refs/pull/37/head
Provenance
github-import 1
aien-dev/aien-train
37
592209980afb15e1ec3fb866a6f61280dbb0dafa
{"kind":"github-import","owner":"aien-dev","repo":"aien-train","number":37,"url":"https://github.com/aien-dev/aien-train/pull/37","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:40:33Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/native/neuralese/.crumb b/native/neuralese/.crumb index 3af90b8..ea7e4d8 100644 --- a/native/neuralese/.crumb +++ b/native/neuralese/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-29T02:16:20Z", + "compiled_at": "2026-10-29T19:17:10Z", "compiler": "crumb-compile/1", - "digest": "sha256:e91b19fd917c92f39f45cc19436d2b628e9513306761711f1586b952d28d50f8", - "evidence_files": 110, - "evidence_root": "sha256:e95037f0ee5cf146ab9f07165b75dd2630aa84d16268353cb1273dfe019d90a4", - "files": 131, - "generated_at_commit": "7edaca90d9c530044b9c5144315cc35bede78780", - "source_tree": "sha256:2af0bcbc467226e2bf3983d27fe5b432c677f923aaa67db13062e5072004c090" + "digest": "sha256:e03410343fcc1e6d239d8e95c95e5866a9c3ab0f7dccff290aca2a3c0427abd8", + "evidence_files": 123, + "evidence_root": "sha256:467755a911c53fc1befadfb068aed53feb9fdf7afbf9b8177adc0363ed7ef967", + "files": 177, + "generated_at_commit": "a16125d679d60fc6e1d97f16f087fab886bd7543", + "source_tree": "sha256:144e41b02c0ebd604f2001154d60bfbd19a930a145b810697e0d76673bb9a2fc" } }, "name": "neuralese", diff --git a/native/neuralese/README.md b/native/neuralese/README.md index fca009e..7d1c88a 100644 --- a/native/neuralese/README.md +++ b/native/neuralese/README.md @@ -103,3 +103,115 @@ Collect compiler and program statuses separately and never execute stale output For Wolfram replay, first execute the two verification calls above, then `oracle.wl` and `gradient.wl`. Every `*-receipt.json` retains the complete submitted Wolfram code with literal bounded raw inputs and the actual returned tool result; replay that `code` verbatim. Template substitution is JSON data transport only, never numerical calculation. `verify.wl`, `metrics.wl`, `sensitivity.wl` and `plot3d.wl` are read-only independent oracles; they are not linked into the native runtime. Tool output truncation is a failed receipt, not a usable JSON fixture. Independent NL6 [replay receipt](https://github.com/aien-dev/benchmarks-mv/blob/e4ab4afecd62272f86d67043f74ffc8153ae703e/native/neuralese/nl1-independent.json) pins candidate `c5992ca0b015a233bca6f9af7af892a71c558403`, the exact compiler, source assembly, matching native binary and an independently emitted stream. Its stream differs in measured timing fields as expected; every selected raw-derived recovery counter matches the producer stream. The native scorer independently thresholds float carriers and enforces producer prediction/abstention consistency. Separate checker qualification reports 41/41 PASS including six guard-removal mutants; scope is HOST_SYNTHETIC_CHECKER_ONLY. This is algorithmic/checker independence, not a claim that model seats or vendors are independent. This change does not merge or activate an envelope/protocol consumer. + +## NL-7: guaranteed structure versus learned structure + +This follow-up is frozen separately from NL-1: benchmarks-mv +`989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3`, posted on BOARD at +2026-10-28T15:21:18Z before running a variant. See +[draft evaluation PR #57](https://github.com/aien-dev/benchmarks-mv/pull/57). +The base here is NL-1 `7edaca90`; the old experiment and its receipts are unchanged. +These are fresh **public** combination splits, not a secret confirmatory campaign. +The seed order below is 101,211,307. Held-out sets are +`{6,7,10,11,12,13,14,15}` and `{3,5,7,9,11,13,14,15}`; +each corresponding training set contains the other eight IDs. + +Clean accepted-correct counts at a 192-bit wire budget: + +| Variant | Full training fit /16 | Split 1 held-out /8 | Split 2 held-out /8 | Payload / wire bits | +|---|---|---|---|---| +| Exact `((2a+b)/3,c,d)` | 16,16,16 | 8,8,8 | 8,8,8 | 192 /192 here; 6/8,24/24,96/96 also tested | +| RM(1,3) | 16,16,16 | 8,8,8 | 8,8,8 | 8/192 here; padded to every matched budget | +| Learned additive + separation | 15,15,15 | 5,6,6 | 3,4,3 | 192/192 here; 6/8,24/24,96/96 also tested | +| Existing learned softsign | 14,14,14 | 0,0,1 | 2,2,1 | Same continuous budgets | +| Packed semantic control | 16,16,16 | 8,8,8 | 8,8,8 | 4/192 here; minimum actual wire 8 bits | + +**EXERCISED:** the exact and RM constructions meet their frozen synthetic +recoverability thresholds. **NOT_SUPPORTED:** the additive learned success +hypothesis. It improves over this existing learned baseline on both fresh splits +at high precision, but neither fits all sixteen nor reaches 8/8 on either split. +An additive sender identity and separation loss do not guarantee a learned +receiver. No post-outcome tuning, checkpoint choice or split substitution occurred. + +Wolfram confirms the proposed exact numbers: 16 distinct points, minimum +Euclidean distance `1/3`, strict nearest-codeword radius `<1/6`. +`Reduce[d>=1/3 && r>=0 && r<1/6 && d-r<=r,{d,r},Reals] -> False` +verifies the triangle-inequality margin; equality at `1/6` is not guaranteed. +Every six-axis `+/-1/12` test recovers all sixteen at both IEEE budgets. +The preregistered `1/6` boundary and `1/4` probes are descriptive, not passes +under the strict theorem. RM's independently enumerated parameters are +16 codewords, eight bits and minimum Hamming distance four. At each wire budget +and seed/split, all 128 single-bit flips recover and all 448 double-bit flips +refuse. These repeated exhaustive enumerations are not independent statistical +trials. Packed bits recover cleanly but all 64 single-bit and 96 double-bit +corruptions are accepted wrong. + +The additive constraint holds algebraically, and the maximum observed absolute +coordinate composition residual across all nine fits is +`1.7763568394002504646778106689453125e-15`, independently decoded by Wolfram. +The explicit training-pair hinge and its derivative are retained; no held-out +pair enters the loss. The raw `D` summary retains minimum squared separation +and composition residual; `P` lines retain all 31 final parameters, and long +`D` lines retain actual transmitted bytes and decoded coordinate IEEE values. +At 2/8-bit quantization, learned values outside [-4,4] are **refused**, not clipped; +this particularly damages the additive arm. Three floats are not three bits: +IEEE binary32 costs 96 transmitted bits and binary64 costs 192. Fixed codebooks, +weights and schemas are separate receiver-side shared costs, not free compression. + +`nl7-structure.om` implements the exact, RM and packed arms. `nl7-learn.om` +extends the existing staged Omega optimizer, using the original receiver and +initialization for both learned arms. Both receivers consume the byte carrier, +not the source truth ID. No Python or new foreign product dependency is used. +Build using the same pinned compiler described above: + +```sh +cat io.om nl7-structure.om > "$WORK/structure.om" +"$OMC" < "$WORK/structure.om" > "$WORK/structure" +cat hadamard.om io.om affine.om nl7-learn.om nl7-learn-main.om > "$WORK/learn.om" +"$OMC" < "$WORK/learn.om" > "$WORK/learn" +chmod +x "$WORK/structure" "$WORK/learn" +"$WORK/structure" > "$WORK/structure.csv" +"$WORK/learn" > "$WORK/learn.csv" +cat "$WORK/structure.csv" "$WORK/learn.csv" > "$WORK/all.csv" +``` + +Run from this directory with an existing writable `$WORK` and pinned `$OMC`. +The native OM2 conductor consumes `nl7-guards.cases` from the repository root; +provide its original `seed/qualification/om2/fixtures` SHA constants read-only +as in NL-1. It passed two original guard programs and killed fourteen source +mutants (16/16 cases): mapping, tie handling, RM radius, finite/length/padding, +additivity, separation sign, actual carrier reads and confidence admission. +The separate NL-6 scorer extension passed 19/19 controls including nine +checker mutants: canonical syntax, completeness, duplicate, payload, split +membership, RM radius/expectation, exact noise guarantee and packed-bit oracle. + +[`evidence/nl7-run.json`](evidence/nl7-run.json) records compiler/source/binary +hashes, statuses, full archive hashes and freeze history. +[`evidence/nl7-stream.csv.gz`](evidence/nl7-stream.csv.gz) preserves the actual +82,944-line stream; [`evidence/nl7-score.csv.gz`](evidence/nl7-score.csv.gz) +preserves independent per-seed/split/arm/budget/mode counters, including all +robustness refusals and undetected errors. Raw Wolfram queries/results and both +native mutant logs accompany them. Early compiler/setup/oracle errors are +described rather than counted as successful evidence. + +**Verdict:** recoverability can be guaranteed by an explicit finite code; +this experiment does not establish a successful learned language, useful +compression or learned-channel advantage. Johnson-Lindenstrauss projections +for real activations are future work only: **NOT_RUN**. Real models, GPU, +physical-network robustness, authority and deployment remain **NOT_RUN**. +These experiment-local files change no language/compiler/pin/host words, +repository ownership or harness gate, so no omega-harness guide change applies. + +Independent numeric replay is additionally implemented by benchmarks-mv +`nl7-wire.om`: it consumes the same raw `P/N/D` stream, reconstructs +coordinates from transmitted bytes, reapplies perturbation, checks emitted +coordinate IEEE values and recomputes the learned receiver and abstention. +Observed result: `NL7WIRE PASS frames=21888 refused=3764`. +Its four qualification cases passed, including three more source mutants +for receiver weight indexing, carrier decoding and decision threshold. +Encode refusals require `pred99/status1`; stale refused carrier bytes do not +independently prove sender-overflow causality. The admitted-carrier replay, +native sender admission tests and refusal counters are separate evidence. +Together the three native conductors executed 39 cases and killed 26 source +mutants. `nl7-wire.stdout`, `nl7-wire-mutants.log` and the transport-equation +Wolfram receipt are retained with the run. diff --git a/native/neuralese/evidence/nl7-checker-mutants.log b/native/neuralese/evidence/nl7-checker-mutants.log new file mode 100644 index 0000000..bbe20f9 --- /dev/null +++ b/native/neuralese/evidence/nl7-checker-mutants.log @@ -0,0 +1,98 @@ +OM2GATE START cases=native/neuralese/fixtures/nl7-score.cases scratch=/tmp/nl7-checker-run +IDENTITY omc /home/drakestapleton/fix/neuralese/seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE nl7-case-0 line=5 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/5.src > /tmp/nl7-checker-run/5.elf 2> /tmp/nl7-checker-run/5.cerr + $ /tmp/nl7-checker-run/5.elf < inputs/nl7-case-0.csv > /tmp/nl7-checker-run/5.out 2> /tmp/nl7-checker-run/5.err +VERDICT nl7-case-0 PASS run exit=0 expected=0 stdout=match stderr=match +CASE nl7-case-1 line=6 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/6.src > /tmp/nl7-checker-run/6.elf 2> /tmp/nl7-checker-run/6.cerr + $ /tmp/nl7-checker-run/6.elf < inputs/nl7-case-1.csv > /tmp/nl7-checker-run/6.out 2> /tmp/nl7-checker-run/6.err +VERDICT nl7-case-1 PASS run exit=90 expected=90 stdout=match stderr=match +CASE nl7-case-2 line=7 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/7.src > /tmp/nl7-checker-run/7.elf 2> /tmp/nl7-checker-run/7.cerr + $ /tmp/nl7-checker-run/7.elf < inputs/nl7-case-2.csv > /tmp/nl7-checker-run/7.out 2> /tmp/nl7-checker-run/7.err +VERDICT nl7-case-2 PASS run exit=90 expected=90 stdout=match stderr=match +CASE nl7-case-3 line=8 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/8.src > /tmp/nl7-checker-run/8.elf 2> /tmp/nl7-checker-run/8.cerr + $ /tmp/nl7-checker-run/8.elf < inputs/nl7-case-3.csv > /tmp/nl7-checker-run/8.out 2> /tmp/nl7-checker-run/8.err +VERDICT nl7-case-3 PASS run exit=90 expected=90 stdout=match stderr=match +CASE nl7-case-4 line=9 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/9.src > /tmp/nl7-checker-run/9.elf 2> /tmp/nl7-checker-run/9.cerr + $ /tmp/nl7-checker-run/9.elf < inputs/nl7-case-4.csv > /tmp/nl7-checker-run/9.out 2> /tmp/nl7-checker-run/9.err +VERDICT nl7-case-4 PASS run exit=90 expected=90 stdout=match stderr=match +CASE nl7-case-5 line=10 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/10.src > /tmp/nl7-checker-run/10.elf 2> /tmp/nl7-checker-run/10.cerr + $ /tmp/nl7-checker-run/10.elf < inputs/nl7-case-5.csv > /tmp/nl7-checker-run/10.out 2> /tmp/nl7-checker-run/10.err +VERDICT nl7-case-5 PASS run exit=0 expected=0 stdout=match stderr=match +CASE nl7-case-6 line=11 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/11.src > /tmp/nl7-checker-run/11.elf 2> /tmp/nl7-checker-run/11.cerr + $ /tmp/nl7-checker-run/11.elf < inputs/nl7-case-6.csv > /tmp/nl7-checker-run/11.out 2> /tmp/nl7-checker-run/11.err +VERDICT nl7-case-6 PASS run exit=1 expected=1 stdout=match stderr=match +CASE nl7-case-7 line=12 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/12.src > /tmp/nl7-checker-run/12.elf 2> /tmp/nl7-checker-run/12.cerr + $ /tmp/nl7-checker-run/12.elf < inputs/nl7-case-7.csv > /tmp/nl7-checker-run/12.out 2> /tmp/nl7-checker-run/12.err +VERDICT nl7-case-7 PASS run exit=1 expected=1 stdout=match stderr=match +CASE nl7-case-8 line=13 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/13.src > /tmp/nl7-checker-run/13.elf 2> /tmp/nl7-checker-run/13.cerr + $ /tmp/nl7-checker-run/13.elf < inputs/nl7-case-8.csv > /tmp/nl7-checker-run/13.out 2> /tmp/nl7-checker-run/13.err +VERDICT nl7-case-8 PASS run exit=90 expected=90 stdout=match stderr=match +CASE nl7-case-9 line=14 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/14.src > /tmp/nl7-checker-run/14.elf 2> /tmp/nl7-checker-run/14.cerr + $ /tmp/nl7-checker-run/14.elf < inputs/nl7-case-9.csv > /tmp/nl7-checker-run/14.out 2> /tmp/nl7-checker-run/14.err +VERDICT nl7-case-9 PASS run exit=90 expected=90 stdout=match stderr=match +SUBST native/neuralese/fixtures/nl7-canonical_parse_removed.from native/neuralese/fixtures/nl7-canonical_parse_removed.to +CASE nl7-kill-canonical_parse_removed line=16 + MUTATE exact-once substitution at byte 1758 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/16.src > /tmp/nl7-checker-run/16.elf 2> /tmp/nl7-checker-run/16.cerr + $ /tmp/nl7-checker-run/16.elf < inputs/nl7-case-1.csv > /tmp/nl7-checker-run/16.out 2> /tmp/nl7-checker-run/16.err +VERDICT nl7-kill-canonical_parse_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 3 stderr=match +SUBST native/neuralese/fixtures/nl7-completeness_removed.from native/neuralese/fixtures/nl7-completeness_removed.to +CASE nl7-kill-completeness_removed line=18 + MUTATE exact-once substitution at byte 6403 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/18.src > /tmp/nl7-checker-run/18.elf 2> /tmp/nl7-checker-run/18.cerr + $ /tmp/nl7-checker-run/18.elf < inputs/nl7-case-2.csv > /tmp/nl7-checker-run/18.out 2> /tmp/nl7-checker-run/18.err +VERDICT nl7-kill-completeness_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 3 stderr=match +SUBST native/neuralese/fixtures/nl7-duplicate_guard_removed.from native/neuralese/fixtures/nl7-duplicate_guard_removed.to +CASE nl7-kill-duplicate_guard_removed line=20 + MUTATE exact-once substitution at byte 4930 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/20.src > /tmp/nl7-checker-run/20.elf 2> /tmp/nl7-checker-run/20.cerr + $ /tmp/nl7-checker-run/20.elf < inputs/nl7-case-3.csv > /tmp/nl7-checker-run/20.out 2> /tmp/nl7-checker-run/20.err +VERDICT nl7-kill-duplicate_guard_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 3 stderr=match +SUBST native/neuralese/fixtures/nl7-payload_guard_removed.from native/neuralese/fixtures/nl7-payload_guard_removed.to +CASE nl7-kill-payload_guard_removed line=22 + MUTATE exact-once substitution at byte 5799 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/22.src > /tmp/nl7-checker-run/22.elf 2> /tmp/nl7-checker-run/22.cerr + $ /tmp/nl7-checker-run/22.elf < inputs/nl7-case-4.csv > /tmp/nl7-checker-run/22.out 2> /tmp/nl7-checker-run/22.err +VERDICT nl7-kill-payload_guard_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 3 stderr=match +SUBST native/neuralese/fixtures/nl7-split1_membership_wrong.from native/neuralese/fixtures/nl7-split1_membership_wrong.to +CASE nl7-kill-split1_membership_wrong line=24 + MUTATE exact-once substitution at byte 2685 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/24.src > /tmp/nl7-checker-run/24.elf 2> /tmp/nl7-checker-run/24.cerr + $ /tmp/nl7-checker-run/24.elf < inputs/nl7-case-5.csv > /tmp/nl7-checker-run/24.out 2> /tmp/nl7-checker-run/24.err +VERDICT nl7-kill-split1_membership_wrong PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 36828 stderr=match +SUBST native/neuralese/fixtures/nl7-rm_radius_zero.from native/neuralese/fixtures/nl7-rm_radius_zero.to +CASE nl7-kill-rm_radius_zero line=26 + MUTATE exact-once substitution at byte 3809 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/26.src > /tmp/nl7-checker-run/26.elf 2> /tmp/nl7-checker-run/26.cerr + $ /tmp/nl7-checker-run/26.elf < inputs/nl7-case-0.csv > /tmp/nl7-checker-run/26.out 2> /tmp/nl7-checker-run/26.err +VERDICT nl7-kill-rm_radius_zero PASS run exit=1 expected=1 killed: stdout differs from the oracle at byte 216010 stderr=match +SUBST native/neuralese/fixtures/nl7-rm_expectation_guard_removed.from native/neuralese/fixtures/nl7-rm_expectation_guard_removed.to +CASE nl7-kill-rm_expectation_guard_removed line=28 + MUTATE exact-once substitution at byte 4259 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/28.src > /tmp/nl7-checker-run/28.elf 2> /tmp/nl7-checker-run/28.cerr + $ /tmp/nl7-checker-run/28.elf < inputs/nl7-case-6.csv > /tmp/nl7-checker-run/28.out 2> /tmp/nl7-checker-run/28.err +VERDICT nl7-kill-rm_expectation_guard_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 216010 stderr=match +SUBST native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.from native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.to +CASE nl7-kill-exact_mandatory_noise_removed line=30 + MUTATE exact-once substitution at byte 4097 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/30.src > /tmp/nl7-checker-run/30.elf 2> /tmp/nl7-checker-run/30.cerr + $ /tmp/nl7-checker-run/30.elf < inputs/nl7-case-7.csv > /tmp/nl7-checker-run/30.out 2> /tmp/nl7-checker-run/30.err +VERDICT nl7-kill-exact_mandatory_noise_removed PASS run exit=0 expected=0 killed: stdout differs from the oracle at byte 216010 stderr=match +SUBST native/neuralese/fixtures/nl7-packed_source_id_oracle.from native/neuralese/fixtures/nl7-packed_source_id_oracle.to +CASE nl7-kill-packed_source_id_oracle line=32 + MUTATE exact-once substitution at byte 4356 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-checker-run/32.src > /tmp/nl7-checker-run/32.elf 2> /tmp/nl7-checker-run/32.cerr + $ /tmp/nl7-checker-run/32.elf < inputs/nl7-case-0.csv > /tmp/nl7-checker-run/32.out 2> /tmp/nl7-checker-run/32.err +VERDICT nl7-kill-packed_source_id_oracle PASS run exit=1 expected=1 killed: stdout differs from the oracle at byte 216010 stderr=match +OM2GATE PASS cases=19 pass=19 fail=0 invalid=0 not_run=0 diff --git a/native/neuralese/evidence/nl7-derivative-wolfram.txt b/native/neuralese/evidence/nl7-derivative-wolfram.txt new file mode 100644 index 0000000..0fd9d2e --- /dev/null +++ b/native/neuralese/evidence/nl7-derivative-wolfram.txt @@ -0,0 +1,11 @@ +Exact query: + +``` +{FullSimplify[D[(1/10)*(1/9-(dx*w1+dy*w2)^2),w1]],FullSimplify[(z0+v1+v2)-(z0+v1)-(z0+v2)+z0]} +``` + +Complete raw output: + +``` +Out[1]= {-1/5*(dx*(dx*w1 + dy*w2)), 0} +``` diff --git a/native/neuralese/evidence/nl7-diagnostics-wolfram.txt b/native/neuralese/evidence/nl7-diagnostics-wolfram.txt new file mode 100644 index 0000000..a1ad502 --- /dev/null +++ b/native/neuralese/evidence/nl7-diagnostics-wolfram.txt @@ -0,0 +1,9 @@ +Query: +```wolfram +u={0,4372995238176751616,4386506037058863104,4377498837804122112,4382002437431492608}; decode[n_]:=If[n==0,0,(-1)^BitShiftRight[n,63] (1+BitAnd[n,2^52-1]/2^52) 2^(BitAnd[BitShiftRight[n,52],2047]-1023)]; {Map[N[decode[#],17]&,u], Max[decode /@ u]<10^-12,FullSimplify[({z01,z02,z03}+{v11,v12,v13}+{v21,v22,v23})-({z01,z02,z03}+{v11,v12,v13})-({z01,z02,z03}+{v21,v22,v23})+{z01,z02,z03}]} +``` + +Complete raw output: +```text +Out[1]= {{0, 2.220446049250313080847263336181640625`17.*^-16, 1.7763568394002504646778106689453125`17.*^-15, 4.44089209850062616169452667236328125`17.*^-16, 8.8817841970012523233890533447265625`17.*^-16}, True, {0, 0, 0}} +``` diff --git a/native/neuralese/evidence/nl7-exact-wolfram.txt b/native/neuralese/evidence/nl7-exact-wolfram.txt new file mode 100644 index 0000000..c5dafbc --- /dev/null +++ b/native/neuralese/evidence/nl7-exact-wolfram.txt @@ -0,0 +1,9 @@ +Exact query: +```wolfram +c=({(2 #[[1]]+#[[2]])/3,#[[3]],#[[4]]}& /@ Tuples[{0,1},4]); {Length[DeleteDuplicates[c]],Min[EuclideanDistance@@@Subsets[c,{2}]],Min[EuclideanDistance@@@Subsets[c,{2}]]/2,Reduce[d>=1/3 && r>=0 && r<1/6 && d-r<=r,{d,r},Reals]} +``` + +Complete raw output: +```text +Out[1]= {16, 1/3, 1/6, False} +``` diff --git a/native/neuralese/evidence/nl7-initial-wolfram-error.txt b/native/neuralese/evidence/nl7-initial-wolfram-error.txt new file mode 100644 index 0000000..68a0488 --- /dev/null +++ b/native/neuralese/evidence/nl7-initial-wolfram-error.txt @@ -0,0 +1 @@ +The submitted `code` contained the full expression, with no literal `...`. The ellipsis appeared only in the evaluator’s error message. No successful result was returned. diff --git a/native/neuralese/evidence/nl7-native-mutants.log b/native/neuralese/evidence/nl7-native-mutants.log new file mode 100644 index 0000000..5943437 --- /dev/null +++ b/native/neuralese/evidence/nl7-native-mutants.log @@ -0,0 +1,96 @@ +OM2GATE START cases=native/neuralese/nl7-guards.cases scratch=/tmp/nl7-guard-final +IDENTITY omc /home/drakestapleton/fix/neuralese/seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 30 +CASE structure-controls line=3 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/3.src > /tmp/nl7-guard-final/3.elf 2> /tmp/nl7-guard-final/3.cerr + $ /tmp/nl7-guard-final/3.elf guard < /dev/null > /tmp/nl7-guard-final/3.out 2> /tmp/nl7-guard-final/3.err +VERDICT structure-controls PASS run exit=0 expected=0 stdout=match stderr=match +CASE learned-controls line=4 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/4.src > /tmp/nl7-guard-final/4.elf 2> /tmp/nl7-guard-final/4.cerr + $ /tmp/nl7-guard-final/4.elf < /dev/null > /tmp/nl7-guard-final/4.out 2> /tmp/nl7-guard-final/4.err +VERDICT learned-controls PASS run exit=0 expected=0 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-map.from native/neuralese/mutants/nl7-map.to +CASE kill-exact-map line=6 + MUTATE exact-once substitution at byte 646 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/6.src > /tmp/nl7-guard-final/6.elf 2> /tmp/nl7-guard-final/6.cerr + $ /tmp/nl7-guard-final/6.elf guard < /dev/null > /tmp/nl7-guard-final/6.out 2> /tmp/nl7-guard-final/6.err +VERDICT kill-exact-map PASS run exit=41 expected=41 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-tie.from native/neuralese/mutants/nl7-tie.to +CASE kill-exact-tie line=8 + MUTATE exact-once substitution at byte 3100 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/8.src > /tmp/nl7-guard-final/8.elf 2> /tmp/nl7-guard-final/8.cerr + $ /tmp/nl7-guard-final/8.elf guard < /dev/null > /tmp/nl7-guard-final/8.out 2> /tmp/nl7-guard-final/8.err +VERDICT kill-exact-tie PASS run exit=51 expected=51 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-radius.from native/neuralese/mutants/nl7-radius.to +CASE kill-rm-radius line=10 + MUTATE exact-once substitution at byte 3384 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/10.src > /tmp/nl7-guard-final/10.elf 2> /tmp/nl7-guard-final/10.cerr + $ /tmp/nl7-guard-final/10.elf guard < /dev/null > /tmp/nl7-guard-final/10.out 2> /tmp/nl7-guard-final/10.err +VERDICT kill-rm-radius PASS run exit=53 expected=53 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-finite.from native/neuralese/mutants/nl7-finite.to +CASE kill-wire-finite line=12 + MUTATE exact-once substitution at byte 2178 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/12.src > /tmp/nl7-guard-final/12.elf 2> /tmp/nl7-guard-final/12.cerr + $ /tmp/nl7-guard-final/12.elf guard < /dev/null > /tmp/nl7-guard-final/12.out 2> /tmp/nl7-guard-final/12.err +VERDICT kill-wire-finite PASS run exit=47 expected=47 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-length.from native/neuralese/mutants/nl7-length.to +CASE kill-wire-length line=14 + MUTATE exact-once substitution at byte 1784 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/14.src > /tmp/nl7-guard-final/14.elf 2> /tmp/nl7-guard-final/14.cerr + $ /tmp/nl7-guard-final/14.elf guard < /dev/null > /tmp/nl7-guard-final/14.out 2> /tmp/nl7-guard-final/14.err +VERDICT kill-wire-length PASS run exit=46 expected=46 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-additive.from native/neuralese/mutants/nl7-additive.to +CASE kill-additive-composition line=16 + MUTATE exact-once substitution at byte 4789 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/16.src > /tmp/nl7-guard-final/16.elf 2> /tmp/nl7-guard-final/16.cerr + $ /tmp/nl7-guard-final/16.elf < /dev/null > /tmp/nl7-guard-final/16.out 2> /tmp/nl7-guard-final/16.err +VERDICT kill-additive-composition PASS run exit=43 expected=43 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-separate.from native/neuralese/mutants/nl7-separate.to +CASE kill-separation-sign line=18 + MUTATE exact-once substitution at byte 5510 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/18.src > /tmp/nl7-guard-final/18.elf 2> /tmp/nl7-guard-final/18.cerr + $ /tmp/nl7-guard-final/18.elf < /dev/null > /tmp/nl7-guard-final/18.out 2> /tmp/nl7-guard-final/18.err +VERDICT kill-separation-sign PASS run exit=44 expected=44 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-receiver.from native/neuralese/mutants/nl7-receiver.to +CASE kill-learned-carrier line=20 + MUTATE exact-once substitution at byte 7458 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/20.src > /tmp/nl7-guard-final/20.elf 2> /tmp/nl7-guard-final/20.cerr + $ /tmp/nl7-guard-final/20.elf < /dev/null > /tmp/nl7-guard-final/20.out 2> /tmp/nl7-guard-final/20.err +VERDICT kill-learned-carrier PASS run exit=46 expected=46 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-learn-length.from native/neuralese/mutants/nl7-learn-length.to +CASE kill-learned-length line=22 + MUTATE exact-once substitution at byte 7306 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/22.src > /tmp/nl7-guard-final/22.elf 2> /tmp/nl7-guard-final/22.cerr + $ /tmp/nl7-guard-final/22.elf < /dev/null > /tmp/nl7-guard-final/22.out 2> /tmp/nl7-guard-final/22.err +VERDICT kill-learned-length PASS run exit=45 expected=45 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-learn-finite.from native/neuralese/mutants/nl7-learn-finite.to +CASE kill-learned-finite line=24 + MUTATE exact-once substitution at byte 6593 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/24.src > /tmp/nl7-guard-final/24.elf 2> /tmp/nl7-guard-final/24.cerr + $ /tmp/nl7-guard-final/24.elf < /dev/null > /tmp/nl7-guard-final/24.out 2> /tmp/nl7-guard-final/24.err +VERDICT kill-learned-finite PASS run exit=46 expected=46 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-learn-padding.from native/neuralese/mutants/nl7-learn-padding.to +CASE kill-learned-padding line=26 + MUTATE exact-once substitution at byte 7389 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/26.src > /tmp/nl7-guard-final/26.elf 2> /tmp/nl7-guard-final/26.cerr + $ /tmp/nl7-guard-final/26.elf < /dev/null > /tmp/nl7-guard-final/26.out 2> /tmp/nl7-guard-final/26.err +VERDICT kill-learned-padding PASS run exit=51 expected=51 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-learn-confidence.from native/neuralese/mutants/nl7-learn-confidence.to +CASE kill-learned-confidence line=28 + MUTATE exact-once substitution at byte 8139 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/28.src > /tmp/nl7-guard-final/28.elf 2> /tmp/nl7-guard-final/28.cerr + $ /tmp/nl7-guard-final/28.elf < /dev/null > /tmp/nl7-guard-final/28.out 2> /tmp/nl7-guard-final/28.err +VERDICT kill-learned-confidence PASS run exit=48 expected=48 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-padding.from native/neuralese/mutants/nl7-padding.to +CASE kill-exact-padding line=30 + MUTATE exact-once substitution at byte 1870 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/30.src > /tmp/nl7-guard-final/30.elf 2> /tmp/nl7-guard-final/30.cerr + $ /tmp/nl7-guard-final/30.elf guard < /dev/null > /tmp/nl7-guard-final/30.out 2> /tmp/nl7-guard-final/30.err +VERDICT kill-exact-padding PASS run exit=49 expected=49 stdout=match stderr=match +SUBST native/neuralese/mutants/nl7-binary-padding.from native/neuralese/mutants/nl7-binary-padding.to +CASE kill-binary-padding line=32 + MUTATE exact-once substitution at byte 3251 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-guard-final/32.src > /tmp/nl7-guard-final/32.elf 2> /tmp/nl7-guard-final/32.cerr + $ /tmp/nl7-guard-final/32.elf guard < /dev/null > /tmp/nl7-guard-final/32.out 2> /tmp/nl7-guard-final/32.err +VERDICT kill-binary-padding PASS run exit=50 expected=50 stdout=match stderr=match +OM2GATE PASS cases=16 pass=16 fail=0 invalid=0 not_run=0 diff --git a/native/neuralese/evidence/nl7-rm-wolfram.txt b/native/neuralese/evidence/nl7-rm-wolfram.txt new file mode 100644 index 0000000..032f1fa --- /dev/null +++ b/native/neuralese/evidence/nl7-rm-wolfram.txt @@ -0,0 +1,9 @@ +**Query (exact):** +``` +codes=Partition[Flatten[Table[Mod[a+b*x+c*y+d*z,2],{a,0,1},{b,0,1},{c,0,1},{d,0,1},{x,0,1},{y,0,1},{z,0,1}]],8]; hd[u_,v_]:=Total[Abs[u-v]]; decode[v_]:=Select[Range[16],hd[codes[[#]],v]<=1&]; one=Flatten[Table[decode[ReplacePart[codes[[i]],j->1-codes[[i,j]]]]=={i},{i,16},{j,8}]]; two=Flatten[Table[Length[decode[ReplacePart[codes[[i]],Thread[p->1-codes[[i,p]]]]]]==0,{i,16},{p,Subsets[Range[8],{2}]}]]; {Length[DeleteDuplicates[codes]],Length[First[codes]],Min[hd@@@Subsets[codes,{2}]],{Count[one,True],Length[one]},{Count[two,True],Length[two]}} +``` + +**Raw output:** +``` +Out[1]= {16, 8, 4, {128, 128}, {448, 448}} +``` diff --git a/native/neuralese/evidence/nl7-run.json b/native/neuralese/evidence/nl7-run.json new file mode 100644 index 0000000..9eebec8 --- /dev/null +++ b/native/neuralese/evidence/nl7-run.json @@ -0,0 +1,21 @@ +{ + "schema":"neuralese-nl7-host-run/1", + "scope":"EXERCISED HOST_SYNTHETIC_ONLY; no real models, GPU, network transport, authority, merge or deployment", + "prereg":"benchmarks-mv@989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3", + "board_freeze_utc":"2026-10-28T15:21:18Z", + "base":"aien-train@7edaca90d9c530044b9c5144315cc35bede78780", + "compiler":{"sha256":"d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84","source_introduction":"omega-mv@1fe5976d398646b17acabbf6d9dfae96b017e439","protocol":"stdin source to stdout ELF; no rebuild or substitution"}, + "sources":{"native/neuralese/nl7-structure.om":"a0499d8c3d82b3b487a16b7f6c10ed9e48ec5883589066eb66669b11e2b61145","native/neuralese/nl7-learn.om":"f92f3496355bd81f431e517dd8fe8657793d59577e3d3d27d37a1b70a707d87b","native/neuralese/nl7-learn-main.om":"4f41353d9946630ee04ace6b92432f926550be6f1aa8f25a5710f2cc3f94486c"}, + "assembly":{"structure":["io.om","nl7-structure.om"],"learned":["hadamard.om","io.om","affine.om","nl7-learn.om","nl7-learn-main.om"],"structure_source_sha256":"fc3d34a06b4c0fbecc083ce697dd899b082b45a4a59b7a68049cdb8336ac5835","learned_source_sha256":"0280fdffa1513ea62339eed0e672ea82c61ad7316d252725a689350edb54e3ad"}, + "binaries":{"structure":"4eb7e0644d41c1a65548d100fd0ccc3ce2c4955b5798f1520282b475e4b18348","learned":"f46a5a26b5466e268c4210569e967e9b2d9e8ddb9c7918740b95a804e4964149","independent_score":"ab0eb72743bdffd63ebaf9d995787ddd0aa503510c1455b9634bb4b9bd45ee34"}, + "execution":{"structure_compile":0,"structure_run":0,"learned_compile":0,"learned_run":0,"score_compile":0,"score_run":0,"structure_lines":38592,"learned_lines":44352,"combined_lines":82944,"score_lines":7930,"combined_stdout_sha256":"a70bc35dd78293ac6db2a4eeb8e760c4e0aa0bd3489478e3175c07c6ce287b9e","score_stdout_sha256":"c3efce37f925881cfa63f4eeefd795e2207a5c6ba69fddf9d5f3218547863088"}, + "artifacts":{"nl7-stream.csv.gz":"2a59cc4fe1e81b98a15b8cfeba54e4fad44482d72f3b37fb782e93b325c731d3","nl7-score.csv.gz":"70ee261dd28ad11d16439944da24870166a53d98aceb2089ba447481c3b0ddb0","compression":"gzip -n; verification artifact only, not product runtime"}, + "seed_order":[101,211,307], + "clean192":{"exact":{"fit16":[16,16,16],"split1_test8":[8,8,8],"split2_test8":[8,8,8]},"rm":{"fit16":[16,16,16],"split1_test8":[8,8,8],"split2_test8":[8,8,8]},"additive":{"fit16":[15,15,15],"split1_test8":[5,6,6],"split2_test8":[3,4,3]},"existing_learned":{"fit16":[14,14,14],"split1_test8":[0,0,1],"split2_test8":[2,2,1]},"packed":{"fit16":[16,16,16],"split1_test8":[8,8,8],"split2_test8":[8,8,8]}}, + "robustness":{"exact":"All six axis +/-1/12 modes accepted-correct16/16 at96 and192bit, each seed/split. Boundary1/6 and1/4 descriptive; no general guarantee at equality.","rm":"Every seed/split/budget: single-bit128/128 recovered; double-bit448/448 refused. Repeated deterministic enumeration, not independent statistical trials.","packed":"Every seed/split/budget: all64 single-bit and96 double-bit corruptions accepted wrong; no error detection.","additive_composition":"All nine maximum absolute coordinate-composition residual IEEE values are among {0,4372995238176751616,4386506037058863104,4377498837804122112,4382002437431492608}; Wolfram independently decodes their maximum below1e-12."}, + "independent_wire":{"source":"benchmarks-mv/native/neuralese/nl7-wire.om","source_sha256":"4d4791f477848eacac422598dee2b5d7851d92143de622c5183f7f2a6a55b4da","binary_sha256":"296f2e94b9525de38a705b1a86edb9d030b74063a12837da4d6623af5f98471c","compile_exit":0,"run_exit":0,"observed_stdout":"NL7WIRE PASS frames=21888 refused=3764","conductor_cases_passed":4,"mutants_killed":3,"mutants":["receiver weight indexing","actual carrier decoding","decision threshold"],"limitation":"Accepted carriers are independently dequantized, noise-applied, decoded and checked against the learned receiver. Producer encode refusals require99/status1, but stale refused carrier bytes cannot independently prove sender-overflow causality."}, + "qualification":{"native_controls":2,"native_source_mutants_killed":14,"native_conductor_cases_passed":16,"independent_checker_controls":10,"independent_checker_source_mutants_killed":9,"checker_conductor_cases_passed":19,"native_log":"nl7-native-mutants.log","checker_log":"nl7-checker-mutants.log"}, + "history":"Initial broad Wolfram request failed; narrower exact/RM/derivative calls succeeded and all are retained. Compiler register-pressure and boolean-to-ulong issues were repaired without changing frozen design, seed, split, loss, epoch, rate, threshold or quantization. Initial mutant fixture expected exit labels47/50 were corrected to source-defined46/51 after native guards refused; no guard or gate was weakened. Conductor scratch-existing/context mistakes were setup failures, not experimental results.", + "verdict":"Exact and RM constructions meet synthetic recoverability thresholds. Additive improves new-split held-out recovery versus existing learned but fails16/16 fullfit and8/8 heldout; preregistered learned hypothesis NOT_SUPPORTED. No learned-channel advantage or useful compression demonstrated. Johnson-Lindenstrauss real-activation experiment NOT_RUN, future only.", + "guides":"No Omega language/compiler/pin/host-word/bridge/repository/gate/harness change; experiment-local additions only. omega-harness guide update not applicable." +} diff --git a/native/neuralese/evidence/nl7-score.csv.gz b/native/neuralese/evidence/nl7-score.csv.gz new file mode 100644 index 0000000..220afdb Binary files /dev/null and b/native/neuralese/evidence/nl7-score.csv.gz differ diff --git a/native/neuralese/evidence/nl7-stream.csv.gz b/native/neuralese/evidence/nl7-stream.csv.gz new file mode 100644 index 0000000..a37ef53 Binary files /dev/null and b/native/neuralese/evidence/nl7-stream.csv.gz differ diff --git a/native/neuralese/evidence/nl7-transport-wolfram.txt b/native/neuralese/evidence/nl7-transport-wolfram.txt new file mode 100644 index 0000000..a63a045 --- /dev/null +++ b/native/neuralese/evidence/nl7-transport-wolfram.txt @@ -0,0 +1,9 @@ +Exact query: +```wolfram +{FullSimplify[(1+v/(1+Abs[v]))/2-(1/2+v/(2*(1+Abs[v]))),Element[v,Reals]],Table[{b,3*b,8*Ceiling[3*b/8]},{b,{2,8,32,64}}],Table[Simplify[8*q/(2^b-1)-4/.q->(v+4)*(2^b-1)/8],{b,{2,8}}],Table[{i,Quotient[Mod[i-1,6],2],If[OddQ[i],1,-1]*Piecewise[{{1/12,i<=6},{1/6,i<=12}},1/4]},{i,1,18}]} +``` + +Full raw output: +```text +Out[1]= {0, {{2, 6, 8}, {8, 24, 24}, {32, 96, 96}, {64, 192, 192}}, {v, v}, {{1, 0, 1/12}, {2, 0, -1/12}, {3, 1, 1/12}, {4, 1, -1/12}, {5, 2, 1/12}, {6, 2, -1/12}, {7, 0, 1/6}, {8, 0, -1/6}, {9, 1, 1/6}, {10, 1, -1/6}, {11, 2, 1/6}, {12, 2, -1/6}, {13, 0, 1/4}, {14, 0, -1/4}, {15, 1, 1/4}, {16, 1, -1/4}, {17, 2, 1/4}, {18, 2, -1/4}}} +``` diff --git a/native/neuralese/evidence/nl7-wire-mutants.log b/native/neuralese/evidence/nl7-wire-mutants.log new file mode 100644 index 0000000..c15647d --- /dev/null +++ b/native/neuralese/evidence/nl7-wire-mutants.log @@ -0,0 +1,26 @@ +OM2GATE START cases=native/neuralese/fixtures/nl7-wire.cases scratch=/tmp/nl7-wire-qualification +IDENTITY omc /home/drakestapleton/fix/neuralese/seed/out/omc sha256=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 pinned=d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 match +DEADLINE 20 +CASE nl7-wire-real line=3 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-wire-qualification/3.src > /tmp/nl7-wire-qualification/3.elf 2> /tmp/nl7-wire-qualification/3.cerr + $ /tmp/nl7-wire-qualification/3.elf < inputs/nl7-real.csv > /tmp/nl7-wire-qualification/3.out 2> /tmp/nl7-wire-qualification/3.err +VERDICT nl7-wire-real PASS run exit=0 expected=0 stdout=match stderr=match +SUBST native/neuralese/fixtures/nl7-wire-receiver_weights.from native/neuralese/fixtures/nl7-wire-receiver_weights.to +CASE nl7-wire-kill-receiver_weights line=5 + MUTATE exact-once substitution at byte 4623 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-wire-qualification/5.src > /tmp/nl7-wire-qualification/5.elf 2> /tmp/nl7-wire-qualification/5.cerr + $ /tmp/nl7-wire-qualification/5.elf < inputs/nl7-real.csv > /tmp/nl7-wire-qualification/5.out 2> /tmp/nl7-wire-qualification/5.err +VERDICT nl7-wire-kill-receiver_weights PASS run exit=1 expected=1 killed: stdout differs from the oracle at byte 8 stderr=match +SUBST native/neuralese/fixtures/nl7-wire-carrier_decode.from native/neuralese/fixtures/nl7-wire-carrier_decode.to +CASE nl7-wire-kill-carrier_decode line=7 + MUTATE exact-once substitution at byte 3839 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-wire-qualification/7.src > /tmp/nl7-wire-qualification/7.elf 2> /tmp/nl7-wire-qualification/7.cerr + $ /tmp/nl7-wire-qualification/7.elf < inputs/nl7-real.csv > /tmp/nl7-wire-qualification/7.out 2> /tmp/nl7-wire-qualification/7.err +VERDICT nl7-wire-kill-carrier_decode PASS run exit=1 expected=1 killed: stdout differs from the oracle at byte 8 stderr=match +SUBST native/neuralese/fixtures/nl7-wire-receiver_threshold.from native/neuralese/fixtures/nl7-wire-receiver_threshold.to +CASE nl7-wire-kill-receiver_threshold line=9 + MUTATE exact-once substitution at byte 4864 + $ /home/drakestapleton/fix/neuralese/seed/out/omc < /tmp/nl7-wire-qualification/9.src > /tmp/nl7-wire-qualification/9.elf 2> /tmp/nl7-wire-qualification/9.cerr + $ /tmp/nl7-wire-qualification/9.elf < inputs/nl7-real.csv > /tmp/nl7-wire-qualification/9.out 2> /tmp/nl7-wire-qualification/9.err +VERDICT nl7-wire-kill-receiver_threshold PASS run exit=1 expected=1 killed: stdout differs from the oracle at byte 8 stderr=match +OM2GATE PASS cases=4 pass=4 fail=0 invalid=0 not_run=0 diff --git a/native/neuralese/evidence/nl7-wire.stdout b/native/neuralese/evidence/nl7-wire.stdout new file mode 100644 index 0000000..42b6aa3 --- /dev/null +++ b/native/neuralese/evidence/nl7-wire.stdout @@ -0,0 +1 @@ +NL7WIRE PASS frames=21888 refused=3764 diff --git a/native/neuralese/mutants/nl7-additive.from b/native/neuralese/mutants/nl7-additive.from new file mode 100644 index 0000000..bde8a70 --- /dev/null +++ b/native/neuralese/mutants/nl7-additive.from @@ -0,0 +1,2 @@ +put LA k v +put LH k v diff --git a/native/neuralese/mutants/nl7-additive.to b/native/neuralese/mutants/nl7-additive.to new file mode 100644 index 0000000..c5f6d85 --- /dev/null +++ b/native/neuralese/mutants/nl7-additive.to @@ -0,0 +1,2 @@ +put LA k v +put LH k lsoft v diff --git a/native/neuralese/mutants/nl7-binary-padding.from b/native/neuralese/mutants/nl7-binary-padding.from new file mode 100644 index 0000000..5f42641 --- /dev/null +++ b/native/neuralese/mutants/nl7-binary-padding.from @@ -0,0 +1,3 @@ +if ne get R7W k 0 +ret 99 +end diff --git a/native/neuralese/mutants/nl7-binary-padding.to b/native/neuralese/mutants/nl7-binary-padding.to new file mode 100644 index 0000000..7e6e19b --- /dev/null +++ b/native/neuralese/mutants/nl7-binary-padding.to @@ -0,0 +1 @@ +note MUTANT ignore binary padding diff --git a/native/neuralese/mutants/nl7-finite.from b/native/neuralese/mutants/nl7-finite.from new file mode 100644 index 0000000..a22e6cf --- /dev/null +++ b/native/neuralese/mutants/nl7-finite.from @@ -0,0 +1,3 @@ +if not le r7abs v 4.0f64 +ret 1 +end diff --git a/native/neuralese/mutants/nl7-finite.to b/native/neuralese/mutants/nl7-finite.to new file mode 100644 index 0000000..54691ce --- /dev/null +++ b/native/neuralese/mutants/nl7-finite.to @@ -0,0 +1 @@ +note MUTANT nonfinite admission diff --git a/native/neuralese/mutants/nl7-learn-confidence.from b/native/neuralese/mutants/nl7-learn-confidence.from new file mode 100644 index 0000000..0858118 --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-confidence.from @@ -0,0 +1,3 @@ +if lt fabs sub get LO j 0.5f64 0.1f64 +ret 99 +end diff --git a/native/neuralese/mutants/nl7-learn-confidence.to b/native/neuralese/mutants/nl7-learn-confidence.to new file mode 100644 index 0000000..a387aed --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-confidence.to @@ -0,0 +1 @@ +note MUTANT accept ambiguous learned output diff --git a/native/neuralese/mutants/nl7-learn-finite.from b/native/neuralese/mutants/nl7-learn-finite.from new file mode 100644 index 0000000..f780b50 --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-finite.from @@ -0,0 +1,3 @@ +fn s7finite v f64 to bool +ret eq sub v v 0.0f64 +end diff --git a/native/neuralese/mutants/nl7-learn-finite.to b/native/neuralese/mutants/nl7-learn-finite.to new file mode 100644 index 0000000..d1382f2 --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-finite.to @@ -0,0 +1,3 @@ +fn s7finite v f64 to bool +ret true +end diff --git a/native/neuralese/mutants/nl7-learn-length.from b/native/neuralese/mutants/nl7-learn-length.from new file mode 100644 index 0000000..a67fb87 --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-length.from @@ -0,0 +1,3 @@ +if or eq bits 0 ne mul n 8 budget +ret 1 +end diff --git a/native/neuralese/mutants/nl7-learn-length.to b/native/neuralese/mutants/nl7-learn-length.to new file mode 100644 index 0000000..9810ab0 --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-length.to @@ -0,0 +1,3 @@ +if eq bits 0 +ret 1 +end diff --git a/native/neuralese/mutants/nl7-learn-padding.from b/native/neuralese/mutants/nl7-learn-padding.from new file mode 100644 index 0000000..2e2bd3c --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-padding.from @@ -0,0 +1,3 @@ +if ne and get S7wire 0 uchar 192 uchar 0 +ret 1 +end diff --git a/native/neuralese/mutants/nl7-learn-padding.to b/native/neuralese/mutants/nl7-learn-padding.to new file mode 100644 index 0000000..eceba4d --- /dev/null +++ b/native/neuralese/mutants/nl7-learn-padding.to @@ -0,0 +1 @@ +note MUTANT admit nonzero padding diff --git a/native/neuralese/mutants/nl7-length.from b/native/neuralese/mutants/nl7-length.from new file mode 100644 index 0000000..b345e7b --- /dev/null +++ b/native/neuralese/mutants/nl7-length.from @@ -0,0 +1,4 @@ +fn r7unpack budget ulong n ulong to int +if ne n div budget 8 +ret 1 +end diff --git a/native/neuralese/mutants/nl7-length.to b/native/neuralese/mutants/nl7-length.to new file mode 100644 index 0000000..774cf9e --- /dev/null +++ b/native/neuralese/mutants/nl7-length.to @@ -0,0 +1,2 @@ +fn r7unpack budget ulong n ulong to int +note MUTANT ignore numeric carrier length diff --git a/native/neuralese/mutants/nl7-map.from b/native/neuralese/mutants/nl7-map.from new file mode 100644 index 0000000..60f146f --- /dev/null +++ b/native/neuralese/mutants/nl7-map.from @@ -0,0 +1 @@ +ret div f64 add mul and id 1 2 and shr id 1 1 3.0f64 diff --git a/native/neuralese/mutants/nl7-map.to b/native/neuralese/mutants/nl7-map.to new file mode 100644 index 0000000..3d16182 --- /dev/null +++ b/native/neuralese/mutants/nl7-map.to @@ -0,0 +1 @@ +ret div f64 add and id 1 and shr id 1 1 3.0f64 diff --git a/native/neuralese/mutants/nl7-padding.from b/native/neuralese/mutants/nl7-padding.from new file mode 100644 index 0000000..4df4a79 --- /dev/null +++ b/native/neuralese/mutants/nl7-padding.from @@ -0,0 +1,3 @@ +if ne and ulong get R7W 0 192 0 +ret 1 +end diff --git a/native/neuralese/mutants/nl7-padding.to b/native/neuralese/mutants/nl7-padding.to new file mode 100644 index 0000000..4462039 --- /dev/null +++ b/native/neuralese/mutants/nl7-padding.to @@ -0,0 +1 @@ +note MUTANT ignore numeric padding diff --git a/native/neuralese/mutants/nl7-radius.from b/native/neuralese/mutants/nl7-radius.from new file mode 100644 index 0000000..d102e94 --- /dev/null +++ b/native/neuralese/mutants/nl7-radius.from @@ -0,0 +1 @@ +if le r7distance v r7code id 1 diff --git a/native/neuralese/mutants/nl7-radius.to b/native/neuralese/mutants/nl7-radius.to new file mode 100644 index 0000000..8387078 --- /dev/null +++ b/native/neuralese/mutants/nl7-radius.to @@ -0,0 +1 @@ +if le r7distance v r7code id 0 diff --git a/native/neuralese/mutants/nl7-receiver.from b/native/neuralese/mutants/nl7-receiver.from new file mode 100644 index 0000000..bc1c769 --- /dev/null +++ b/native/neuralese/mutants/nl7-receiver.from @@ -0,0 +1 @@ +u = s7get mul k bits bits diff --git a/native/neuralese/mutants/nl7-receiver.to b/native/neuralese/mutants/nl7-receiver.to new file mode 100644 index 0000000..227b9d0 --- /dev/null +++ b/native/neuralese/mutants/nl7-receiver.to @@ -0,0 +1 @@ +u = ulong 0 diff --git a/native/neuralese/mutants/nl7-separate.from b/native/neuralese/mutants/nl7-separate.from new file mode 100644 index 0000000..c75e20b --- /dev/null +++ b/native/neuralese/mutants/nl7-separate.from @@ -0,0 +1 @@ +v = mul mul -2.0f64 0.1f64 mul s7delta i j k x diff --git a/native/neuralese/mutants/nl7-separate.to b/native/neuralese/mutants/nl7-separate.to new file mode 100644 index 0000000..94a68d3 --- /dev/null +++ b/native/neuralese/mutants/nl7-separate.to @@ -0,0 +1 @@ +v = mul mul 2.0f64 0.1f64 mul s7delta i j k x diff --git a/native/neuralese/mutants/nl7-tie.from b/native/neuralese/mutants/nl7-tie.from new file mode 100644 index 0000000..04efc55 --- /dev/null +++ b/native/neuralese/mutants/nl7-tie.from @@ -0,0 +1,3 @@ +if tie +ret 99 +end diff --git a/native/neuralese/mutants/nl7-tie.to b/native/neuralese/mutants/nl7-tie.to new file mode 100644 index 0000000..2df6c6f --- /dev/null +++ b/native/neuralese/mutants/nl7-tie.to @@ -0,0 +1 @@ +note MUTANT accept nearest-codeword tie diff --git a/native/neuralese/nl7-guards.cases b/native/neuralese/nl7-guards.cases new file mode 100644 index 0000000..08bb0e2 --- /dev/null +++ b/native/neuralese/nl7-guards.cases @@ -0,0 +1,32 @@ +# Synthetic native guards. Normal guard runs produce no stdout; mutants refuse at named checks. +deadline 30 +structure-controls run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 0 guard +learned-controls run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 0 +subst native/neuralese/mutants/nl7-map.from native/neuralese/mutants/nl7-map.to +kill-exact-map run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 41 guard +subst native/neuralese/mutants/nl7-tie.from native/neuralese/mutants/nl7-tie.to +kill-exact-tie run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 51 guard +subst native/neuralese/mutants/nl7-radius.from native/neuralese/mutants/nl7-radius.to +kill-rm-radius run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 53 guard +subst native/neuralese/mutants/nl7-finite.from native/neuralese/mutants/nl7-finite.to +kill-wire-finite run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 47 guard +subst native/neuralese/mutants/nl7-length.from native/neuralese/mutants/nl7-length.to +kill-wire-length run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 46 guard +subst native/neuralese/mutants/nl7-additive.from native/neuralese/mutants/nl7-additive.to +kill-additive-composition run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 43 +subst native/neuralese/mutants/nl7-separate.from native/neuralese/mutants/nl7-separate.to +kill-separation-sign run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 44 +subst native/neuralese/mutants/nl7-receiver.from native/neuralese/mutants/nl7-receiver.to +kill-learned-carrier run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 46 +subst native/neuralese/mutants/nl7-learn-length.from native/neuralese/mutants/nl7-learn-length.to +kill-learned-length run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 45 +subst native/neuralese/mutants/nl7-learn-finite.from native/neuralese/mutants/nl7-learn-finite.to +kill-learned-finite run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 46 +subst native/neuralese/mutants/nl7-learn-padding.from native/neuralese/mutants/nl7-learn-padding.to +kill-learned-padding run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 51 +subst native/neuralese/mutants/nl7-learn-confidence.from native/neuralese/mutants/nl7-learn-confidence.to +kill-learned-confidence run native/neuralese/hadamard.om+native/neuralese/io.om+native/neuralese/affine.om+native/neuralese/nl7-learn.om+native/neuralese/nl7-guards.om - - - 48 +subst native/neuralese/mutants/nl7-padding.from native/neuralese/mutants/nl7-padding.to +kill-exact-padding run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 49 guard +subst native/neuralese/mutants/nl7-binary-padding.from native/neuralese/mutants/nl7-binary-padding.to +kill-binary-padding run native/neuralese/io.om+native/neuralese/nl7-structure.om - - - 50 guard diff --git a/native/neuralese/nl7-guards.om b/native/neuralese/nl7-guards.om new file mode 100644 index 0000000..0a5d651 --- /dev/null +++ b/native/neuralese/nl7-guards.om @@ -0,0 +1,5 @@ +note SPDX-License-Identifier: AGPL-3.0-only +note NL7 guard-only qualification entry. No training or held-out scoring. +fn main to int +ret s7guards +end diff --git a/native/neuralese/nl7-learn-main.om b/native/neuralese/nl7-learn-main.om new file mode 100644 index 0000000..56dff25 --- /dev/null +++ b/native/neuralese/nl7-learn-main.om @@ -0,0 +1,4 @@ +note SPDX-License-Identifier: AGPL-3.0-only +fn main to int +ret nl7learn +end diff --git a/native/neuralese/nl7-learn.om b/native/neuralese/nl7-learn.om new file mode 100644 index 0000000..f720523 --- /dev/null +++ b/native/neuralese/nl7-learn.om @@ -0,0 +1,594 @@ +note SPDX-License-Identifier: AGPL-3.0-only +note NL7 frozen additive and unchanged NL1 learned receiver/optimizer. +global S7meta ulong 4 +global S7wire uchar 24 +global S7stage f64 3 +global S7codes f64 48 +global S7save f64 31 +text S7N "N," +text S7P "P," +text S7D "D," +text S7W "D," + +fn s7end to void +z = write 1 EOL 0 1 +if ne z 1 +exit 80 +end +end + +fn s7member id ulong split ulong to bool +if eq split 0 +ret true +end +if or or eq id 0 eq id 1 or eq id 2 or eq id 4 eq id 8 +ret true +end +if eq split 1 +ret or eq id 3 or eq id 5 eq id 9 +end +ret or eq id 6 or eq id 10 eq id 12 +end + +fn s7send arm ulong to void +if eq arm 3 +lsend 0 +ret +end +for k ulong 3 +v = get LP add 12 k +for j ulong 4 +v = add v mul get LX j get LP add mul j 3 k +end +put LA k v +put LH k v +end +end + +fn s7grad arm ulong to void +lgrad +if eq arm 2 +for k ulong 3 +v = get LD k +put LG add 12 k v +for j ulong 4 +put LG add mul j 3 k mul v get LX j +end +end +end +end + +fn s7delta i ulong j ulong k ulong to f64 +v = 0.0f64 +for r ulong 4 +a = f64 and shr i r 1 +b = f64 and shr j r 1 +v = add v mul sub a b get LP add mul r 3 k +end +ret v +end + +fn s7dist i ulong j ulong to f64 +v = 0.0f64 +for k ulong 3 +d = s7delta i j k +v = add v mul d d +end +ret v +end + +fn s7pair i ulong j ulong to int +if ge s7dist i j div 1.0f64 9.0f64 +ret 0 +end +for p ulong 31 +put LG p 0.0f64 +end +note Active hinge derivative -2 * weight * delta * input_difference. +for r ulong 4 +x = sub f64 and shr i r 1 f64 and shr j r 1 +for k ulong 3 +v = mul mul -2.0f64 0.1f64 mul s7delta i j k x +put LG add mul r 3 k v +end +end +ret lstep 0.1f64 0 +end + +fn s7train split ulong arm ulong to int +for epoch ulong 2000 +for id ulong 16 +if s7member id split +linput id id +s7send arm +lrecv true +s7grad arm +rc = lstep 0.1f64 0 +if ne rc 0 +ret rc +end +end +end +if eq arm 2 +for i ulong 16 +if s7member i split +for j ulong 16 +if and gt j i s7member j split +rc = s7pair i j +if ne rc 0 +ret rc +end +end +end +end +end +end +end +ret 0 +end + +fn s7bits budget ulong to ulong +if eq budget 8 +ret 2 +end +if eq budget 24 +ret 8 +end +if eq budget 96 +ret 32 +end +if eq budget 192 +ret 64 +end +ret 0 +end + +fn s7setbit p ulong to void +ix = div p 8 +v = ulong get S7wire ix +mask = shl ulong 1 rem p 8 +v = or v mask +put S7wire ix uchar v +end + +fn s7put at ulong bits ulong value ulong to void +for b ulong bits +if ne and shr value b 1 0 +s7setbit add at b +end +end +end + +fn s7readbit p ulong to ulong +v = ulong get S7wire div p 8 +ret and shr v rem p 8 1 +end + +fn s7get at ulong bits ulong to ulong +v = ulong 0 +for b ulong bits +p = add at b +q = s7readbit p +v = or v shl q b +end +ret v +end + +fn s7finite v f64 to bool +ret eq sub v v 0.0f64 +end + +fn s7encode budget ulong to int +bits = s7bits budget +if eq bits 0 +ret 1 +end +for k ulong 3 +v = get LH k +if not s7finite v +ret 2 +end +if le bits 8 +if not le fabs v 4.0f64 +ret 2 +end +end +if eq bits 32 +if not s7finite f64 f32 v +ret 2 +end +end +end +for b ulong 24 +put S7wire b uchar 0 +end +for k ulong 3 +v = get LH k +u = ulong 0 +if le bits 8 +levels = sub shl ulong 1 bits 1 +q = mul div add v 4.0f64 8.0f64 f64 levels +u = ulong add q 0.5f64 +else +if eq bits 32 +w = f32 v +if not s7finite f64 w +ret 2 +end +u = ulong bitcast uint w +else +u = bitcast ulong v +end +end +s7put mul k bits bits u +end +ret 0 +end + +fn s7decode budget ulong n ulong mode ulong to int +bits = s7bits budget +if or eq bits 0 ne mul n 8 budget +ret 1 +end +if gt mode 18 +ret 1 +end +if eq budget 8 +if ne and get S7wire 0 uchar 192 uchar 0 +ret 1 +end +end +for k ulong 3 +u = s7get mul k bits bits +v = 0.0f64 +if le bits 8 +levels = sub shl ulong 1 bits 1 +v = sub mul div f64 u f64 levels 8.0f64 4.0f64 +else +if eq bits 32 +v = f64 bitcast f32 uint u +else +v = bitcast f64 u +end +end +if not s7finite v +ret 2 +end +put S7stage k v +end +if gt mode 0 +m = sub mode 1 +axis = div rem m 6 2 +v = div 1.0f64 12.0f64 +if ge m 6 +v = div 1.0f64 6.0f64 +end +if ge m 12 +v = div 1.0f64 4.0f64 +end +if eq rem m 2 1 +v = neg v +end +put S7stage axis add get S7stage axis v +end +for k ulong 3 +if not s7finite get S7stage k +ret 2 +end +end +for k ulong 3 +put LH k get S7stage k +end +lrecv true +ret 0 +end + +fn s7pred to ulong +v = ulong 0 +for j ulong 4 +if not le fabs get LO j 1.0f64 +ret 99 +end +if lt fabs sub get LO j 0.5f64 0.1f64 +ret 99 +end +if ge get LO j 0.5f64 +v = or v shl ulong 1 j +end +end +ret v +end + +fn s7prefix tag ulong to void +z = long 0 +if eq tag 0 +z = write 1 S7N 0 2 +end +if eq tag 1 +z = write 1 S7P 0 2 +end +if eq tag 2 +z = write 1 S7D 0 2 +end +if eq tag 3 +z = write 1 S7W 0 2 +end +if ne z 2 +exit 80 +end +for i ulong 3 +nnum get S7meta i +nsep +end +end + +fn s7row id ulong budget ulong mode ulong to void +linput id id +s7send get S7meta 2 +rc = s7encode budget +if eq rc 0 +rc = s7decode budget div budget 8 mode +end +pred = ulong 99 +if eq rc 0 +pred = s7pred +end +s7prefix 0 +nnum id +nsep +nnum budget +nsep +nnum mode +nsep +nnum pred +nsep +status = ulong 0 +if eq pred 99 +status = 1 +end +nnum status +nsep +nnum mul s7bits budget 3 +s7end +note Actual serialized carrier bytes and decoded IEEE coordinates, separate evidence. +s7prefix 3 +nnum id +nsep +nnum budget +nsep +nnum mode +nsep +nnum ulong rc +for b ulong div budget 8 +nsep +nnum ulong get S7wire b +end +for k ulong 3 +nsep +nnum bitcast ulong get LH k +end +s7end +end + +fn s7code id ulong k ulong to f64 +ret get S7codes add mul id 3 k +end + +fn s7codedist i ulong j ulong to f64 +v = 0.0f64 +for k ulong 3 +d = sub s7code i k s7code j k +v = add v mul d d +end +ret v +end + +fn s7resid id ulong k ulong to f64 +v = s7code 0 k +for r ulong 4 +if ne and shr id r 1 0 +d = sub s7code shl ulong 1 r k s7code 0 k +v = add v d +end +end +ret fabs sub s7code id k v +end + +fn s7describe arm ulong to void +for p ulong 31 +s7prefix 1 +nnum p +nsep +nnum bitcast ulong get LP p +s7end +end +for id ulong 16 +linput id id +s7send arm +for k ulong 3 +put S7codes add mul id 3 k get LH k +end +end +mind = 1000000.0f64 +resid = 0.0f64 +for i ulong 16 +for j ulong 16 +if gt j i +v = s7codedist i j +if lt v mind +mind = v +end +end +end +for k ulong 3 +d = s7resid i k +if gt d resid +resid = d +end +end +end +s7prefix 2 +nnum bitcast ulong mind +nsep +nnum bitcast ulong resid +s7end +end + +fn s7model seed ulong split ulong arm ulong to int +put S7meta 0 seed +put S7meta 1 split +put S7meta 2 arm +linit seed +rc = s7train split arm +if ne rc 0 +ret rc +end +s7describe arm +for bi ulong 4 +budget = ulong 8 +if eq bi 1 +budget = 24 +end +if eq bi 2 +budget = 96 +end +if eq bi 3 +budget = 192 +end +for id ulong 16 +for mode ulong 19 +s7row id budget mode +end +end +end +ret 0 +end + +fn s7guards to int +linit 101 +for p ulong 31 +put S7save p get LP p +put LG p 0.0f64 +end +put LG 30 div 0.0f64 0.0f64 +rc = lstep 0.1f64 0 +if ne rc 2 +ret 41 +end +for p ulong 31 +if ne get LP p get S7save p +ret 42 +end +end +linput 0 0 +s7send 2 +for k ulong 3 +if ne get LH k get LP add 12 k +ret 43 +end +end +linput 1 1 +s7send 2 +for k ulong 3 +v = add get LP add 12 k get LP k +if gt fabs sub get LH k v 0.000000000001f64 +ret 52 +end +end +for p ulong 15 +put LP p 0.0f64 +end +put LP 0 0.1f64 +v = s7dist 0 1 +rc = s7pair 0 1 +if or ne rc 0 not gt s7dist 0 1 v +ret 44 +end +for j ulong 4 +put LO j -77.0f64 +end +rc = s7decode 192 23 0 +if ne rc 1 +ret 45 +end +for k ulong 3 +put LH k 0.0f64 +end +rc = s7encode 192 +s7put 0 64 bitcast ulong div 0.0f64 0.0f64 +rc = s7decode 192 24 0 +if ne rc 2 +ret 46 +end +for j ulong 4 +if ne get LO j -77.0f64 +ret 47 +end +end +for j ulong 4 +put LO j 0.5f64 +end +if ne s7pred 99 +ret 48 +end +note Carrier-read control: input fixed, receiver weight selects only coordinate zero. +for p ulong 31 +put LP p 0.0f64 +end +put LP 15 1.0f64 +linput 15 15 +for k ulong 3 +put LH k 0.0f64 +end +put LH 0 1.0f64 +rc = s7encode 192 +put LH 0 -1.0f64 +rc = s7decode 192 24 0 +if or ne rc 0 not gt get LO 0 0.5f64 +ret 49 +end +note Clear first coordinate before replacing because bit writer is OR-only. +for b ulong 8 +put S7wire b uchar 0 +end +s7put 0 64 bitcast ulong -1.0f64 +rc = s7decode 192 24 0 +if or ne rc 0 not lt get LO 0 0.5f64 +ret 50 +end +for k ulong 3 +put LH k 0.0f64 +end +rc = s7encode 8 +put S7wire 0 uchar or ulong get S7wire 0 192 +rc = s7decode 8 1 0 +if ne rc 1 +ret 51 +end +ret 0 +end + +fn nl7learn to int +rc = s7guards +if ne rc 0 +ret rc +end +for si ulong 3 +seed = ulong 101 +if eq si 1 +seed = 211 +end +if eq si 2 +seed = 307 +end +for split ulong 3 +for ai ulong 2 +rc = s7model seed split add ai 2 +if ne rc 0 +ret rc +end +end +end +end +ret 0 +end diff --git a/native/neuralese/nl7-structure.om b/native/neuralese/nl7-structure.om new file mode 100644 index 0000000..9fa1964 --- /dev/null +++ b/native/neuralese/nl7-structure.om @@ -0,0 +1,408 @@ +note SPDX-License-Identifier: AGPL-3.0-only +note NL7 freeze989fb7a; synthetic only. Compose io.om then this unit. +global R7W uchar 24 +global R7H f64 3 +global R7S ulong 5 +text R7N "N," +fn r7abs x f64 to f64 +if lt x 0.0f64 +ret neg x +end +ret x +end +fn r7coord id ulong k ulong to f64 +if eq k 0 +ret div f64 add mul and id 1 2 and shr id 1 1 3.0f64 +end +ret f64 and shr id add k 1 1 +end +fn r7code id ulong to ulong +v = ulong 0 +for p ulong 8 +b = and id 1 +for k ulong 3 +b = xor b and and shr id add k 1 1 and shr p k 1 +end +v = or v shl b p +end +ret v +end +fn r7distance a ulong b ulong to ulong +v = xor a b +n = ulong 0 +for k ulong 8 +n = add n and shr v k 1 +end +ret n +end +fn r7clear to void +for k ulong 24 +put R7W k uchar 0 +end +end +fn r7put off ulong width ulong v ulong to void +for k ulong width +put R7W add off k uchar and shr v mul k 8 255 +end +end +fn r7get off ulong width ulong to ulong +v = ulong 0 +for k ulong width +v = or v shl ulong get R7W add off k mul k 8 +end +ret v +end +fn r7send id ulong arm ulong budget ulong to void +r7clear +if eq arm 1 +put R7W 0 uchar r7code id +ret +end +if eq arm 4 +put R7W 0 uchar id +ret +end +for k ulong 3 +v = r7coord id k +if eq budget 8 +q = ulong add mul v 3.0f64 0.5f64 +put R7W 0 uchar or ulong get R7W 0 shl q mul k 2 +end +if eq budget 24 +r7put k 1 ulong add mul v 255.0f64 0.5f64 +end +if eq budget 96 +r7put mul k 4 4 ulong bitcast uint f32 v +end +if eq budget 192 +r7put mul k 8 8 bitcast ulong v +end +end +end +fn r7unpack budget ulong n ulong to int +if ne n div budget 8 +ret 1 +end +if eq budget 8 +if ne and ulong get R7W 0 192 0 +ret 1 +end +end +for k ulong 3 +v = 0.0f64 +if eq budget 8 +v = div f64 and shr ulong get R7W 0 mul k 2 3 3.0f64 +end +if eq budget 24 +v = div f64 r7get k 1 255.0f64 +end +if eq budget 96 +v = f64 bitcast f32 uint r7get mul k 4 4 +end +if eq budget 192 +v = bitcast f64 r7get mul k 8 8 +end +if not le r7abs v 4.0f64 +ret 1 +end +end +note Commit only after validation of every coordinate. +for k ulong 3 +v = 0.0f64 +if eq budget 8 +v = div f64 and shr ulong get R7W 0 mul k 2 3 3.0f64 +end +if eq budget 24 +v = div f64 r7get k 1 255.0f64 +end +if eq budget 96 +v = f64 bitcast f32 uint r7get mul k 4 4 +end +if eq budget 192 +v = bitcast f64 r7get mul k 8 8 +end +put R7H k v +end +ret 0 +end +fn r7pert mode ulong to void +if eq mode 0 +ret +end +axis = rem div sub mode 1 2 3 +amount = div 1.0f64 12.0f64 +if ge mode 7 +amount = div 1.0f64 6.0f64 +end +if ge mode 13 +amount = div 1.0f64 4.0f64 +end +if eq rem mode 2 0 +amount = neg amount +end +put R7H axis add get R7H axis amount +end +fn r7nearest to ulong +best = 1000.0f64 +pred = ulong 99 +tie = false +for id ulong 16 +dist = 0.0f64 +for k ulong 3 +v = sub get R7H k r7coord id k +dist = add dist mul v v +end +if eq dist best +tie = true +end +if lt dist best +best = dist +pred = id +tie = false +end +end +if tie +ret 99 +end +ret pred +end +fn r7binary arm ulong budget ulong n ulong to ulong +if ne n div budget 8 +ret 99 +end +for k ulong 24 +if and ge k 1 lt k n +if ne get R7W k 0 +ret 99 +end +end +end +v = ulong get R7W 0 +if eq arm 4 +if ge v 16 +ret 99 +end +ret v +end +pred = ulong 99 +for id ulong 16 +if le r7distance v r7code id 1 +if ne pred 99 +ret 99 +end +pred = id +end +end +ret pred +end +fn r7emit id ulong mode ulong pred ulong payload ulong to void +w = write 1 R7N 0 2 +if ne w 2 +exit 80 +end +for k ulong 3 +nnum get R7S k +nsep +end +nnum id +nsep +nnum get R7S 4 +nsep +nnum mode +nsep +nnum pred +nsep +status = ulong 0 +if eq pred 99 +status = 1 +end +nnum status +nsep +nnum payload +w = write 1 EOL 0 1 +if ne w 1 +exit 80 +end +end +fn r7numeric id ulong budget ulong to int +r7send id 0 budget +rc = r7unpack budget div budget 8 +if ne rc 0 +ret 30 +end +for mode ulong 19 +rc = r7unpack budget div budget 8 +if ne rc 0 +ret 31 +end +r7pert mode +payload = budget +if eq budget 8 +payload = 6 +end +r7emit id mode r7nearest payload +end +ret 0 +end +fn r7flip mask ulong to void +v = xor ulong get R7W 0 mask +put R7W 0 uchar v +end +fn r7record id ulong mode ulong payload ulong to void +pred = r7binary get R7S 2 get R7S 4 div get R7S 4 8 +r7emit id mode pred payload +end +fn r7bits id ulong arm ulong budget ulong to void +r7send id arm budget +count = ulong 8 +payload = ulong 8 +if eq arm 4 +count = 4 +payload = 4 +end +r7record id 0 payload +for i ulong count +r7send id arm budget +r7flip shl ulong 1 i +r7record id add 100 i payload +for j ulong count +if gt j i +r7send id arm budget +mask = or shl ulong 1 i shl ulong 1 j +r7flip mask +r7record id add 200 add mul i 8 j payload +end +end +end +end +fn r7controls to int +for id ulong 16 +for k ulong 3 +put R7H k r7coord id k +end +if ne r7nearest id +ret 41 +end +if ne r7binary 1 8 0 99 +ret 42 +end +r7send id 1 8 +if ne r7binary 1 8 1 id +ret 43 +end +end +r7send 15 4 8 +put R7W 0 uchar 0 +if ne r7binary 4 8 1 0 +ret 44 +end +r7send 15 0 192 +r7send 0 0 192 +rc = r7unpack 192 24 +if or ne rc 0 ne r7nearest 0 +ret 45 +end +for k ulong 3 +put R7H k -77.0f64 +end +rc = r7unpack 192 23 +if ne rc 1 +ret 46 +end +r7put 16 8 bitcast ulong div 0.0f64 0.0f64 +rc = r7unpack 192 24 +if ne rc 1 +ret 47 +end +for k ulong 3 +if ne get R7H k -77.0f64 +ret 48 +end +end +r7send 0 0 8 +put R7W 0 uchar 192 +rc = r7unpack 8 1 +if ne rc 1 +ret 49 +end +r7send 0 1 24 +put R7W 1 uchar 1 +if ne r7binary 1 24 3 99 +ret 50 +end +for k ulong 3 +put R7H k 0.0f64 +end +put R7H 0 div 1.0f64 6.0f64 +if ne r7nearest 99 +ret 51 +end +r7send 0 1 8 +put R7W 0 uchar 3 +if ne r7binary 1 8 1 99 +ret 52 +end +r7send 0 1 8 +put R7W 0 uchar 1 +if ne r7binary 1 8 1 0 +ret 53 +end +ret 0 +end +fn r7seed index ulong to ulong +if eq index 0 +ret 101 +end +if eq index 1 +ret 211 +end +ret 307 +end +fn r7budget index ulong to ulong +if eq index 0 +ret 8 +end +if eq index 1 +ret 24 +end +if eq index 2 +ret 96 +end +ret 192 +end +fn main to int +rc = r7controls +if ne rc 0 +ret rc +end +if gt argcnt 1 +ret 0 +end +for seed ulong 3 +put R7S 0 r7seed seed +for split ulong 3 +put R7S 1 split +for arm ulong 5 +if or eq arm 0 or eq arm 1 eq arm 4 +put R7S 2 arm +put R7S 3 ulong 0 +for bi ulong 4 +budget = r7budget bi +put R7S 4 budget +for id ulong 16 +if eq arm 0 +rc = r7numeric id budget +if ne rc 0 +ret rc +end +else +r7bits id arm budget +end +end +end +end +end +end +end +ret 0 +end