diff --git a/README.md b/README.md index 21679ee..29a7aa2 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,158 @@ Wolfram-derived references, including a wrong-terminal-state negative control; [`nl5_wolfram_raw.json`](native/neuralese/nl5_wolfram_raw.json) retains the actual arithmetic tool calls and results. +## Neuralese structure follow-up (NL-7) + +New freeze: [`neuralese_nl7_prereg.json`](manifests/neuralese_nl7_prereg.json) +at `989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3`, posted on BOARD +2026-10-28T15:21:18Z, before any variant ran. This extends NL-6 without +rewriting its preregistration or using NL-1's split/seeds. + +The fresh public held-out sets are `{6,7,10,11,12,13,14,15}` and +`{3,5,7,9,11,13,14,15}`. Seed order in every cell below is 101,211,307. +Fit means a separate all-sixteen-training run; held-out means a separately +trained eight-combination run. Entries are accepted-correct counts, not +accepted-only accuracy. + +| Variant | Wire bits | Full fit /16 | Split 1 /8 | Split 2 /8 | +|---|---|---|---|---| +| Exact 3-coordinate | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 | +| RM(1,3) | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 | +| Packed semantic | 8,24,96,192 | 16,16,16 | 8,8,8 | 8,8,8 | +| Learned additive + separation | 8 | 0,0,0 | 1,1,3 | 1,0,3 | +| Learned additive + separation | 24 | 1,1,1 | 2,4,3 | 1,0,3 | +| Learned additive + separation | 96,192 | 15,15,15 | 5,6,6 | 3,4,3 | +| Existing learned softsign | 8 | 8,7,8 | 3,2,3 | 1,1,1 | +| Existing learned softsign | 24 | 14,14,14 | 0,1,1 | 2,2,1 | +| Existing learned softsign | 96,192 | 14,14,14 | 0,0,1 | 2,2,1 | + +Budgets are transmitted bits, **not coordinates**. Numeric payload is +6,24,96,192 bits at 2,8,32,64 bits per coordinate; the 8-bit transport has +two zero padding bits. RM's payload is eight bits and packed semantics four +bits, padded to every matched wire budget. Thus a four-bit payload still costs +an actual byte at the smallest tested transport. Codebook, schema and learned +receiver weights are separate shared-state costs. Learned low-bit quantizers +refuse values outside [-4,4], rather than clipping; all refusals remain in the +denominator. The exact construction uses its frozen [0,1] quantizer. + +### Guarantees and robustness + +Wolfram confirms `16` distinct exact points, minimum Euclidean separation +`1/3` and strict nearest-decoder perturbation radius `<1/6`. The native +numeric transport/decoder recovers all sixteen cleanly at all budgets and +all six axis `+/-1/12` probes at 96/192 bits. The `1/6` boundary is not covered +by the strict guarantee; boundary and `1/4` probes are recorded descriptively. +At 192 bits on the all-fit run, across all eighteen nonclean numeric modes, +exact has `(correct,refused,undetected wrong)=(252,8,28)` out of 288. + +Wolfram independently enumerates RM parameters `(16 codewords,8 bits,dmin4)`, +128/128 single-bit recoveries and 448/448 double-bit refusals. The native +enumeration matches these at every budget/seed/split. Double-error detection +is radius-one refusal, not a claim to correct two bits. Packed semantics +accepts all 64 single-bit and 96 double-bit corruptions as wrong. Repeating +these deterministic codebooks over seeds does not create independent trials. + +The additive construction obeys the composition identity algebraically. +The maximum observed absolute coordinate residual over all nine models is +`1.7763568394002504646778106689453125e-15`, independently decoded by Wolfram, +below the frozen `1e-12`. The separation hinge uses training pairs only. +The learned receiver can still fail even with separated sender points. +For 192-bit all-fit runs, additive numeric nonclean counts are +`(270,0,18)` for each seed; existing learned counts are +`(252,5,31)`, `(243,16,29)`, `(245,9,34)`, each out of 288. +Per-held-out robustness, other precisions and individual modes are retained +in [`nl7-score.csv.gz`](native/neuralese/nl7-score.csv.gz), not silently pooled. + +**Verdict: NOT_SUPPORTED** for the frozen additive learned success hypothesis: +full fit is not 16/16 and held-out recovery is not 8/8. It does improve over the +existing learned arm on these fresh high-precision splits, without fixing +recoverability or beating explicit codes. Exact and RM synthetic recovery +thresholds are **EXERCISED**. This is not useful-compression evidence, real-model +evidence, hardware qualification, authority, or deployment. +Johnson-Lindenstrauss projections for real activations are future work only, +**NOT_RUN** here. + +### Native scoring and negative controls + +[`nl7-score.om`](native/neuralese/nl7-score.om) is an independent .om scorer +for all five arms, deriving membership, codewords, Hamming corruptions, +mandatory exact guarantees, budgets and completeness from the frozen contract. +It rejects missing/duplicate/noncanonical records and inconsistent +prediction/status/payload fields. `S` rows contain seed, split, arm, budget, +mode, scope (0 all-sixteen, 1 held-out), total, correct, refused, undetected wrong; +`R` rows pool nonclean modes; `L` reports each frozen learned criterion. +`NL7 CHECKS PASS` means stream/guarantee checks passed, **not learned success**; +the separate result is `NL7 LEARNED NOT_SUPPORTED`. + +`fixtures/nl7-fixture.om` generates ten original checker controls; nine +guard-removal/incorrect-oracle source mutants are in +[`nl7-score.cases`](native/neuralese/fixtures/nl7-score.cases). +All 19 cases passed, including all nine mutants killed. The producer's +native guards separately passed 16 cases including fourteen source mutants. +Actual logs, not inferred outcomes, are retained. The compiler is the same +pinned `d6290c76...` seeded Omega compiler used for NL-1; no Python product path. + +Build by redirecting source through the pinned compiler: + +```sh +"$OMC" < native/neuralese/nl7-score.om > "$WORK/nl7-score" +"$OMC" < native/neuralese/fixtures/nl7-fixture.om > "$WORK/nl7-fixture" +chmod +x "$WORK/nl7-score" "$WORK/nl7-fixture" +"$WORK/nl7-score" < "$WORK/all.csv" > "$WORK/score.csv" +``` + +For native conductor replay, use a fresh context with read-only `native` and +the pinned Omega `seed` available under those relative names. Generate +`inputs/nl7-case-M.csv` with `nl7-fixture M`; capture original scorer stdout as +`expected/nl7-case-M.score` for M=0..9. Run the pinned OM2 conductor on +`native/neuralese/fixtures/nl7-score.cases` with a new scratch directory. +Each KILL requires the exact specified mutant exit and stdout differing from +the corresponding original oracle. Receiver/transport source and full raw +stream/Wolfram receipts are published in the companion aien-train draft. +No compiler/language/host-word, ownership or harness gate changes are made; +omega-harness guide updates are not applicable. + +[`nl7-wire.om`](native/neuralese/nl7-wire.om) additionally replays actual +numeric carrier bytes with the final parameter snapshots, independently +recomputing coordinates, perturbations, receiver scores, predictions and +abstentions. It reports `NL7WIRE PASS frames=21888 refused=3764`. +All four qualification cases passed, including three mutants for receiver +weight indexing, carrier decoding and decision threshold. The total across +the producer guard and two checker conductors is 39 cases, with 26 source +mutants killed. Refused encodes require `pred99/status1`; their stale carrier +bytes cannot independently establish sender-overflow causality. This limitation +does not apply to admitted-carrier decoding, which is replayed. +To replay, compile `nl7-wire.om`, feed the same `all.csv`, then provide +`inputs/nl7-real.csv` and original stdout `expected/nl7-wire.out` to the +native conductor cases in `fixtures/nl7-wire.cases`. + +The conductor reads `inputs/` and `expected/` relative to the replay directory; +without them every NL7 case is `INVALID input, source or fixture unreadable`. +Exact setup, from a replay directory containing `native`, `seed`, the compiled +`gate` and the pinned compiler as `omc` (`all.csv` is the gunzipped +`native/neuralese/evidence/nl7-stream.csv.gz` of the producer revision named in +`nl7-independent.json`, SHA-256 `a70bc35d...`): + +```sh +./omc < native/neuralese/fixtures/nl7-fixture.om > nl7-fixture +./omc < native/neuralese/nl7-score.om > nl7-score +./omc < native/neuralese/nl7-wire.om > nl7-wire +chmod +x nl7-fixture nl7-score nl7-wire +mkdir inputs expected +for M in 0 1 2 3 4 5 6 7 8 9; do + ./nl7-fixture $M > inputs/nl7-case-$M.csv + ./nl7-score < inputs/nl7-case-$M.csv > expected/nl7-case-$M.score +done +cp all.csv inputs/nl7-real.csv +./nl7-wire < all.csv > expected/nl7-wire.out +./gate ./omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-score.cases score-scratch +./gate ./omc d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-wire.cases wire-scratch +``` + +The scorer exits are 0, 90, 90, 90, 90, 0, 1, 1, 90, 90 for M=0..9, as the +cases expect. The conductors report `OM2GATE PASS cases=19` and +`OM2GATE PASS cases=4`. + ## Status (2026-10-19) - **One evidence-backed result:** the [Prime Drag Race campaign of 5 October 2026](prime-drag-race/CAMPAIGN-2026-10-05.md) (details below). diff --git a/manifests/neuralese_nl7_prereg.json b/manifests/neuralese_nl7_prereg.json new file mode 100644 index 0000000..4aefcd8 --- /dev/null +++ b/manifests/neuralese_nl7_prereg.json @@ -0,0 +1,19 @@ +{ + "schema": "neuralese-nl7-prereg/1", + "id": "NL7-20261028-structure", + "base": {"nl6_prereg":"8ee0a494bf73230c9d37647eb3caea792298fa8d","nl6_impl":"e4ab4afecd62272f86d67043f74ffc8153ae703e","nl1":"7edaca90d9c530044b9c5144315cc35bede78780"}, + "scope":"Synthetic host-only; no GPU, real activations, authority, network or deployment. Public fresh splits, not a blinded confirmation.", + "freeze":"Commit this manifest and post its SHA with UTC timestamp on BOARD before running any NL7 variant. Mathematical claims below are hypotheses, not oracle results.", + "seeds":[101,211,307], + "splits":{"0":{"train":"all IDs0..15","test":"all IDs0..15, training-only control"},"1":{"train":[0,1,2,4,8,3,5,9],"test":[6,7,10,11,12,13,14,15]},"2":{"train":[0,1,2,4,8,6,10,12],"test":[3,5,7,9,11,13,14,15]}}, + "input_encoding":"Input ID bit0=a,bit1=b,bit2=c,bit3=d.", + "variants":{"0":"exact z=((2a+b)/3,c,d), nearest 16-codeword decoder with tie refusal","1":"RM(1,3), f=a XOR bx XOR cy XOR dz on triples0..7, radius1 unique decoder; distance2 detection/refusal required","2":"learned additive z=z0+a*v1+b*v2+c*v3+d*v4, same learned receiver as NL1; explicit training-pair separation hinge","3":"existing NL1 learned softsign 4->3->4, unchanged optimizer and receiver","4":"packed semantic four-bit identity control"}, + "learned_protocol":{"initialization":"existing NL1 xorshift32 and all31 parameter draws, fresh seeds","epochs":2000,"lr":"1/10","order":"ascending training IDs, online updates","additive":"remove sender softsign only; receiver unchanged; after each epoch apply training-pair squared-separation hinge max(0,1/9-||z_i-z_j||^2) weighted1/10 with explicit derivative and SGD1/10; no heldout pair in loss","decision":"same threshold>=1/2 and abstain if any abs(score-1/2)<1/10 as NL1; invalid finite carriers refuse atomically","no_tuning":"One frozen run per seed/split; preserve failures. No checkpoint selection, hyperparameter changes or heldout tuning."}, + "transport":{"budgets_bits":[8,24,96,192],"continuous_payload_bits":[6,24,96,192],"coordinates_bits":[2,8,32,64],"representation":"continuous: uniform nearest quantization on [-4,4] at2 or8bits per coordinate, clamp forbidden and overflow refused; IEEE binary32 or binary64 at32/64; three coordinates; remaining8bit budget's2bits are zero padding. Exact code uses [0,1] uniform quantizer at2/8bits, not [-4,4]. Packed4 baseline and RM8 padded with zeros to each matched budget. Charge full budget, also disclose payload. Codebooks/weights/schema separate receiver-side shared cost, not free communication compression.","numeric_modes":"0=clean;1..6=one axis +/-1/12;7..12=one axis +/-1/6;13..18=one axis +/-1/4. Apply numeric perturbation after dequantization, no corruption of source ID. Numeric modes do not apply to binary codes.","bit_modes":"RM: exhaustive all8 one-bit and all28 two-bit corruptions per input; packed4: all4 one-bit and all6 two-bit corruptions per input; flip only semantic payload, not zero padding. Numeric channels do not claim ECC from numeric noise tests."}, + "metrics":"Per variant/seed/split/budget/mode: full-fit correct/16, heldout correct/8, accepted-correct, abstention/refusal, undetected wrong, exact wire bits, clean min pair squared distance and composition residual. Aggregate only after preserving each seed. All16 inputs are evaluated; training membership recorded independently.", + "hypotheses":{"exact":"16 distinct, min Euclidean distance1/3, nearest decoding for total norm<1/6 (strict; tie at boundary not guaranteed)","rm":"16 codewords,8bits,min Hamming4,128/128 single flips recover,448/448 double flips detected by radius1 refusal","additive":"composition residual<=1e-12 on finite f64 values; separation term does not by itself prove global injectivity or learned receiver generalization"}, + "thresholds":{"exact":"clean all16 at every budget, all six1/12 axis modes correct at96/192bit; 1/6 boundary and1/4 descriptive only; report low-budget quantization plus noise separately","rm":"all16 clean;128/128single flips accepted-correct;448/448double flips refused; invalid length/value atomic refusal","additive":"all three seeds achieve16/16 fullfit and8/8 heldout on BOTH fresh splits at192bits; improve over existing learned on heldout accepted-correct without raising undetected wrong; otherwise NOT_SUPPORTED","baseline":"descriptive, no superiority threshold","overall":"Exact/discrete constructions can repair synthetic recoverability without establishing learned neural communication advantage. No claim of useful compression unless matched-bit results support it."}, + "checker":"Extend NL6 using separate native Omega scorer with independent input-bit/codeword formulas; score every variant separately, derive membership from frozen lists. Mutants must challenge exact mapping/nearest tie, RM distance/radius, additive composition/separation, baseline decode and wire budget/length/finite checks. Mutant survival is FAIL, never excluded.", + "output_contract":"CSV N,seed,split,arm,id,budget,mode,pred,status,payload_bits; status0=accepted,1=abstained/refused; pred0..15 or99. IEEE carrier dumps and parameter snapshots in separate evidence. RM modes100..107 singleflip,200+8*i+j for i regular.csv, then nl7-score < regular.csv. For each source mutant require replace occurs exactly once. Record actual statuses and stdout; recipe predictions are not PASS receipts." +} diff --git a/native/neuralese/fixtures/nl7-duplicate_guard_removed.from b/native/neuralese/fixtures/nl7-duplicate_guard_removed.from new file mode 100644 index 0000000..0935568 --- /dev/null +++ b/native/neuralese/fixtures/nl7-duplicate_guard_removed.from @@ -0,0 +1,3 @@ +if ne and get Seen idx bit 0 +invalid +end diff --git a/native/neuralese/fixtures/nl7-duplicate_guard_removed.to b/native/neuralese/fixtures/nl7-duplicate_guard_removed.to new file mode 100644 index 0000000..a541ced --- /dev/null +++ b/native/neuralese/fixtures/nl7-duplicate_guard_removed.to @@ -0,0 +1 @@ +note MUTANT duplicate guard removed diff --git a/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.from b/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.from new file mode 100644 index 0000000..1a5e61e --- /dev/null +++ b/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.from @@ -0,0 +1,3 @@ +if and ge get Row 4 96 le mode 6 +must = true +end diff --git a/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.to b/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.to new file mode 100644 index 0000000..7e18c23 --- /dev/null +++ b/native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.to @@ -0,0 +1 @@ +note MUTANT exact high-precision small-noise guarantee removed diff --git a/native/neuralese/fixtures/nl7-fixture.om b/native/neuralese/fixtures/nl7-fixture.om new file mode 100644 index 0000000..4c703cf --- /dev/null +++ b/native/neuralese/fixtures/nl7-fixture.om @@ -0,0 +1,203 @@ +om2 +note Native synthetic scorer fixtures. Argument 0 valid,1 parse,2 truncated,3 duplicate, +note 4 payload,5 split membership probe,6 RM double accepted,7 exact mandatory wrong, +note 8 invalid mode,9 refusal with non-sentinel prediction. No candidate learning code. +global Case ulong 1 +text COMMA "," +text LF "\n" +text TAG "N," +text BADSEED "0101" +text DIAG "D,nl7 public fixture\nP,not scoring evidence\n" +fn putout a view uchar * n ulong to void +p = ulong 0 +while lt p n +k = write 1 a p sub n p +if le k 0 +exit 93 +end +p = add p ulong k +end +end +fn number n ulong to void +b = new uchar 20 0 +p = ulong 20 +while true bound 20 +p = sub p 1 +put b p uchar add rem n 10 48 +n = div n 10 +if eq n 0 +break +end +end +putout part b p sub ulong 20 p sub ulong 20 p +end +fn flag v bool to ulong +if v +ret 1 +end +ret 0 +end +fn sep to void +putout COMMA 1 +end +fn validmode arm ulong mode ulong to bool +if or eq arm 0 or eq arm 2 eq arm 3 +ret le mode 18 +end +if eq mode 0 +ret true +end +n = ulong 8 +if eq arm 4 +n = 4 +end +if and ge mode 100 lt mode add 100 n +ret true +end +if lt mode 200 +ret false +end +i = div sub mode 200 8 +j = rem sub mode 200 8 +ret and lt i j lt j n +end +fn seedvalue si ulong to ulong +if eq si 0 +ret 101 +end +if eq si 1 +ret 211 +end +ret 307 +end +fn budvalue bi ulong to ulong +if eq bi 0 +ret 8 +end +if eq bi 1 +ret 24 +end +if eq bi 2 +ret 96 +end +ret 192 +end +fn prediction arm ulong id ulong mode ulong split ulong to ulong +if or eq arm 2 eq arm 3 +if and eq get Case 0 5 and eq arm 2 eq mode 0 +if or and eq split 1 eq id 6 and eq split 2 eq id 3 +ret id +end +end +ret 99 +end +if and eq arm 1 ge mode 200 +ret 99 +end +if and eq arm 4 ne mode 0 +if lt mode 200 +ret xor id shl ulong 1 sub mode 100 +end +i = div sub mode 200 8 +j = rem sub mode 200 8 +ret xor xor id shl ulong 1 i shl ulong 1 j +end +ret id +end +fn payloadbits arm ulong budget ulong to ulong +if eq arm 1 +ret 8 +end +if eq arm 4 +ret 4 +end +if eq budget 8 +ret 6 +end +ret budget +end +fn emitrec base ulong id ulong mode ulong pred ulong status ulong to void +arm = rem div base 4 5 +budget = budvalue rem base 4 +putout TAG len TAG +if and eq get Case 0 1 eq base 0 +putout BADSEED len BADSEED +else +number seedvalue div base 60 +end +sep +number rem div base 20 3 +sep +number arm +sep +number id +sep +number budget +sep +if and eq get Case 0 8 eq base 0 +number 19 +else +number mode +end +sep +number pred +sep +number status +sep +if and eq get Case 0 4 eq base 0 +number 7 +else +number payloadbits arm budget +end +putout LF 1 +end +fn record base ulong id ulong mode ulong to void +if and eq get Case 0 2 and eq base 179 and eq id 15 eq mode 219 +ret +end +arm = rem div base 4 5 +pred = prediction arm id mode rem div base 20 3 +status = flag eq pred 99 +if and eq get Case 0 6 and eq arm 1 eq mode 201 +pred = id +status = 0 +end +if and eq get Case 0 7 and eq base 3 and eq id 0 eq mode 1 +pred = 1 +end +if and eq get Case 0 9 and eq arm 2 eq mode 0 +pred = 0 +status = 1 +end +emitrec base id mode pred status +end +fn main to int +arg = new uchar 1 0 +if ne argcnt 2 +ret 90 +end +k = argread 1 arg 0 1 +if ne k 1 +ret 90 +end +c = get arg 0 +if or lt c 48 gt c 57 +ret 90 +end +put Case 0 ulong sub c 48 +putout DIAG len DIAG +for base ulong 180 +arm = rem div base 4 5 +for mode ulong 256 +if validmode arm mode +for id ulong 16 +record base id mode +if and eq get Case 0 3 and eq base 0 and eq id 0 eq mode 0 +record base id mode +end +end +end +end +end +ret 0 +end diff --git a/native/neuralese/fixtures/nl7-packed_source_id_oracle.from b/native/neuralese/fixtures/nl7-packed_source_id_oracle.from new file mode 100644 index 0000000..cb41347 --- /dev/null +++ b/native/neuralese/fixtures/nl7-packed_source_id_oracle.from @@ -0,0 +1 @@ +expected = corrupt id mode diff --git a/native/neuralese/fixtures/nl7-packed_source_id_oracle.to b/native/neuralese/fixtures/nl7-packed_source_id_oracle.to new file mode 100644 index 0000000..433e73f --- /dev/null +++ b/native/neuralese/fixtures/nl7-packed_source_id_oracle.to @@ -0,0 +1 @@ +expected = id diff --git a/native/neuralese/fixtures/nl7-payload_guard_removed.from b/native/neuralese/fixtures/nl7-payload_guard_removed.from new file mode 100644 index 0000000..5ab39c7 --- /dev/null +++ b/native/neuralese/fixtures/nl7-payload_guard_removed.from @@ -0,0 +1,3 @@ +if or ne get Row 8 payload gt get Row 8 get Row 4 +invalid +end diff --git a/native/neuralese/fixtures/nl7-payload_guard_removed.to b/native/neuralese/fixtures/nl7-payload_guard_removed.to new file mode 100644 index 0000000..579820d --- /dev/null +++ b/native/neuralese/fixtures/nl7-payload_guard_removed.to @@ -0,0 +1 @@ +note MUTANT payload budget guard removed diff --git a/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.from b/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.from new file mode 100644 index 0000000..0444f81 --- /dev/null +++ b/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.from @@ -0,0 +1,6 @@ +if ne pred expected +violation +end +if ne status flag eq expected 99 +violation +end diff --git a/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.to b/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.to new file mode 100644 index 0000000..93189b3 --- /dev/null +++ b/native/neuralese/fixtures/nl7-rm_expectation_guard_removed.to @@ -0,0 +1 @@ +note MUTANT RM expected decoding guards removed diff --git a/native/neuralese/fixtures/nl7-rm_radius_zero.from b/native/neuralese/fixtures/nl7-rm_radius_zero.from new file mode 100644 index 0000000..59929d2 --- /dev/null +++ b/native/neuralese/fixtures/nl7-rm_radius_zero.from @@ -0,0 +1 @@ +if le hamming word codeword cand 1 diff --git a/native/neuralese/fixtures/nl7-rm_radius_zero.to b/native/neuralese/fixtures/nl7-rm_radius_zero.to new file mode 100644 index 0000000..28f600d --- /dev/null +++ b/native/neuralese/fixtures/nl7-rm_radius_zero.to @@ -0,0 +1 @@ +if le hamming word codeword cand 0 diff --git a/native/neuralese/fixtures/nl7-score.cases b/native/neuralese/fixtures/nl7-score.cases new file mode 100644 index 0000000..f01ea13 --- /dev/null +++ b/native/neuralese/fixtures/nl7-score.cases @@ -0,0 +1,32 @@ +# NL7 native scorer qualification. Parent supplies observed input/output corpus. +# Run from scratch with native/ symlink plus inputs/ and expected/ directories. +# KILL compares mutant stdout against ORIGINAL scorer stdout for the same fixture. +deadline 20 +nl7-case-0 run native/neuralese/nl7-score.om file:inputs/nl7-case-0.csv file:expected/nl7-case-0.score - 0 +nl7-case-1 run native/neuralese/nl7-score.om file:inputs/nl7-case-1.csv file:expected/nl7-case-1.score - 90 +nl7-case-2 run native/neuralese/nl7-score.om file:inputs/nl7-case-2.csv file:expected/nl7-case-2.score - 90 +nl7-case-3 run native/neuralese/nl7-score.om file:inputs/nl7-case-3.csv file:expected/nl7-case-3.score - 90 +nl7-case-4 run native/neuralese/nl7-score.om file:inputs/nl7-case-4.csv file:expected/nl7-case-4.score - 90 +nl7-case-5 run native/neuralese/nl7-score.om file:inputs/nl7-case-5.csv file:expected/nl7-case-5.score - 0 +nl7-case-6 run native/neuralese/nl7-score.om file:inputs/nl7-case-6.csv file:expected/nl7-case-6.score - 1 +nl7-case-7 run native/neuralese/nl7-score.om file:inputs/nl7-case-7.csv file:expected/nl7-case-7.score - 1 +nl7-case-8 run native/neuralese/nl7-score.om file:inputs/nl7-case-8.csv file:expected/nl7-case-8.score - 90 +nl7-case-9 run native/neuralese/nl7-score.om file:inputs/nl7-case-9.csv file:expected/nl7-case-9.score - 90 +subst native/neuralese/fixtures/nl7-canonical_parse_removed.from native/neuralese/fixtures/nl7-canonical_parse_removed.to +nl7-kill-canonical_parse_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-1.csv file:expected/nl7-case-1.score - 0 +subst native/neuralese/fixtures/nl7-completeness_removed.from native/neuralese/fixtures/nl7-completeness_removed.to +nl7-kill-completeness_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-2.csv file:expected/nl7-case-2.score - 0 +subst native/neuralese/fixtures/nl7-duplicate_guard_removed.from native/neuralese/fixtures/nl7-duplicate_guard_removed.to +nl7-kill-duplicate_guard_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-3.csv file:expected/nl7-case-3.score - 0 +subst native/neuralese/fixtures/nl7-payload_guard_removed.from native/neuralese/fixtures/nl7-payload_guard_removed.to +nl7-kill-payload_guard_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-4.csv file:expected/nl7-case-4.score - 0 +subst native/neuralese/fixtures/nl7-split1_membership_wrong.from native/neuralese/fixtures/nl7-split1_membership_wrong.to +nl7-kill-split1_membership_wrong kill native/neuralese/nl7-score.om file:inputs/nl7-case-5.csv file:expected/nl7-case-5.score - 0 +subst native/neuralese/fixtures/nl7-rm_radius_zero.from native/neuralese/fixtures/nl7-rm_radius_zero.to +nl7-kill-rm_radius_zero kill native/neuralese/nl7-score.om file:inputs/nl7-case-0.csv file:expected/nl7-case-0.score - 1 +subst native/neuralese/fixtures/nl7-rm_expectation_guard_removed.from native/neuralese/fixtures/nl7-rm_expectation_guard_removed.to +nl7-kill-rm_expectation_guard_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-6.csv file:expected/nl7-case-6.score - 0 +subst native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.from native/neuralese/fixtures/nl7-exact_mandatory_noise_removed.to +nl7-kill-exact_mandatory_noise_removed kill native/neuralese/nl7-score.om file:inputs/nl7-case-7.csv file:expected/nl7-case-7.score - 0 +subst native/neuralese/fixtures/nl7-packed_source_id_oracle.from native/neuralese/fixtures/nl7-packed_source_id_oracle.to +nl7-kill-packed_source_id_oracle kill native/neuralese/nl7-score.om file:inputs/nl7-case-0.csv file:expected/nl7-case-0.score - 1 diff --git a/native/neuralese/fixtures/nl7-split1_membership_wrong.from b/native/neuralese/fixtures/nl7-split1_membership_wrong.from new file mode 100644 index 0000000..e468e64 --- /dev/null +++ b/native/neuralese/fixtures/nl7-split1_membership_wrong.from @@ -0,0 +1 @@ +if or eq id 3 or eq id 5 eq id 9 diff --git a/native/neuralese/fixtures/nl7-split1_membership_wrong.to b/native/neuralese/fixtures/nl7-split1_membership_wrong.to new file mode 100644 index 0000000..d1d20f1 --- /dev/null +++ b/native/neuralese/fixtures/nl7-split1_membership_wrong.to @@ -0,0 +1 @@ +if or eq id 6 or eq id 5 eq id 9 diff --git a/native/neuralese/fixtures/nl7-wire-carrier_decode.from b/native/neuralese/fixtures/nl7-wire-carrier_decode.from new file mode 100644 index 0000000..f5d0e7d --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-carrier_decode.from @@ -0,0 +1 @@ +ret sub mul div f64 u f64 levels 8.0f64 4.0f64 diff --git a/native/neuralese/fixtures/nl7-wire-carrier_decode.to b/native/neuralese/fixtures/nl7-wire-carrier_decode.to new file mode 100644 index 0000000..5023fb5 --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-carrier_decode.to @@ -0,0 +1 @@ +ret neg sub mul div f64 u f64 levels 8.0f64 4.0f64 diff --git a/native/neuralese/fixtures/nl7-wire-controls.json b/native/neuralese/fixtures/nl7-wire-controls.json new file mode 100644 index 0000000..e2a4527 --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-controls.json @@ -0,0 +1,29 @@ +{ + "schema": "nl7-wire-controls/1", + "scope": "HOST_SYNTHETIC_LEARNED_RECEIVER_REPLAY_ONLY", + "source": "native/neuralese/nl7-wire.om", + "input": "inputs/nl7-real.csv", + "original_stdout": "expected/nl7-wire.out", + "original_expected_exit": 0, + "refusal_limit": "Producer encode refusal rc1/2 is counted as refused and must match N pred99/status1; this checker cannot establish sender overflow causality from a refused stale carrier. Successful rc0 paths are replayed from bytes without source ID.", + "source_mutants": [ + { + "name": "receiver_weights", + "replace": "weight = get Params add base add 15 add mul k 4 j", + "with": "weight = get Params add base add 16 add mul k 4 j", + "mutant_expected_exit": 1 + }, + { + "name": "carrier_decode", + "replace": "ret sub mul div f64 u f64 levels 8.0f64 4.0f64", + "with": "ret neg sub mul div f64 u f64 levels 8.0f64 4.0f64", + "mutant_expected_exit": 1 + }, + { + "name": "receiver_threshold", + "replace": "if ge score 0.5f64", + "with": "if ge score 1.0f64", + "mutant_expected_exit": 1 + } + ] +} diff --git a/native/neuralese/fixtures/nl7-wire-receiver_threshold.from b/native/neuralese/fixtures/nl7-wire-receiver_threshold.from new file mode 100644 index 0000000..ccecfab --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-receiver_threshold.from @@ -0,0 +1 @@ +if ge score 0.5f64 diff --git a/native/neuralese/fixtures/nl7-wire-receiver_threshold.to b/native/neuralese/fixtures/nl7-wire-receiver_threshold.to new file mode 100644 index 0000000..f88101f --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-receiver_threshold.to @@ -0,0 +1 @@ +if ge score 1.0f64 diff --git a/native/neuralese/fixtures/nl7-wire-receiver_weights.from b/native/neuralese/fixtures/nl7-wire-receiver_weights.from new file mode 100644 index 0000000..18165c0 --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-receiver_weights.from @@ -0,0 +1 @@ +weight = get Params add base add 15 add mul k 4 j diff --git a/native/neuralese/fixtures/nl7-wire-receiver_weights.to b/native/neuralese/fixtures/nl7-wire-receiver_weights.to new file mode 100644 index 0000000..621553c --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire-receiver_weights.to @@ -0,0 +1 @@ +weight = get Params add base add 16 add mul k 4 j diff --git a/native/neuralese/fixtures/nl7-wire.cases b/native/neuralese/fixtures/nl7-wire.cases new file mode 100644 index 0000000..465b769 --- /dev/null +++ b/native/neuralese/fixtures/nl7-wire.cases @@ -0,0 +1,9 @@ +# Native NL7 learned wire replay and independent receiver mutants. +deadline 20 +nl7-wire-real run native/neuralese/nl7-wire.om file:inputs/nl7-real.csv file:expected/nl7-wire.out - 0 +subst native/neuralese/fixtures/nl7-wire-receiver_weights.from native/neuralese/fixtures/nl7-wire-receiver_weights.to +nl7-wire-kill-receiver_weights kill native/neuralese/nl7-wire.om file:inputs/nl7-real.csv file:expected/nl7-wire.out - 1 +subst native/neuralese/fixtures/nl7-wire-carrier_decode.from native/neuralese/fixtures/nl7-wire-carrier_decode.to +nl7-wire-kill-carrier_decode kill native/neuralese/nl7-wire.om file:inputs/nl7-real.csv file:expected/nl7-wire.out - 1 +subst native/neuralese/fixtures/nl7-wire-receiver_threshold.from native/neuralese/fixtures/nl7-wire-receiver_threshold.to +nl7-wire-kill-receiver_threshold kill native/neuralese/nl7-wire.om file:inputs/nl7-real.csv file:expected/nl7-wire.out - 1 diff --git a/native/neuralese/nl1r/.crumb b/native/neuralese/nl1r/.crumb index 2ad2ed1..9324c09 100644 --- a/native/neuralese/nl1r/.crumb +++ b/native/neuralese/nl1r/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-30T03:16:45Z", + "compiled_at": "2026-10-30T12:24:36Z", "compiler": "crumb-compile/1", - "digest": "sha256:01205ae3d4cd1efb7b582327930cd9d97c27b8c3dc83172225a4a2f4461b3760", + "digest": "sha256:ca3619a0eb3aa23e9aa178cbc7e147a8f8a6717d00d175bd7ed0cb0750d73f58", "evidence_files": 1362, - "evidence_root": "sha256:a250df0bf0dbf481d048a21e459cd8bdb4509c242fd7978fe95a4bedfefbdfd6", + "evidence_root": "sha256:b34fb847357649aa1d669b0777089299d6123f95c292511fe7709d29fa30d6ee", "files": 1443, - "generated_at_commit": "463123e6aeb77b0ec269f479941310921e6521ff", - "source_tree": "sha256:40be31687024d066480f6203c4e3bcfa1b1bc115b01a0e3dc5d2d175f32335a4" + "generated_at_commit": "43a199b3a3f665a4b292722a78b322386fbeb2a8", + "source_tree": "sha256:1ce009e67c38c8ce3a42e45c7ac245ea5d7a57d0ec51a8b1a808b753928608dc" } }, "invariants": [ diff --git a/native/neuralese/nl7-checker-mutants.log b/native/neuralese/nl7-checker-mutants.log new file mode 100644 index 0000000..bbe20f9 --- /dev/null +++ b/native/neuralese/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/nl7-independent.json b/native/neuralese/nl7-independent.json new file mode 100644 index 0000000..17ac7dc --- /dev/null +++ b/native/neuralese/nl7-independent.json @@ -0,0 +1,13 @@ +{ + "schema":"neuralese-nl7-independent/1", + "prereg":"989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3", + "freeze_board_utc":"2026-10-28T15:21:18Z", + "producer":{"repo":"aien-dev/aien-train","revision":"a16125d679d60fc6e1d97f16f087fab886bd7543","draft_pr":37,"raw":"native/neuralese/evidence/nl7-stream.csv.gz","raw_uncompressed_sha256":"a70bc35dd78293ac6db2a4eeb8e760c4e0aa0bd3489478e3175c07c6ce287b9e","raw_compressed_sha256":"2a59cc4fe1e81b98a15b8cfeba54e4fad44482d72f3b37fb782e93b325c731d3","raw_lines":82944,"receipts":"native/neuralese/evidence/nl7-run.json"}, + "compiler":{"sha256":"d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84","source_introduction":"omega-mv@1fe5976d398646b17acabbf6d9dfae96b017e439","protocol":"stdin source -> stdout ELF"}, + "score":{"source":"nl7-score.om","source_sha256":"12b8c25ed03fb226165270491948d9aa1e9301385d30025169043a7709432e0c","binary_sha256":"ab0eb72743bdffd63ebaf9d995787ddd0aa503510c1455b9634bb4b9bd45ee34","compile_exit":0,"run_exit":0,"stdout":"nl7-score.csv.gz","stdout_uncompressed_sha256":"c3efce37f925881cfa63f4eeefd795e2207a5c6ba69fddf9d5f3218547863088","result":"NL7 CHECKS PASS; NL7 LEARNED NOT_SUPPORTED","qualification_log":"nl7-checker-mutants.log","qualification_cases":19,"mutants_killed":9}, + "wire":{"source":"nl7-wire.om","source_sha256":"4d4791f477848eacac422598dee2b5d7851d92143de622c5183f7f2a6a55b4da","binary_sha256":"296f2e94b9525de38a705b1a86edb9d030b74063a12837da4d6623af5f98471c","compile_exit":0,"run_exit":0,"stdout":"NL7WIRE PASS frames=21888 refused=3764","qualification_log":"nl7-wire-mutants.log","qualification_cases":4,"mutants_killed":3,"independence":"Independent byte unpacking, dequantization, perturbation, IEEE coordinate comparison, learned receiver and decision arithmetic; no truth ID enters receiver. Parameter completeness and learned tuple completeness required.","limitation":"Producer refusal is checked as99/status1, but stale refused carrier bytes do not independently prove sender-overflow causality."}, + "commands":["$OMC < native/neuralese/nl7-score.om > $WORK/nl7-score","$OMC < native/neuralese/nl7-wire.om > $WORK/nl7-wire","$OMC < native/neuralese/fixtures/nl7-fixture.om > $WORK/nl7-fixture","chmod +x $WORK/nl7-score $WORK/nl7-wire $WORK/nl7-fixture","$WORK/nl7-score < $WORK/all.csv > $WORK/score.csv","$WORK/nl7-wire < $WORK/all.csv > $WORK/wire.out","cd $REPLAY # contains native, seed, compiled gate; conductor reads inputs/ and expected/ here","mkdir inputs expected","for M in 0 1 2 3 4 5 6 7 8 9; do $WORK/nl7-fixture $M > inputs/nl7-case-$M.csv; $WORK/nl7-score < inputs/nl7-case-$M.csv > expected/nl7-case-$M.score; done","cp $WORK/all.csv inputs/nl7-real.csv","cp $WORK/wire.out expected/nl7-wire.out","$GATE $OMC d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-score.cases $NEW_SCORE_SCRATCH","$GATE $OMC d6290c7663c2b4bafb59eb3fdf812476e977f4c144def71095c6248ef9b96b84 native/neuralese/fixtures/nl7-wire.cases $NEW_WIRE_SCRATCH"], + "qualification_scope":"HOST_SYNTHETIC_CHECKER_ONLY. Algorithmic independence, not model/vendor independence or a blinded campaign. All variants scored independently under frozen membership/budgets. The existing NL6 and NL1 campaigns are unchanged.", + "mathematics":"Wolfram exact/RM/derivative/transport/composition receipts are in the pinned producer evidence directory. All claimed values confirmed, with strictness correction at exact radius1/6. No JL/real-activation experiment run.", + "verdict":"Exact and RM synthetic guarantees exercised. Additive learned hypothesis NOT_SUPPORTED despite high-precision improvement over existing learned on fresh splits. No learned advantage, useful compression, GPU, real models, authority or deployment claimed. NL6 (#56) has landed. No Omega compiler/language/host word/bridge/harness policy change; guide update not applicable." +} diff --git a/native/neuralese/nl7-score.csv.gz b/native/neuralese/nl7-score.csv.gz new file mode 100644 index 0000000..220afdb Binary files /dev/null and b/native/neuralese/nl7-score.csv.gz differ diff --git a/native/neuralese/nl7-score.om b/native/neuralese/nl7-score.om new file mode 100644 index 0000000..921e6cc --- /dev/null +++ b/native/neuralese/nl7-score.om @@ -0,0 +1,526 @@ +om2 +note NL7 independent scorer, frozen prereg benchmarks 989fb7a214d8e0d6c7ed04f5f48c45d68a43d5a3. +note Synthetic host evidence only. CSV predictions are scored, not used as truth or codewords. +note D, and P, printable bounded diagnostics are explicitly non-scoring records. +const CHUNK ulong 16384 +global Buf uchar CHUNK +global Io ulong 2 +global Row ulong 9 +global Seen ulong 65536 +global Count ulong 131072 +global Good ulong 131072 +global Refuse ulong 131072 +global Robust ulong 360 +global Rgood ulong 360 +global Rrefuse ulong 360 +global Failed ulong 1 +text BAD "NL7 INVALID\n" +text PASS "NL7 CHECKS PASS\n" +text FAIL "NL7 CHECKS FAIL\n" +text HEAD "NL7SCORE1,seed,split,arm,budget,mode,scope,total,correct,refused,undetected\n" +text TAG "S," +text RTAG "R," +text LTAG "L," +text LHEAD "NL7LEARN1,seed,split,fullfit,heldout,improves,no_more_undetected\n" +text YES "NL7 LEARNED SUPPORTED\n" +text NO "NL7 LEARNED NOT_SUPPORTED\n" +text COMMA "," +text LF "\n" +fn putout a view uchar * n ulong to void +p = ulong 0 +while lt p n +k = write 1 a p sub n p +if le k 0 +exit 93 +end +p = add p ulong k +end +end +fn invalid to void +putout BAD len BAD +exit 90 +end +fn number n ulong to void +b = new uchar 20 0 +p = ulong 20 +while true bound 20 +p = sub p 1 +put b p uchar add rem n 10 48 +n = div n 10 +if eq n 0 +break +end +end +putout part b p sub ulong 20 p sub ulong 20 p +end +fn flag v bool to ulong +if v +ret 1 +end +ret 0 +end +fn sep to void +putout COMMA 1 +end +fn next to long +if eq get Io 0 get Io 1 +k = read 0 Buf 0 CHUNK +if lt k 0 +invalid +end +if eq k 0 +ret -1 +end +put Io 0 0 +put Io 1 ulong k +end +p = get Io 0 +put Io 0 add p 1 +ret long get Buf p +end +fn value delim long to ulong +v = ulong 0 +n = ulong 0 +first = long -1 +while true bound 8 +c = next +if eq c delim +if eq n 0 +invalid +end +if and gt n 1 eq first 48 +invalid +end +ret v +end +if or lt c 48 gt c 57 +invalid +end +if eq n 0 +first = c +end +if gt n 5 +invalid +end +v = add mul v 10 ulong sub c 48 +n = add n 1 +end +ret 0 +end +fn seedindex seed ulong to ulong +if eq seed 101 +ret 0 +end +if eq seed 211 +ret 1 +end +if eq seed 307 +ret 2 +end +invalid +ret 0 +end +fn seedvalue si ulong to ulong +if eq si 0 +ret 101 +end +if eq si 1 +ret 211 +end +ret 307 +end +fn budindex budget ulong to ulong +if eq budget 8 +ret 0 +end +if eq budget 24 +ret 1 +end +if eq budget 96 +ret 2 +end +if eq budget 192 +ret 3 +end +invalid +ret 0 +end +fn budvalue bi ulong to ulong +if eq bi 0 +ret 8 +end +if eq bi 1 +ret 24 +end +if eq bi 2 +ret 96 +end +ret 192 +end +fn group si ulong split ulong arm ulong bi ulong to ulong +ret add mul add mul add mul si 3 split 5 arm 4 bi +end +fn heldout split ulong id ulong to bool +if eq split 0 +ret false +end +if or eq id 0 or eq id 1 or eq id 2 or eq id 4 eq id 8 +ret false +end +if eq split 1 +if or eq id 3 or eq id 5 eq id 9 +ret false +end +else +if or eq id 6 or eq id 10 eq id 12 +ret false +end +end +ret true +end +fn validmode arm ulong mode ulong to bool +if or eq arm 0 or eq arm 2 eq arm 3 +ret le mode 18 +end +if eq mode 0 +ret true +end +n = ulong 8 +if eq arm 4 +n = 4 +end +if and ge mode 100 lt mode add 100 n +ret true +end +if lt mode 200 +ret false +end +i = div sub mode 200 8 +j = rem sub mode 200 8 +ret and lt i j lt j n +end +note Independent RM codeword from four coefficient bits and eight evaluation triples. +fn codeword id ulong to ulong +word = ulong 0 +for t ulong 8 +bit = and id 1 +for k ulong 3 +coef = and shr id add k 1 1 +coord = and shr t k 1 +bit = xor bit and coef coord +end +word = or word shl bit t +end +ret word +end +fn corrupt word ulong mode ulong to ulong +if eq mode 0 +ret word +end +if lt mode 200 +ret xor word shl ulong 1 sub mode 100 +end +i = div sub mode 200 8 +j = rem sub mode 200 8 +ret xor xor word shl ulong 1 i shl ulong 1 j +end +fn hamming a ulong b ulong to ulong +v = xor a b +d = ulong 0 +for k ulong 8 +d = add d and shr v k 1 +end +ret d +end +fn rmdecode word ulong to ulong +found = ulong 99 +for cand ulong 16 +if le hamming word codeword cand 1 +if ne found 99 +ret 99 +end +found = cand +end +end +ret found +end +fn violation to void +put Failed 0 add get Failed 0 1 +end +fn guarantees to void +arm = get Row 2 +id = get Row 3 +mode = get Row 5 +pred = get Row 6 +status = get Row 7 +if eq arm 0 +must = eq mode 0 +if and ge get Row 4 96 le mode 6 +must = true +end +if and must or ne status 0 ne pred id +violation +end +end +if eq arm 1 +expected = rmdecode corrupt codeword id mode +if ne pred expected +violation +end +if ne status flag eq expected 99 +violation +end +end +if eq arm 4 +expected = corrupt id mode +if or ne status 0 ne pred expected +violation +end +end +end +fn increment idx ulong good bool refused bool to void +put Count idx add get Count idx 1 +if good +put Good idx add get Good idx 1 +end +if refused +put Refuse idx add get Refuse idx 1 +end +end +fn rincrement idx ulong good bool refused bool to void +put Robust idx add get Robust idx 1 +if good +put Rgood idx add get Rgood idx 1 +end +if refused +put Rrefuse idx add get Rrefuse idx 1 +end +end +fn grade base ulong to void +id = get Row 3 +mode = get Row 5 +idx = add mul base 256 mode +bit = shl ulong 1 id +if ne and get Seen idx bit 0 +invalid +end +put Seen idx or get Seen idx bit +correct = and eq get Row 7 0 eq get Row 6 id +refused = eq get Row 7 1 +increment mul idx 2 correct refused +if ne mode 0 +rincrement mul base 2 correct refused +end +if heldout get Row 1 id +increment add mul idx 2 1 correct refused +if ne mode 0 +rincrement add mul base 2 1 correct refused +end +end +guarantees +end +fn row to void +for j ulong 9 +d = long 44 +if eq j 8 +d = 10 +end +put Row j value d +end +si = seedindex get Row 0 +bi = budindex get Row 4 +if or gt get Row 1 2 or gt get Row 2 4 gt get Row 3 15 +invalid +end +if not validmode get Row 2 get Row 5 +invalid +end +if gt get Row 7 1 +invalid +end +if eq get Row 7 0 +if gt get Row 6 15 +invalid +end +else +if ne get Row 6 99 +invalid +end +end +payload = get Row 4 +if eq payload 8 +payload = 6 +end +if eq get Row 2 1 +payload = 8 +end +if eq get Row 2 4 +payload = 4 +end +if or ne get Row 8 payload gt get Row 8 get Row 4 +invalid +end +grade group si get Row 1 get Row 2 bi +end +fn diagnostic to void +if ne next 44 +invalid +end +note Diagnostics are at most 8192 printable ASCII bytes followed by LF, never EOF. +while true bound 8193 +c = next +if eq c 10 +ret +end +if or lt c 32 gt c 126 +invalid +end +end +invalid +end +fn load to void +while true +c = next +if eq c -1 +break +end +if eq c 78 +if ne next 44 +invalid +end +row +else +if or eq c 68 eq c 80 +diagnostic +else +invalid +end +end +end +end +fn complete to void +for base ulong 180 +arm = rem div base 4 5 +for mode ulong 256 +if validmode arm mode +if ne get Seen add mul base 256 mode 65535 +invalid +end +end +end +end +end +fn counters idx ulong to void +number get Count idx +sep +number get Good idx +sep +number get Refuse idx +sep +number sub sub get Count idx get Good idx get Refuse idx +putout LF 1 +end +fn rcounters idx ulong to void +number get Robust idx +sep +number get Rgood idx +sep +number get Rrefuse idx +sep +number sub sub get Robust idx get Rgood idx get Rrefuse idx +putout LF 1 +end +fn identity base ulong to void +number seedvalue div base 60 +sep +number rem div base 20 3 +sep +number rem div base 4 5 +sep +number budvalue rem base 4 +sep +end +fn report to void +putout HEAD len HEAD +for base ulong 180 +arm = rem div base 4 5 +for mode ulong 256 +if validmode arm mode +for scope ulong 2 +putout TAG len TAG +identity base +number mode +sep +number scope +sep +counters add mul add mul base 256 mode 2 scope +end +end +end +for scope ulong 2 +putout RTAG len RTAG +identity base +number 99 +sep +number scope +sep +rcounters add mul base 2 scope +end +end +end +fn wrongcount idx ulong to ulong +ret sub sub get Count idx get Good idx get Refuse idx +end +fn learnedone si ulong sp ulong to bool +idx = add mul mul group si sp 2 3 256 2 1 +baseline = add mul mul group si sp 3 3 256 2 1 +fullfit = eq get Good mul mul group si 0 2 3 256 2 16 +held = eq get Good idx 8 +improve = gt get Good idx get Good baseline +safe = le wrongcount idx wrongcount baseline +putout LTAG len LTAG +number seedvalue si +sep +number sp +sep +number flag fullfit +sep +number flag held +sep +number flag improve +sep +number flag safe +putout LF 1 +ret and fullfit and held and improve safe +end +fn learned to void +putout LHEAD len LHEAD +support = true +for si ulong 3 +for split ulong 2 +if not learnedone si add split 1 +support = false +end +end +end +if support +putout YES len YES +else +putout NO len NO +end +end +fn main to int +if ne argcnt 1 +invalid +end +load +complete +report +learned +if ne get Failed 0 0 +putout FAIL len FAIL +ret 1 +end +putout PASS len PASS +ret 0 +end diff --git a/native/neuralese/nl7-wire-mutants.log b/native/neuralese/nl7-wire-mutants.log new file mode 100644 index 0000000..c15647d --- /dev/null +++ b/native/neuralese/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/nl7-wire.om b/native/neuralese/nl7-wire.om new file mode 100644 index 0000000..da56f34 --- /dev/null +++ b/native/neuralese/nl7-wire.om @@ -0,0 +1,439 @@ +om2 +note NL7 independent learned receiver replay, frozen prereg 989fb7a2. +note Reads parameter snapshots and actual byte carriers; truth ID never enters receiver. +note Run together with nl7-score: this checker qualifies learned wire causality, not learning. +const CHUNK ulong 16384 +global Buf uchar CHUNK +global Io ulong 2 +global Row ulong 64 +global Meta ulong 5 +global Last ulong 9 +global Params f64 558 +global Pmask ulong 18 +global Used ulong 18 +global Seen ulong 4096 +global Wire uchar 24 +global Coord f64 3 +global Counts ulong 4 +text BAD "NL7WIRE INVALID\n" +text PASS "NL7WIRE PASS frames=" +text FAIL "NL7WIRE FAIL frames=" +text REF " refused=" +text LF "\n" +fn putout a view uchar * n ulong to void +p = ulong 0 +while lt p n +k = write 1 a p sub n p +if le k 0 +exit 93 +end +p = add p ulong k +end +end +fn invalid to void +putout BAD len BAD +exit 90 +end +fn number n ulong to void +b = new uchar 20 0 +p = ulong 20 +while true bound 20 +p = sub p 1 +put b p uchar add rem n 10 48 +n = div n 10 +if eq n 0 +break +end +end +putout part b p sub ulong 20 p sub ulong 20 p +end +fn next to long +if eq get Io 0 get Io 1 +k = read 0 Buf 0 CHUNK +if lt k 0 +invalid +end +if eq k 0 +ret -1 +end +put Io 0 0 +put Io 1 ulong k +end +p = get Io 0 +put Io 0 add p 1 +ret long get Buf p +end +fn value to ulong +v = ulong 0 +n = ulong 0 +first = long -1 +while true bound 21 +c = next +if or eq c 44 eq c 10 +if eq n 0 +invalid +end +if and gt n 1 eq first 48 +invalid +end +put Meta 0 ulong c +ret v +end +if or lt c 48 gt c 57 +invalid +end +if eq n 0 +first = c +end +if or gt v 1844674407370955161 and eq v 1844674407370955161 gt c 53 +invalid +end +v = add mul v 10 ulong sub c 48 +n = add n 1 +end +ret 0 +end +fn fields to void +if ne next 44 +invalid +end +for j ulong 64 +put Row j value +if eq get Meta 0 10 +put Meta 1 add j 1 +ret +end +end +invalid +end +fn seedindex seed ulong to ulong +if eq seed 101 +ret 0 +end +if eq seed 211 +ret 1 +end +if eq seed 307 +ret 2 +end +invalid +ret 0 +end +fn bank to ulong +si = seedindex get Row 0 +if or gt get Row 1 2 or lt get Row 2 2 gt get Row 2 3 +invalid +end +ret add mul add mul si 3 get Row 1 2 sub get Row 2 2 +end +fn finite v f64 to bool +ret eq sub v v 0.0f64 +end +fn parameter to void +if or ne get Meta 1 5 ne get Meta 2 0 +invalid +end +ix = bank +p = get Row 3 +if or gt p 30 ne get Used ix 0 +invalid +end +bit = shl ulong 1 p +if ne and get Pmask ix bit 0 +invalid +end +v = bitcast f64 get Row 4 +if not finite v +invalid +end +put Params add mul ix 31 p v +put Pmask ix or get Pmask ix bit +end +fn budindex budget ulong to ulong +if eq budget 8 +ret 0 +end +if eq budget 24 +ret 1 +end +if eq budget 96 +ret 2 +end +if eq budget 192 +ret 3 +end +invalid +ret 0 +end +fn width 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 +ret 64 +end +fn prediction to void +if or ne get Meta 1 9 ne get Meta 2 0 +invalid +end +if gt get Row 2 4 +invalid +end +if and ne get Row 2 2 ne get Row 2 3 +ret +end +ix = bank +bi = budindex get Row 4 +if or gt get Row 3 15 gt get Row 5 18 +invalid +end +if ne get Pmask ix 2147483647 +invalid +end +payload = mul width get Row 4 3 +if or ne get Row 8 payload gt get Row 7 1 +invalid +end +if eq get Row 7 0 +if gt get Row 6 15 +invalid +end +else +if ne get Row 6 99 +invalid +end +end +slot = add mul add mul ix 4 bi 19 get Row 5 +bit = shl ulong 1 get Row 3 +if ne and get Seen slot bit 0 +invalid +end +put Seen slot or get Seen slot bit +put Used ix 1 +for j ulong 9 +put Last j get Row j +end +put Meta 2 1 +put Meta 3 ix +end +fn violate to void +put Counts 0 add get Counts 0 1 +end +fn wirebit pos ulong to ulong +byteval = ulong get Wire div pos 8 +shift = rem pos 8 +ret and shr byteval shift 1 +end +fn getbits axis ulong bits ulong to ulong +v = ulong 0 +start = mul axis bits +for b ulong bits +pos = add start b +bit = wirebit pos +v = or v shl bit b +end +ret v +end +fn coordinate axis ulong bits ulong to f64 +u = getbits axis bits +if le bits 8 +levels = sub shl ulong 1 bits 1 +ret sub mul div f64 u f64 levels 8.0f64 4.0f64 +end +if eq bits 32 +ret f64 bitcast f32 uint u +end +ret bitcast f64 u +end +fn perturb mode ulong to void +if eq mode 0 +ret +end +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 Coord axis add get Coord axis v +end +fn unpack to bool +budget = get Last 4 +if eq budget 8 +if ne and get Wire 0 uchar 192 uchar 0 +ret false +end +end +for k ulong 3 +v = coordinate k width budget +if not finite v +ret false +end +put Coord k v +end +perturb get Last 5 +for k ulong 3 +if not finite get Coord k +ret false +end +end +ret true +end +fn receive to ulong +base = mul get Meta 3 31 +pred = ulong 0 +for j ulong 4 +v = get Params add base add 27 j +for k ulong 3 +weight = get Params add base add 15 add mul k 4 j +v = add v mul get Coord k weight +end +score = mul 0.5f64 add 1.0f64 div v add 1.0f64 fabs v +if not and ge score 0.0f64 le score 1.0f64 +ret 99 +end +if lt fabs sub score 0.5f64 0.1f64 +ret 99 +end +if ge score 0.5f64 +pred = or pred shl ulong 1 j +end +end +ret pred +end +fn checkwire to void +n = div get Last 4 8 +if ne get Meta 1 add n 10 +invalid +end +for j ulong 6 +if ne get Row j get Last j +invalid +end +end +if gt get Row 6 2 +invalid +end +for j ulong n +v = get Row add j 7 +if gt v 255 +invalid +end +put Wire j uchar v +end +put Counts 1 add get Counts 1 1 +if ne get Row 6 0 +if or ne get Last 6 99 ne get Last 7 1 +violate +end +put Counts 2 add get Counts 2 1 +ret +end +if not unpack +violate +ret +end +for k ulong 3 +if ne bitcast ulong get Coord k get Row add add n 7 k +violate +end +end +pred = receive +if ne pred get Last 6 +violate +end +status = ulong 0 +if eq pred 99 +status = 1 +put Counts 2 add get Counts 2 1 +end +if ne status get Last 7 +violate +end +end +fn diagnostic to void +if eq get Meta 1 5 +if ne get Meta 2 0 +invalid +end +ix = bank +if ne get Pmask ix 2147483647 +invalid +end +ret +end +if ne get Meta 2 1 +invalid +end +checkwire +put Meta 2 0 +end +fn load to void +while true +c = next +if eq c -1 +break +end +if not or eq c 78 or eq c 80 eq c 68 +invalid +end +fields +if eq c 78 +prediction +end +if eq c 80 +parameter +end +if eq c 68 +diagnostic +end +end +end +fn complete to void +if ne get Meta 2 0 +invalid +end +for ix ulong 18 +if ne get Pmask ix 2147483647 +invalid +end +end +for base ulong 72 +for mode ulong 19 +if ne get Seen add mul base 19 mode 65535 +invalid +end +end +end +end +fn main to int +if ne argcnt 1 +invalid +end +load +complete +if eq get Counts 0 0 +putout PASS len PASS +else +putout FAIL len FAIL +end +number get Counts 1 +putout REF len REF +number get Counts 2 +putout LF 1 +if ne get Counts 0 0 +ret 1 +end +ret 0 +end diff --git a/native/neuralese/nl7-wire.stdout b/native/neuralese/nl7-wire.stdout new file mode 100644 index 0000000..42b6aa3 --- /dev/null +++ b/native/neuralese/nl7-wire.stdout @@ -0,0 +1 @@ +NL7WIRE PASS frames=21888 refused=3764