interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

GitHub aien-dev/omega-mv#34 (code only)

closed derived c12693cc24e8527e #34

Imported from GitHub aien-dev/omega-mv#34 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 1feb832ffb894ce754a82b0563f5f12a78003795 · Head 60683f1dabdb52b0aaf775ab65b0f76b7638fc89

Apply it

git checkout -b patch-c12693cc24e8527e 1feb832ffb894ce754a82b0563f5f12a78003795
curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/c12693cc24e8527e.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/omega-mv
34
60683f1dabdb52b0aaf775ab65b0f76b7638fc89
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":34,"url":"https://github.com/aien-dev/omega-mv/pull/34","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:24Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/Makefile b/Makefile
index dbbb665f8..6075d9eab 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,18 @@ SRCS = src/sha256.c src/omega_canonical.c src/omega_validate.c src/omega_core.c
 OBJS = $(patsubst %.c,$(OUT_DIR)/%.o,$(notdir $(SRCS)))
 TARGET = $(OUT_DIR)/omegatool
 
-.PHONY: all clean check-physics-lock test-m19 test test-m5 test-m6 test-m7 test-m8 test-m9 test-m10 test-m11 test-m12 test-m13 test-m14 test-m15 test-m17
+# Crumbline learner: a separate executable linked ONLY from learner-side code
+# (visible reader, Omega program/realize/verify stack, synthesis vocabulary,
+# OmegaLibrary, Crumbline search). It links no physics, no gate suites and no
+# sealed-side code; the sealed side lives in the crumbs crate.
+CL_SRCS = src/crumbline/cl_common.c src/crumbline/cl_crumb.c src/crumbline/cl_program.c src/crumbline/cl_search.c
+LEARNER_CORE = sha256 omega_canonical omega_validate omega_core omega_codec aarch64_encoder aarch64_decoder \
+	omega_realize omega_realize_synth omega_machine omega_exec omega_verify omega_program omega_synthesis omega_library
+LEARNER_OBJS = $(addprefix $(OUT_DIR)/,$(addsuffix .o,$(LEARNER_CORE))) \
+	$(patsubst src/crumbline/%.c,$(OUT_DIR)/crumbline/%.o,$(CL_SRCS)) $(OUT_DIR)/crumbline_learner.o
+LEARNER = $(OUT_DIR)/crumbline-learner
+
+.PHONY: all clean check-physics-lock crumbline-learner test-crumbline test-m19 test test-m5 test-m6 test-m7 test-m8 test-m9 test-m10 test-m11 test-m12 test-m13 test-m14 test-m15 test-m17
 
 all: $(TARGET)
 
@@ -59,6 +70,21 @@ $(OUT_DIR)/m16_native.o: $(PHYSICS_DIR)/m16/m16_native.c | $(OUT_DIR)
 $(OUT_DIR)/nvrm.o: $(PHYSICS_DIR)/nvrm/nvrm.c | $(OUT_DIR)
 	$(CC) $(CFLAGS) -c $< -o $@
 
+$(OUT_DIR)/crumbline/%.o: src/crumbline/%.c | $(OUT_DIR)
+	mkdir -p $(OUT_DIR)/crumbline
+	$(CC) $(CFLAGS) -c $< -o $@
+
+$(OUT_DIR)/crumbline_learner.o: tools/crumbline_learner.c | $(OUT_DIR)
+	$(CC) $(CFLAGS) -c $< -o $@
+
+crumbline-learner: $(LEARNER)
+
+test-crumbline: $(LEARNER)
+	./tests/crumbline/run_conformance.sh $(LEARNER) tests/crumbline/vectors
+
+$(LEARNER): $(LEARNER_OBJS)
+	$(CC) $(CFLAGS) -o $@ $(LEARNER_OBJS)
+
 $(OUT_DIR)/omegatool.o: tools/omegatool.c | $(OUT_DIR)
 	$(CC) $(CFLAGS) -c $< -o $@
 
diff --git a/spec/crumbline.md b/spec/crumbline.md
new file mode 100644
index 000000000..c158239f3
--- /dev/null
+++ b/spec/crumbline.md
@@ -0,0 +1,49 @@
+# Crumbline adapter (Omega as a Crumb v1 learner)
+
+Crumbline is the AIEN training curriculum of unlabeled input/output
+observations. Its contracts, generators, sealed verifier, mixer, trace schema,
+promotion ladder and ledger live in the `crumbs` crate
+(aien-dev/aien-sovereign-core, `crates/crumbs`, see its `SPEC.md`). This
+repository implements only the consumer adapter.
+
+## What Omega receives
+
+`build/crumbline-learner` is a separate executable. It speaks the crumbs
+learner protocol v1 on stdin/stdout and links only learner-side code:
+
+| Linked | Not linked |
+|---|---|
+| Crumb v1 visible reader (`src/crumbline/cl_crumb.c`) | any generator, sealed record, held-out set or label |
+| program / realize / verify stack, synthesis vocabulary | physics, NVRM, gate suites, evidence tooling |
+| OmegaLibrary + Crumbline search (`cl_program.c`, `cl_search.c`) | |
+
+Everything the learner can know arrives as protocol frames: visible crumb
+bytes, a one-byte verdict per submission, and admitted operations (a CPG1
+program, an opaque reference and a scope in bits).
+
+## Loop
+
+```text
+CRUMB (visible bytes)
+  -> cl_crumb_decode (strict; one input lane, one output lane supported)
+  -> bank = omega_synth_base_prim_defs() + OmegaLibrary entries whose scope covers the inputs
+  -> level-by-level composition search, observational-equivalence pruning
+     over visible inputs + 32 public probes
+  -> visible fit -> omega_program_verify (V0 + V2) + native vs reference differential
+  -> ambiguity scan (keep looking for behaviourally different rival fits)
+  -> SUBMIT as CPG1 -> sealed verifier -> VERDICT byte
+     reject: recorded as an event, search continues
+  -> no exact fit: best partial fit may be submitted as a robust guess
+ADMIT -> cl_library_admit: build, verify, omega_library_insert (receipt binds op_ref + program)
+```
+
+`omega_synthesize` is untouched: the M9 gates pin its enumeration order. The
+base vocabulary is shared through `omega_synth_base_prim_defs()`.
+
+## Tests
+
+`make test-crumbline` decodes the committed conformance vectors (one per
+registered crumbs family, generated by `crumbs vectors`), rejects malformed
+inputs, and checks that the learner binary carries no sealed-side symbols.
+The protocol, boundary and learning gates run from the crumbs side:
+`crumbs gates --learner build/crumbline-learner`.
diff --git a/src/crumbline/cl_common.c b/src/crumbline/cl_common.c
new file mode 100644
index 000000000..d1e3d10a5
--- /dev/null
+++ b/src/crumbline/cl_common.c
@@ -0,0 +1,135 @@
+#include "cl_common.h"
+#include "sha256.h"
+
+#include <string.h>
+
+void cl_w_init(ClWriter *w, uint8_t *buf, size_t cap) {
+    w->buf = buf;
+    w->cap = cap;
+    w->len = 0;
+    w->overflow = false;
+}
+
+void cl_w_bytes(ClWriter *w, const void *p, size_t n) {
+    if (w->overflow || n > w->cap - w->len) {
+        w->overflow = true;
+        return;
+    }
+    if (n) memcpy(w->buf + w->len, p, n);
+    w->len += n;
+}
+
+void cl_w_uN(ClWriter *w, uint64_t v, uint8_t nbytes) {
+    uint8_t b[8];
+    for (uint8_t i = 0; i < nbytes && i < 8; ++i) b[i] = (uint8_t)(v >> (8u * i));
+    cl_w_bytes(w, b, nbytes);
+}
+
+void cl_w_u8(ClWriter *w, uint8_t v) { cl_w_uN(w, v, 1); }
+void cl_w_u16(ClWriter *w, uint16_t v) { cl_w_uN(w, v, 2); }
+void cl_w_u32(ClWriter *w, uint32_t v) { cl_w_uN(w, v, 4); }
+void cl_w_u64(ClWriter *w, uint64_t v) { cl_w_uN(w, v, 8); }
+
+void cl_r_init(ClReader *r, const uint8_t *buf, size_t len) {
+    r->buf = buf;
+    r->len = len;
+    r->pos = 0;
+    r->error = false;
+}
+
+bool cl_r_bytes(ClReader *r, void *out, size_t n) {
+    if (r->error || n > r->len - r->pos) {
+        r->error = true;
+        if (out && n) memset(out, 0, n);
+        return false;
+    }
+    if (n) memcpy(out, r->buf + r->pos, n);
+    r->pos += n;
+    return true;
+}
+
+uint64_t cl_r_uN(ClReader *r, uint8_t nbytes) {
+    uint8_t b[8] = {0};
+    if (nbytes > 8 || !cl_r_bytes(r, b, nbytes)) {
+        r->error = true;
+        return 0;
+    }
+    uint64_t v = 0;
+    for (uint8_t i = 0; i < nbytes; ++i) v |= (uint64_t)b[i] << (8u * i);
+    return v;
+}
+
+uint8_t cl_r_u8(ClReader *r) { return (uint8_t)cl_r_uN(r, 1); }
+uint16_t cl_r_u16(ClReader *r) { return (uint16_t)cl_r_uN(r, 2); }
+uint32_t cl_r_u32(ClReader *r) { return (uint32_t)cl_r_uN(r, 4); }
+uint64_t cl_r_u64(ClReader *r) { return cl_r_uN(r, 8); }
+
+static uint64_t splitmix64(uint64_t *x) {
+    uint64_t z = (*x += 0x9E3779B97F4A7C15ULL);
+    z = (z ^ (z >> 30)) * 0xBF58476D1CE4E5B9ULL;
+    z = (z ^ (z >> 27)) * 0x94D049BB133111EBULL;
+    return z ^ (z >> 31);
+}
+
+void cl_rng_seed(ClRng *r, const char *domain, const uint64_t *parts, size_t nparts) {
+    sha256_ctx c;
+    sha256_init(&c);
+    sha256_update(&c, (const uint8_t *)domain, strlen(domain) + 1);
+    for (size_t i = 0; i < nparts; ++i) {
+        uint8_t b[8];
+        for (int k = 0; k < 8; ++k) b[k] = (uint8_t)(parts[i] >> (8 * k));
+        sha256_update(&c, b, 8);
+    }
+    uint8_t d[32];
+    sha256_final(&c, d);
+    uint64_t x = 0;
+    for (int k = 0; k < 8; ++k) x |= (uint64_t)d[k] << (8 * k);
+    for (int i = 0; i < 4; ++i) r->s[i] = splitmix64(&x);
+}
+
+static inline uint64_t rotl(uint64_t x, int k) { return (x << k) | (x >> (64 - k)); }
+
+uint64_t cl_rng_next(ClRng *r) {
+    uint64_t *s = r->s;
+    uint64_t result = rotl(s[1] * 5, 7) * 9;
+    uint64_t t = s[1] << 17;
+    s[2] ^= s[0];
+    s[3] ^= s[1];
+    s[1] ^= s[2];
+    s[0] ^= s[3];
+    s[2] ^= t;
+    s[3] = rotl(s[3], 45);
+    return result;
+}
+
+uint64_t cl_rng_below(ClRng *r, uint64_t n) {
+    if (n <= 1) return 0;
+    uint64_t limit = UINT64_MAX - (UINT64_MAX % n);
+    uint64_t v;
+    do {
+        v = cl_rng_next(r);
+    } while (v >= limit);
+    return v % n;
+}
+
+void cl_digest(const char *domain, const uint8_t *data, size_t len, uint8_t out[CL_DIGEST_BYTES]) {
+    sha256_ctx c;
+    sha256_init(&c);
+    sha256_update(&c, (const uint8_t *)domain, strlen(domain) + 1);
+    if (len) sha256_update(&c, data, len);
+    sha256_final(&c, out);
+}
+
+void cl_hex(const uint8_t *bytes, size_t n, char *out) {
+    static const char hx[] = "0123456789abcdef";
+    for (size_t i = 0; i < n; ++i) {
+        out[2 * i] = hx[bytes[i] >> 4];
+        out[2 * i + 1] = hx[bytes[i] & 15];
+    }
+    out[2 * n] = 0;
+}
+
+bool cl_contains(const uint8_t *hay, size_t hay_len, const void *needle, size_t needle_len) {
+    if (needle_len == 0 || needle_len > hay_len) return false;
+    return memmem(hay, hay_len, needle, needle_len) != NULL;
+}
diff --git a/src/crumbline/cl_common.h b/src/crumbline/cl_common.h
new file mode 100644
index 000000000..77c81d55e
--- /dev/null
+++ b/src/crumbline/cl_common.h
@@ -0,0 +1,81 @@
+/*
+ * cl_common.h -- Crumbline shared plumbing: canonical byte buffers, the
+ * deterministic PRNG, width masks and domain-separated digests.
+ *
+ * Crumbline is the AIEN training curriculum of unlabeled input/output
+ * observations. It is unrelated to the RFC-0001 Crumb Protocol (agent
+ * coordination files in crumb-spec / spark-crumbs).
+ *
+ * This header is linked into BOTH the learner binary and the sealed teacher.
+ * It must never name anything that exists only on the sealed side.
+ */
+#ifndef CL_COMMON_H
+#define CL_COMMON_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#define CL_DIGEST_BYTES 32
+
+/* ---- canonical little-endian byte writer / reader -------------------- */
+
+typedef struct {
+    uint8_t *buf;
+    size_t cap;
+    size_t len;
+    bool overflow;
+} ClWriter;
+
+void cl_w_init(ClWriter *w, uint8_t *buf, size_t cap);
+void cl_w_bytes(ClWriter *w, const void *p, size_t n);
+void cl_w_u8(ClWriter *w, uint8_t v);
+void cl_w_u16(ClWriter *w, uint16_t v);
+void cl_w_u32(ClWriter *w, uint32_t v);
+void cl_w_u64(ClWriter *w, uint64_t v);
+/* Little-endian value truncated to `nbytes` (1..8). */
+void cl_w_uN(ClWriter *w, uint64_t v, uint8_t nbytes);
+
+typedef struct {
+    const uint8_t *buf;
+    size_t len;
+    size_t pos;
+    bool error;
+} ClReader;
+
+void cl_r_init(ClReader *r, const uint8_t *buf, size_t len);
+bool cl_r_bytes(ClReader *r, void *out, size_t n);
+uint8_t cl_r_u8(ClReader *r);
+uint16_t cl_r_u16(ClReader *r);
+uint32_t cl_r_u32(ClReader *r);
+uint64_t cl_r_u64(ClReader *r);
+uint64_t cl_r_uN(ClReader *r, uint8_t nbytes);
+static inline bool cl_r_done(const ClReader *r) { return !r->error && r->pos == r->len; }
+
+/* ---- width masks ---------------------------------------------------- */
+
+static inline uint64_t cl_mask_bytes(uint8_t nbytes) {
+    return nbytes >= 8 ? 0xFFFFFFFFFFFFFFFFULL : ((1ULL << (8u * nbytes)) - 1ULL);
+}
+
+/* ---- deterministic PRNG: xoshiro256** seeded by splitmix64 ---------- */
+
+typedef struct {
+    uint64_t s[4];
+} ClRng;
+
+/* Seed from SHA-256(domain || u64 parts...) so every stream is named. */
+void cl_rng_seed(ClRng *r, const char *domain, const uint64_t *parts, size_t nparts);
+uint64_t cl_rng_next(ClRng *r);
+/* Uniform in [0, n); n > 0. Rejection sampling, no modulo bias. */
+uint64_t cl_rng_below(ClRng *r, uint64_t n);
+
+/* ---- domain-separated SHA-256 --------------------------------------- */
+
+void cl_digest(const char *domain, const uint8_t *data, size_t len, uint8_t out[CL_DIGEST_BYTES]);
+void cl_hex(const uint8_t *bytes, size_t n, char *out /* 2n+1 */);
+
+/* Search `hay` for `needle`; true if present. Used by the leak scanners. */
+bool cl_contains(const uint8_t *hay, size_t hay_len, const void *needle, size_t needle_len);
+
+#endif /* CL_COMMON_H */
diff --git a/src/crumbline/cl_crumb.c b/src/crumbline/cl_crumb.c
new file mode 100644
index 000000000..aee04730a
--- /dev/null
+++ b/src/crumbline/cl_crumb.c
@@ -0,0 +1,87 @@
+#include "cl_crumb.h"
+
+#include <string.h>
+
+static bool lane_bytes_ok(uint8_t enc, uint8_t b) {
+    if (enc == CL_ENC_DECIMAL) return b == 0;
+    return b == 1 || b == 2 || b == 4 || b == 8;
+}
+
+static int parse_lanes(uint8_t enc, uint8_t lane_bytes, uint8_t arity, const uint8_t *p, size_t len, uint64_t *out) {
+    if (enc == CL_ENC_RAW_LE) {
+        if (len != (size_t)lane_bytes * arity) return CL_CRUMB_ERR_LANE;
+        for (uint8_t l = 0; l < arity; ++l) {
+            uint64_t v = 0;
+            for (uint8_t k = 0; k < lane_bytes; ++k) v |= (uint64_t)p[l * lane_bytes + k] << (8u * k);
+            out[l] = v;
+        }
+        return CL_CRUMB_OK;
+    }
+    /* Decimal: arity canonical base-10 u64 values separated by single spaces. */
+    size_t pos = 0;
+    for (uint8_t l = 0; l < arity; ++l) {
+        if (l > 0) {
+            if (pos >= len || p[pos] != ' ') return CL_CRUMB_ERR_LANE;
+            pos++;
+        }
+        size_t start = pos;
+        uint64_t v = 0;
+        while (pos < len && p[pos] >= '0' && p[pos] <= '9') {
+            uint64_t d = (uint64_t)(p[pos] - '0');
+            if (v > (UINT64_MAX - d) / 10) return CL_CRUMB_ERR_LANE;
+            v = v * 10 + d;
+            pos++;
+        }
+        size_t digits = pos - start;
+        if (digits == 0 || (digits > 1 && p[start] == '0')) return CL_CRUMB_ERR_LANE;
+        out[l] = v;
+    }
+    return pos == len ? CL_CRUMB_OK : CL_CRUMB_ERR_LANE;
+}
+
+int cl_crumb_decode(const uint8_t *buf, size_t len, ClCrumb *out) {
+    memset(out, 0, sizeof(*out));
+    ClReader r;
+    cl_r_init(&r, buf, len);
+    uint8_t magic[4];
+    cl_r_bytes(&r, magic, 4);
+    if (r.error || memcmp(magic, "CRB1", 4) != 0) return CL_CRUMB_ERR_MAGIC;
+    if (cl_r_u16(&r) != 1) return CL_CRUMB_ERR_VERSION;
+    out->encoding = cl_r_u8(&r);
+    uint8_t flags = cl_r_u8(&r);
+    out->in_arity = cl_r_u8(&r);
+    out->out_arity = cl_r_u8(&r);
+    out->in_lane_bytes = cl_r_u8(&r);
+    out->out_lane_bytes = cl_r_u8(&r);
+    if (r.error || (out->encoding != CL_ENC_DECIMAL && out->encoding != CL_ENC_RAW_LE) || (flags & ~1u) ||
+        out->in_arity < 1 || out->in_arity > CL_CRUMB_MAX_LANES || out->out_arity < 1 ||
+        out->out_arity > CL_CRUMB_MAX_LANES || !lane_bytes_ok(out->encoding, out->in_lane_bytes) ||
+        !lane_bytes_ok(out->encoding, out->out_lane_bytes))
+        return CL_CRUMB_ERR_SHAPE;
+    out->n = cl_r_u32(&r);
+    if (r.error || out->n == 0 || out->n > CL_CRUMB_MAX_EXAMPLES) return CL_CRUMB_ERR_LENGTH;
+    for (uint32_t i = 0; i < out->n; ++i) {
+        for (int side = 0; side < 2; ++side) {
+            uint32_t n = cl_r_u32(&r);
+            if (r.error || n > r.len - r.pos) return CL_CRUMB_ERR_LENGTH;
+            const uint8_t *p = r.buf + r.pos;
+            r.pos += n;
+            int rc = side == 0 ? parse_lanes(out->encoding, out->in_lane_bytes, out->in_arity, p, n, out->in[i])
+                               : parse_lanes(out->encoding, out->out_lane_bytes, out->out_arity, p, n, out->out[i]);
+            if (rc != CL_CRUMB_OK) return rc;
+        }
+    }
+    if (flags & 1u) {
+        out->has_budget = true;
+        out->budget_max_candidates = cl_r_u32(&r);
+        out->budget_max_depth = cl_r_u32(&r);
+        out->budget_max_oracle_queries = cl_r_u32(&r);
+        out->budget_max_program_ops = cl_r_u32(&r);
+    }
+    if (!cl_r_done(&r)) return CL_CRUMB_ERR_LENGTH;
+    return CL_CRUMB_OK;
+}
+
+uint64_t cl_crumb_out_mask(const ClCrumb *c) {
+    return c->encoding == CL_ENC_RAW_LE ? cl_mask_bytes(c->out_lane_bytes) : UINT64_MAX;
+}
diff --git a/src/crumbline/cl_crumb.h b/src/crumbline/cl_crumb.h
new file mode 100644
index 000000000..ddba1464a
--- /dev/null
+++ b/src/crumbline/cl_crumb.h
@@ -0,0 +1,50 @@
+/*
+ * cl_crumb.h -- Omega's reader for Crumb v1 learner-visible bytes ("CRB1").
+ *
+ * The format is owned by the `crumbs` crate (aien-sovereign-core,
+ * crates/crumbs/src/visible.rs); this is a conforming consumer. Omega never
+ * computes crumb identities and never sees anything but these bytes:
+ *
+ *   "CRB1" | schema u16 (=1) | encoding u8 (1 decimal UTF-8, 2 raw LE) | flags u8
+ *   | in_arity u8 | out_arity u8 | in_lane_bytes u8 | out_lane_bytes u8 | n u32
+ *   | n x (u32 len, input bytes, u32 len, output bytes) | [budget 4 x u32]
+ *
+ * Decoding is strict (canonical decimal, exact lengths, no trailing bytes).
+ * Errors are bare codes.
+ */
+#ifndef CL_CRUMB_H
+#define CL_CRUMB_H
+
+#include "cl_common.h"
+
+#define CL_CRUMB_MAX_LANES 8
+#define CL_CRUMB_MAX_EXAMPLES 64
+#define CL_ENC_DECIMAL 1
+#define CL_ENC_RAW_LE 2
+
+typedef struct {
+    uint8_t encoding;
+    uint8_t in_arity, out_arity;
+    uint8_t in_lane_bytes, out_lane_bytes;
+    uint32_t n;
+    uint64_t in[CL_CRUMB_MAX_EXAMPLES][CL_CRUMB_MAX_LANES];
+    uint64_t out[CL_CRUMB_MAX_EXAMPLES][CL_CRUMB_MAX_LANES];
+    bool has_budget;
+    uint32_t budget_max_candidates, budget_max_depth, budget_max_oracle_queries, budget_max_program_ops;
+} ClCrumb;
+
+typedef enum {
+    CL_CRUMB_OK = 0,
+    CL_CRUMB_ERR_MAGIC = -1,
+    CL_CRUMB_ERR_VERSION = -2,
+    CL_CRUMB_ERR_SHAPE = -3,
+    CL_CRUMB_ERR_LANE = -4,
+    CL_CRUMB_ERR_LENGTH = -5,
+} ClCrumbStatus;
+
+int cl_crumb_decode(const uint8_t *buf, size_t len, ClCrumb *out);
+
+/* Output mask implied by the output lane encoding. */
+uint64_t cl_crumb_out_mask(const ClCrumb *c);
+
+#endif /* CL_CRUMB_H */
diff --git a/src/crumbline/cl_program.c b/src/crumbline/cl_program.c
new file mode 100644
index 000000000..8d313f0c3
--- /dev/null
+++ b/src/crumbline/cl_program.c
@@ -0,0 +1,268 @@
+#include "cl_program.h"
+#include "omega_core.h"
+#include "omega_synthesis.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static const uint64_t PROBES[CL_PROBE_COUNT] = {
+    0ULL, 1ULL, 2ULL, 3ULL, 5ULL, 7ULL, 13ULL, 42ULL,
+    100ULL, 127ULL, 128ULL, 255ULL, 256ULL, 1000ULL, 4095ULL, 65535ULL,
+    65536ULL, 1000003ULL, 0x7FFFFFFFULL, 0x80000000ULL, 0xFFFFFFFFULL, 0x100000000ULL,
+    0x123456789ABCDEFULL, 0x0F0F0F0F0F0F0F0FULL, 0x5555555555555555ULL, 0xAAAAAAAAAAAAAAAAULL,
+    0x7FFFFFFFFFFFFFFFULL, 0x8000000000000000ULL, 0xFFFFFFFFFFFFFFFEULL, 0xFFFFFFFFFFFFFFFFULL,
+    0x9E3779B97F4A7C15ULL, 0xD1B54A32D192ED03ULL,
+};
+
+const uint64_t *cl_probe_inputs(void) { return PROBES; }
+
+bool cl_step_op_valid(uint8_t op) {
+    return op == OP_ADD || op == OP_SUB || op == OP_MUL || op == OP_AND || op == OP_OR;
+}
+
+static uint64_t eval_step(const ClStep *s, uint64_t x) {
+    uint64_t r = 0;
+    if (omega_eval_pure_binary_uint((OpCode)s->op, OVERFLOW_WRAP, 64, x, s->imm, &r) != 0) return 0;
+    return r;
+}
+
+uint64_t cl_steps_eval(const ClSteps *p, uint64_t x) {
+    for (uint8_t i = 0; i < p->n; ++i) x = eval_step(&p->s[i], x);
+    return x;
+}
+
+uint32_t cl_steps_insns(const ClSteps *p) {
+    uint32_t n = 1; /* RET */
+    for (uint8_t i = 0; i < p->n; ++i) n += 2u + ((p->s[i].imm >> 16) != 0 ? 1u : 0u);
+    return n;
+}
+
+int cl_steps_concat(const ClSteps *a, const ClSteps *b, ClSteps *out) {
+    if ((unsigned)a->n + b->n > CL_MAX_STEPS) return -1;
+    ClSteps t;
+    memset(&t, 0, sizeof(t));
+    t.n = (uint8_t)(a->n + b->n);
+    memcpy(t.s, a->s, a->n * sizeof(ClStep));
+    memcpy(t.s + a->n, b->s, b->n * sizeof(ClStep));
+    *out = t;
+    return 0;
+}
+
+int cl_steps_encode(const ClSteps *p, ClWriter *w) {
+    if (p->n > CL_MAX_STEPS) return -1;
+    cl_w_u8(w, p->n);
+    for (uint8_t i = 0; i < p->n; ++i) {
+        cl_w_u8(w, p->s[i].op);
+        cl_w_u64(w, p->s[i].imm);
+    }
+    return w->overflow ? -1 : 0;
+}
+
+int cl_steps_decode(ClReader *r, ClSteps *out) {
+    memset(out, 0, sizeof(*out));
+    out->n = cl_r_u8(r);
+    if (r->error || out->n > CL_MAX_STEPS) {
+        r->error = true;
+        return -1;
+    }
+    for (uint8_t i = 0; i < out->n; ++i) {
+        out->s[i].op = cl_r_u8(r);
+        out->s[i].imm = cl_r_u64(r);
+        if (!cl_step_op_valid(out->s[i].op)) r->error = true;
+    }
+    return r->error ? -1 : 0;
+}
+
+void cl_steps_digest(const ClSteps *p, uint8_t out[CL_DIGEST_BYTES]) {
+    uint8_t buf[1 + CL_MAX_STEPS * 9];
+    ClWriter w;
+    cl_w_init(&w, buf, sizeof(buf));
+    cl_steps_encode(p, &w);
+    cl_digest("CRUMBLINE-V1-PROGRAM", buf, w.len, out);
+}
+
+void cl_steps_behavior(const ClSteps *p, uint8_t out[CL_DIGEST_BYTES]) {
+    uint8_t buf[CL_PROBE_COUNT * 8];
+    ClWriter w;
+    cl_w_init(&w, buf, sizeof(buf));
+    for (size_t i = 0; i < CL_PROBE_COUNT; ++i) cl_w_u64(&w, cl_steps_eval(p, PROBES[i]));
+    cl_digest("CRUMBLINE-V1-BEHAVIOR", buf, w.len, out);
+}
+
+int cl_steps_build_program(const ClSteps *p, OmegaProgram *out) {
+    if (!p || !out || p->n == 0) return -1;
+    OmegaProgram acc;
+    if (omega_program_build_unary_op(&acc, "s", (OpCode)p->s[0].op, p->s[0].imm) != 0) return -1;
+    for (uint8_t i = 1; i < p->n; ++i) {
+        OmegaProgram step, next;
+        if (omega_program_build_unary_op(&step, "s", (OpCode)p->s[i].op, p->s[i].imm) != 0) {
+            omega_program_destroy(&acc);
+            return -1;
+        }
+        char err[160];
+        int rc = omega_program_compose(&acc, &step, &next, err, sizeof(err));
+        omega_program_destroy(&step);
+        omega_program_destroy(&acc);
+        if (rc != 0) return -1;
+        acc = next;
+    }
+    uint8_t d[32];
+    char hex[65];
+    cl_steps_digest(p, d);
+    cl_hex(d, 8, hex);
+    snprintf(acc.name, sizeof(acc.name), "op_%.16s", hex);
+    omega_program_compute_id(&acc);
+    *out = acc;
+    return 0;
+}
+
+int cl_steps_differential(const ClSteps *p, const OmegaProgram *prog, const uint64_t *inputs, size_t n,
+                          uint32_t *exec_count) {
+    int bad = 0;
+    for (size_t k = 0; k < n + CL_PROBE_COUNT; ++k) {
+        uint64_t x = k < n ? inputs[k] : PROBES[k - n];
+        uint64_t native = 0;
+        if (omega_program_exec(prog, x, &native) != 0) return -1;
+        if (exec_count) (*exec_count)++;
+        if (native != cl_steps_eval(p, x)) bad++;
+    }
+    return bad;
+}
+
+/* ---- bank ----------------------------------------------------------- */
+
+int cl_bank_add(ClBank *bank, const ClSteps *steps, ClOpOrigin origin, uint32_t op_ref) {
+    if (bank->count >= CL_BANK_MAX || steps->n == 0) return -1;
+    uint8_t d[32];
+    cl_steps_digest(steps, d);
+    for (size_t i = 0; i < bank->count; ++i)
+        if (memcmp(bank->ops[i].digest, d, 32) == 0) return 1; /* already present */
+    ClOp *op = &bank->ops[bank->count++];
+    op->steps = *steps;
+    memcpy(op->digest, d, 32);
+    op->origin = (uint8_t)origin;
+    op->op_ref = op_ref;
+    return 0;
+}
+
+int cl_bank_init_base(ClBank *bank) {
+    memset(bank, 0, sizeof(*bank));
+    const OmegaSynthPrimDef *defs = NULL;
+    size_t n = omega_synth_base_prim_defs(&defs);
+    for (size_t i = 0; i < n; ++i) {
+        ClSteps s;
+        memset(&s, 0, sizeof(s));
+        s.n = 1;
+        s.s[0].op = (uint8_t)defs[i].op;
+        s.s[0].imm = defs[i].imm;
+        if (cl_bank_add(bank, &s, CL_OP_BASE, 0) < 0) return -1;
+    }
+    return 0;
+}
+
+void cl_bank_digest(const ClBank *bank, uint8_t out[CL_DIGEST_BYTES]) {
+    uint8_t buf[CL_BANK_MAX * 33 + 4];
+    ClWriter w;
+    cl_w_init(&w, buf, sizeof(buf));
+    cl_w_u32(&w, (uint32_t)bank->count);
+    for (size_t i = 0; i < bank->count; ++i) {
+        cl_w_bytes(&w, bank->ops[i].digest, 32);
+        cl_w_u8(&w, bank->ops[i].origin);
+    }
+    cl_digest("CRUMBLINE-V1-BANK", buf, w.len, out);
+}
+
+/* ---- learner library ------------------------------------------------ */
+
+int cl_library_init(ClLearnerLibrary *l) {
+    memset(l, 0, sizeof(*l));
+    return omega_library_init(&l->lib);
+}
+
+void cl_library_destroy(ClLearnerLibrary *l) { omega_library_destroy(&l->lib); }
+
+int cl_library_admit(ClLearnerLibrary *l, const ClSteps *steps, uint8_t scope_bits, uint32_t op_ref) {
+    if (!l || !steps || steps->n == 0 || l->lib.count >= OMEGA_LIB_MAX_PROGRAMS) return -1;
+    OmegaProgram prog;
+    if (cl_steps_build_program(steps, &prog) != 0) return -1;
+    VerifyReport rep;
+    int rc = -1;
+    if (omega_program_verify(&prog, &rep) == 0 && cl_steps_differential(steps, &prog, NULL, 0, NULL) == 0) {
+        uint8_t pre[4 + CL_DIGEST_BYTES], receipt[CL_DIGEST_BYTES];
+        for (int k = 0; k < 4; ++k) pre[k] = (uint8_t)(op_ref >> (8 * k));
+        cl_steps_digest(steps, pre + 4);
+        cl_digest("CRUMBLINE-OMEGA-ADMISSION", pre, sizeof(pre), receipt);
+        size_t slot = l->lib.count;
+        if (omega_library_insert(&l->lib, &prog, NULL, 0, receipt) == 0) {
+            l->steps[slot] = *steps;
+            l->scope_bits[slot] = scope_bits;
+            l->op_ref[slot] = op_ref;
+            rc = 0;
+        }
+    }
+    if (rc != 0) omega_program_destroy(&prog);
+    return rc;
+}
+
+int cl_library_export(const ClLearnerLibrary *l, uint8_t input_bits, ClBank *bank) {
+    int added = 0;
+    for (size_t i = 0; i < l->lib.count; ++i) {
+        if (l->scope_bits[i] < input_bits) continue; /* scope enforcement */
+        if (cl_bank_add(bank, &l->steps[i], CL_OP_LIBRARY, l->op_ref[i]) == 0) added++;
+    }
+    return added;
+}
+
+/* ---- CPG1 ----------------------------------------------------------- */
+
+uint8_t cl_cpg1_op(uint8_t omega_op) {
+    switch (omega_op) {
+        case OP_ADD: return 1;
+        case OP_SUB: return 2;
+        case OP_MUL: return 3;
+        case OP_AND: return 4;
+        case OP_OR: return 5;
+        default: return 0;
+    }
+}
+
+uint8_t cl_omega_op(uint8_t cpg1_op) {
+    switch (cpg1_op) {
+        case 1: return OP_ADD;
+        case 2: return OP_SUB;
+        case 3: return OP_MUL;
+        case 4: return OP_AND;
+        case 5: return OP_OR;
+        default: return 0;
+    }
+}
+
+int cl_steps_encode_cpg1(const ClSteps *p, ClWriter *w) {
+    cl_w_bytes(w, "CPG1", 4);
+    cl_w_u16(w, 1);
+    cl_w_u8(w, p->n);
+    for (uint8_t i = 0; i < p->n; ++i) {
+        uint8_t op = cl_cpg1_op(p->s[i].op);
+        if (op == 0) return -1;
+        cl_w_u8(w, op);
+        cl_w_u64(w, p->s[i].imm);
+    }
+    return w->overflow ? -1 : 0;
+}
+
+int cl_steps_decode_cpg1(ClReader *r, ClSteps *out) {
+    memset(out, 0, sizeof(*out));
+    uint8_t magic[4];
+    cl_r_bytes(r, magic, 4);
+    if (r->error || memcmp(magic, "CPG1", 4) != 0 || cl_r_u16(r) != 1) return -1;
+    uint8_t n = cl_r_u8(r);
+    if (r->error || n > CL_MAX_STEPS) return -1;
+    out->n = n;
+    for (uint8_t i = 0; i < n; ++i) {
+        out->s[i].op = cl_omega_op(cl_r_u8(r));
+        out->s[i].imm = cl_r_u64(r);
+        if (out->s[i].op == 0) return -1;
+    }
+    return r->error ? -1 : 0;
+}
diff --git a/src/crumbline/cl_program.h b/src/crumbline/cl_program.h
new file mode 100644
index 000000000..c1dd822d4
--- /dev/null
+++ b/src/crumbline/cl_program.h
@@ -0,0 +1,118 @@
+/*
+ * cl_program.h -- Crumbline candidate programs as step chains over Omega's
+ * existing unary operations, plus the operation bank the search draws from.
+ *
+ * A step chain is an ordered list of (OpCode, immediate) applied to one u64.
+ * It is the canonical, content-addressed form of a candidate. It is realized
+ * into a real OmegaProgram only through omega_program_build_unary_op +
+ * omega_program_compose, and it is checked with Omega's own verifier
+ * (omega_program_verify: V0 structural + V2 properties) plus a differential
+ * check of native execution against the reference semantics
+ * (omega_eval_pure_binary_uint).
+ *
+ * Shared by the learner and the sealed teacher. Contains nothing sealed.
+ */
+#ifndef CL_PROGRAM_H
+#define CL_PROGRAM_H
+
+#include "cl_common.h"
+#include "omega_program.h"
+#include "omega_library.h"
+
+#define CL_MAX_STEPS 24
+#define CL_BANK_MAX 96
+#define CL_PROBE_COUNT 32
+
+typedef struct {
+    uint8_t op; /* OpCode: OP_ADD, OP_SUB, OP_MUL, OP_AND, OP_OR */
+    uint64_t imm;
+} ClStep;
+
+typedef struct {
+    uint8_t n;
+    ClStep s[CL_MAX_STEPS];
+} ClSteps;
+
+bool cl_step_op_valid(uint8_t op);
+
+/* Reference semantics (wrapping u64), independent of machine code. */
+uint64_t cl_steps_eval(const ClSteps *p, uint64_t x);
+
+/* Instruction count of the realized program (matches omega_program_compose). */
+uint32_t cl_steps_insns(const ClSteps *p);
+
+/* a then b. Returns -1 if the result would exceed CL_MAX_STEPS. */
+int cl_steps_concat(const ClSteps *a, const ClSteps *b, ClSteps *out);
+
+/* Canonical encoding: u8 n, n x (u8 op, u64 imm). */
+int cl_steps_encode(const ClSteps *p, ClWriter *w);
+int cl_steps_decode(ClReader *r, ClSteps *out);
+
+/* Program digest: SHA-256("CRUMBLINE-V1-PROGRAM" || encoding). */
+void cl_steps_digest(const ClSteps *p, uint8_t out[CL_DIGEST_BYTES]);
+
+/* Behaviour signature: outputs on the fixed public probe inputs. Two chains
+ * with the same signature agree on every probe (not necessarily everywhere). */
+void cl_steps_behavior(const ClSteps *p, uint8_t out[CL_DIGEST_BYTES]);
+const uint64_t *cl_probe_inputs(void);
+
+/* Realize through Omega's builders. The program is named "op_<digest16>" so
+ * its SemanticId is determined by the step chain. Caller destroys `out`. */
+int cl_steps_build_program(const ClSteps *p, OmegaProgram *out);
+
+/* Native execution vs reference semantics on `inputs` plus the probes.
+ * Returns the number of disagreements (0 = differentially consistent),
+ * or -1 if the realization could not be executed. */
+int cl_steps_differential(const ClSteps *p, const OmegaProgram *prog, const uint64_t *inputs, size_t n,
+                          uint32_t *exec_count);
+
+/* ---- operation bank ------------------------------------------------- */
+
+typedef enum { CL_OP_BASE = 0, CL_OP_LIBRARY = 1 } ClOpOrigin;
+
+typedef struct {
+    ClSteps steps;
+    uint8_t digest[CL_DIGEST_BYTES]; /* learner-internal program digest */
+    uint8_t origin;                  /* ClOpOrigin */
+    uint32_t op_ref;                 /* ADMIT reference for library ops, 0 for base */
+} ClOp;
+
+typedef struct {
+    ClOp ops[CL_BANK_MAX];
+    size_t count;
+} ClBank;
+
+/* Base vocabulary: exactly omega_synth_base_prim_defs(). */
+int cl_bank_init_base(ClBank *bank);
+int cl_bank_add(ClBank *bank, const ClSteps *steps, ClOpOrigin origin, uint32_t op_ref);
+void cl_bank_digest(const ClBank *bank, uint8_t out[CL_DIGEST_BYTES]);
+
+/* ---- learner library: OmegaLibrary plus each entry's step chain ------- */
+
+typedef struct {
+    OmegaLibrary lib;                          /* the canonical semantic-object store */
+    ClSteps steps[OMEGA_LIB_MAX_PROGRAMS];     /* step chain of lib.entries[i] */
+    uint8_t scope_bits[OMEGA_LIB_MAX_PROGRAMS]; /* widest input magnitude (bits) it was verified over */
+    uint32_t op_ref[OMEGA_LIB_MAX_PROGRAMS];   /* sealed-side admission reference */
+} ClLearnerLibrary;
+
+int cl_library_init(ClLearnerLibrary *l);
+void cl_library_destroy(ClLearnerLibrary *l);
+
+/* Build, verify (V0+V2 + differential) and insert via omega_library_insert.
+ * The library receipt hash binds the admission reference and the program. */
+int cl_library_admit(ClLearnerLibrary *l, const ClSteps *steps, uint8_t scope_bits, uint32_t op_ref);
+
+/* Add every entry whose verified scope covers inputs of `input_bits` bits.
+ * Returns how many were added. Entries outside scope are withheld. */
+int cl_library_export(const ClLearnerLibrary *l, uint8_t input_bits, ClBank *bank);
+
+/* ---- Candidate Program v1 (CPG1, owned by the crumbs crate) ---------- */
+
+/* Omega OpCode -> CPG1 op byte (0 if the op has no CPG1 form). */
+uint8_t cl_cpg1_op(uint8_t omega_op);
+uint8_t cl_omega_op(uint8_t cpg1_op);
+int cl_steps_encode_cpg1(const ClSteps *p, ClWriter *w);
+int cl_steps_decode_cpg1(ClReader *r, ClSteps *out);
+
+#endif /* CL_PROGRAM_H */
diff --git a/src/crumbline/cl_search.c b/src/crumbline/cl_search.c
new file mode 100644
index 000000000..aa1b2e683
--- /dev/null
+++ b/src/crumbline/cl_search.c
@@ -0,0 +1,377 @@
+#include "cl_search.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#define W_PROBES CL_PROBE_COUNT
+#define MAX_PENDING 64
+#define MAX_HYP 64
+
+void cl_search_default_config(ClSearchConfig *cfg) {
+    cfg->max_candidates = 20000;
+    cfg->max_depth = 6;
+    cfg->frontier_cap = 4000;
+    cfg->max_oracle_queries = 4;
+    cfg->ambiguity_scan = 400;
+    cfg->robust_min_pct = 75;
+    cfg->max_program_insns = 80;
+}
+
+uint8_t cl_crumb_input_bits(const ClCrumb *c) {
+    uint64_t m = 0;
+    for (uint32_t i = 0; i < c->n; ++i)
+        if (c->in[i][0] > m) m = c->in[i][0];
+    uint8_t b = 0;
+    while (m) {
+        b++;
+        m >>= 1;
+    }
+    return b;
+}
+
+typedef struct {
+    uint32_t id;
+    uint32_t parent; /* index into nodes, UINT32_MAX for the root */
+    uint16_t op;
+    uint8_t depth;
+    uint8_t nsteps;
+    uint32_t insns; /* realized instructions excluding the final RET */
+} Node;
+
+typedef struct {
+    uint64_t h1, h2;
+    uint32_t insns;
+    uint8_t used;
+} Slot;
+
+typedef struct {
+    uint32_t node_id;
+    ClSteps steps;
+} Pending;
+
+typedef struct {
+    const ClCrumb *crumb;
+    const ClBank *bank;
+    const ClSearchConfig *cfg;
+    const ClOracle *oracle;
+    const ClEventSink *sink;
+    ClSearchResult *res;
+    uint32_t n;      /* visible examples */
+    uint32_t w;      /* values per node: n + probes */
+    uint64_t mask;
+    Node *nodes;
+    uint64_t *vals;
+    size_t count, cap;
+    Slot *table;
+    size_t tmask;
+    uint64_t inputs[CL_CRUMB_MAX_EXAMPLES];
+    Pending pending[MAX_PENDING];
+    size_t npending;
+    uint32_t pending_since;
+    uint8_t hyps[MAX_HYP][CL_DIGEST_BYTES];
+    size_t nhyp;
+    uint32_t max_queries;
+    bool stop, solved, first_submit_done;
+} S;
+
+static void emit(S *s, const ClEvent *ev) {
+    if (s->sink && s->sink->emit) s->sink->emit(s->sink->ctx, ev);
+}
+
+static void hash_vals(const uint64_t *v, uint32_t w, uint64_t *h1, uint64_t *h2) {
+    uint64_t a = 0x9E3779B97F4A7C15ULL, b = 0xC2B2AE3D27D4EB4FULL;
+    for (uint32_t i = 0; i < w; ++i) {
+        a = (a ^ v[i]) * 0x100000001B3ULL;
+        a ^= a >> 29;
+        b = (b + v[i]) * 0xFF51AFD7ED558CCDULL;
+        b ^= b >> 33;
+    }
+    *h1 = a;
+    *h2 = b;
+}
+
+/* true if an equivalent state with cost <= insns already exists */
+static bool equiv_seen(S *s, uint64_t h1, uint64_t h2, uint32_t insns) {
+    size_t i = (size_t)h1 & s->tmask;
+    for (;;) {
+        Slot *sl = &s->table[i];
+        if (!sl->used) {
+            sl->used = 1;
+            sl->h1 = h1;
+            sl->h2 = h2;
+            sl->insns = insns;
+            return false;
+        }
+        if (sl->h1 == h1 && sl->h2 == h2) {
+            if (sl->insns <= insns) return true;
+            sl->insns = insns;
+            return false;
+        }
+        i = (i + 1) & s->tmask;
+    }
+}
+
+static uint32_t op_insns(const ClOp *op) { return cl_steps_insns(&op->steps) - 1; }
+
+/* Steps of the chain: ancestors of nodes[parent_idx], then bank op `op`. */
+static int build_steps(S *s, uint32_t parent_idx, uint16_t op, ClSteps *out) {
+    uint16_t ops[64];
+    int k = 0;
+    for (uint32_t i = parent_idx; i != UINT32_MAX && s->nodes[i].parent != UINT32_MAX; i = s->nodes[i].parent) {
+        if (k >= 63) return -1;
+        ops[k++] = s->nodes[i].op;
+    }
+    memset(out, 0, sizeof(*out));
+    for (int j = k - 1; j >= 0; --j)
+        if (cl_steps_concat(out, &s->bank->ops[ops[j]].steps, out) != 0) return -1;
+    return cl_steps_concat(out, &s->bank->ops[op].steps, out);
+}
+
+/* Omega verification of a visible fit: realize, V0+V2, native-vs-reference. */
+static uint8_t verify_fit(S *s, const ClSteps *steps) {
+    OmegaProgram prog;
+    if (cl_steps_build_program(steps, &prog) != 0) return CL_VERIFY_FAIL_BUILD;
+    VerifyReport rep;
+    uint8_t out = CL_VERIFY_PASS;
+    if (omega_program_verify(&prog, &rep) != 0) {
+        out = CL_VERIFY_FAIL_OMEGA;
+    } else {
+        uint32_t execs = 0;
+        int bad = cl_steps_differential(steps, &prog, s->inputs, s->n, &execs);
+        s->res->exec_count += execs;
+        if (bad != 0) out = CL_VERIFY_FAIL_DIFFERENTIAL;
+    }
+    omega_program_destroy(&prog);
+    return out;
+}
+
+static void submit_one(S *s, uint32_t node_id, const ClSteps *steps, uint8_t flags) {
+    if (s->res->oracle_queries >= s->max_queries) {
+        s->stop = true;
+        return;
+    }
+    s->res->oracle_queries++;
+    if (!s->first_submit_done) {
+        s->first_submit_done = true;
+        s->res->hypotheses_at_first_submit = (uint32_t)s->nhyp;
+    }
+    ClEvent ev = {CL_EV_SUBMIT, 0, CL_VERIFY_PASS, (flags & CL_SUBMIT_ROBUST) ? CL_FIT_ROBUST : CL_FIT_EXACT, 0,
+                  node_id, node_id, 0, (uint16_t)s->res->oracle_queries};
+    emit(s, &ev);
+    uint8_t verdict = CL_VERDICT_REJECT;
+    uint8_t hyp = s->nhyp > 255 ? 255 : (uint8_t)s->nhyp;
+    if (s->oracle->submit(s->oracle->ctx, node_id, steps, flags, hyp, &verdict) != 0) {
+        s->stop = true;
+        return;
+    }
+    if (verdict == CL_VERDICT_ACCEPT) {
+        s->solved = true;
+        s->stop = true;
+        s->res->outcome = CL_OUTCOME_SOLVED;
+        s->res->solution = *steps;
+        s->res->solution_node = node_id;
+        s->res->candidates_to_solution = s->res->generated;
+    } else if (verdict == CL_VERDICT_EXHAUSTED) {
+        s->stop = true;
+    } else {
+        s->res->oracle_rejections++;
+    }
+}
+
+static void flush_pending(S *s) {
+    for (size_t i = 0; i < s->npending && !s->stop; ++i) submit_one(s, s->pending[i].node_id, &s->pending[i].steps, 0);
+    s->npending = 0;
+}
+
+int cl_search_run(const ClCrumb *crumb, const ClBank *bank, const ClSearchConfig *cfg_in, const ClOracle *oracle,
+                  const ClEventSink *sink, ClSearchResult *res) {
+    if (!crumb || !bank || !cfg_in || !oracle || !res) return -1;
+    struct timespec t0, t1;
+    clock_gettime(CLOCK_MONOTONIC, &t0);
+    memset(res, 0, sizeof(*res));
+    res->outcome = CL_OUTCOME_UNSOLVED;
+    res->solution_node = UINT32_MAX;
+
+    ClSearchConfig cfg = *cfg_in;
+    if (crumb->has_budget) {
+        if (crumb->budget_max_candidates && crumb->budget_max_candidates < cfg.max_candidates)
+            cfg.max_candidates = crumb->budget_max_candidates;
+        if (crumb->budget_max_depth && crumb->budget_max_depth < cfg.max_depth) cfg.max_depth = crumb->budget_max_depth;
+        if (crumb->budget_max_oracle_queries && crumb->budget_max_oracle_queries < cfg.max_oracle_queries)
+            cfg.max_oracle_queries = crumb->budget_max_oracle_queries;
+    }
+    /* Omega's unary synthesis handles one input lane and one output lane. */
+    if (crumb->in_arity != 1 || crumb->out_arity != 1) {
+        res->outcome = CL_OUTCOME_UNSUPPORTED;
+        return 0;
+    }
+
+    S s;
+    memset(&s, 0, sizeof(s));
+    s.crumb = crumb;
+    s.bank = bank;
+    s.cfg = &cfg;
+    s.oracle = oracle;
+    s.sink = sink;
+    s.res = res;
+    s.n = crumb->n;
+    s.w = crumb->n + W_PROBES;
+    s.mask = cl_crumb_out_mask(crumb);
+    s.max_queries = cfg.max_oracle_queries;
+    for (uint32_t i = 0; i < s.n; ++i) s.inputs[i] = crumb->in[i][0];
+
+    s.cap = (size_t)cfg.frontier_cap * cfg.max_depth + 1;
+    if (s.cap > (size_t)cfg.max_candidates + 1) s.cap = (size_t)cfg.max_candidates + 1;
+    size_t tsize = 1024;
+    while (tsize < 2 * ((size_t)cfg.max_candidates + 2)) tsize <<= 1;
+    s.tmask = tsize - 1;
+    s.nodes = calloc(s.cap, sizeof(Node));
+    s.vals = calloc(s.cap * s.w, sizeof(uint64_t));
+    s.table = calloc(tsize, sizeof(Slot));
+    uint64_t *scratch = calloc(s.w, sizeof(uint64_t));
+    if (!s.nodes || !s.vals || !s.table || !scratch) {
+        free(s.nodes);
+        free(s.vals);
+        free(s.table);
+        free(scratch);
+        return -1;
+    }
+
+    const uint64_t *probes = cl_probe_inputs();
+    Node *root = &s.nodes[0];
+    root->id = 0;
+    root->parent = UINT32_MAX;
+    root->op = UINT16_MAX;
+    for (uint32_t k = 0; k < s.n; ++k) s.vals[k] = s.inputs[k];
+    for (uint32_t k = 0; k < W_PROBES; ++k) s.vals[s.n + k] = probes[k];
+    uint64_t h1, h2;
+    hash_vals(s.vals, s.w, &h1, &h2);
+    equiv_seen(&s, h1, h2, 0);
+    s.count = 1;
+
+    uint32_t next_id = 1;
+    size_t level_start = 0, level_end = 1;
+    int best_matches = -1;
+    uint32_t best_node = 0, best_parent = 0;
+    uint16_t best_op = 0;
+    uint32_t robust_need = cfg.robust_min_pct ? (s.n * cfg.robust_min_pct + 99) / 100 : UINT32_MAX;
+
+    for (uint32_t depth = 1; depth <= cfg.max_depth && !s.stop; ++depth) {
+        size_t level_kept = 0;
+        for (size_t pi = level_start; pi < level_end && !s.stop; ++pi) {
+            res->expansions++;
+            for (size_t oi = 0; oi < bank->count && !s.stop; ++oi) {
+                if (res->generated >= cfg.max_candidates) {
+                    s.stop = true;
+                    break;
+                }
+                res->generated++;
+                const Node *parent = &s.nodes[pi];
+                const ClOp *op = &bank->ops[oi];
+                ClEvent ev = {CL_EV_EXPAND, CL_PRUNE_NONE, CL_VERIFY_NOT_REACHED, CL_FIT_NONE, (uint16_t)oi,
+                              parent->id, next_id++, 0, 0};
+                uint32_t nsteps = parent->nsteps + op->steps.n;
+                uint32_t insns = parent->insns + op_insns(op);
+                if (nsteps > CL_MAX_STEPS) {
+                    ev.prune = CL_PRUNE_STEP_CAP;
+                    emit(&s, &ev);
+                    continue;
+                }
+                if (insns + 1 > cfg.max_program_insns) {
+                    ev.prune = CL_PRUNE_COST;
+                    res->pruned_cost++;
+                    emit(&s, &ev);
+                    continue;
+                }
+                const uint64_t *pv = &s.vals[pi * s.w];
+                for (uint32_t k = 0; k < s.w; ++k) scratch[k] = cl_steps_eval(&op->steps, pv[k]);
+                ev.exec_cost = s.w;
+                hash_vals(scratch, s.w, &h1, &h2);
+                if (equiv_seen(&s, h1, h2, insns)) {
+                    ev.prune = CL_PRUNE_EQUIV;
+                    res->pruned_equiv++;
+                    emit(&s, &ev);
+                    continue;
+                }
+                res->evaluated++;
+                uint32_t mismatch = 0;
+                for (uint32_t k = 0; k < s.n; ++k)
+                    if ((scratch[k] & s.mask) != crumb->out[k][0]) mismatch++;
+
+                if (level_kept < cfg.frontier_cap && s.count < s.cap) {
+                    Node *c = &s.nodes[s.count];
+                    c->id = ev.child;
+                    c->parent = (uint32_t)pi;
+                    c->op = (uint16_t)oi;
+                    c->depth = (uint8_t)depth;
+                    c->nsteps = (uint8_t)nsteps;
+                    c->insns = insns;
+                    memcpy(&s.vals[s.count * s.w], scratch, s.w * sizeof(uint64_t));
+                    s.count++;
+                    level_kept++;
+                } else {
+                    ev.prune = CL_PRUNE_FRONTIER_CAP;
+                    res->pruned_cap++;
+                }
+
+                if (mismatch == 0) {
+                    ev.fit = CL_FIT_EXACT;
+                    res->visible_fits++;
+                    ClSteps steps;
+                    if (build_steps(&s, (uint32_t)pi, (uint16_t)oi, &steps) != 0) {
+                        ev.verify = CL_VERIFY_FAIL_BUILD;
+                    } else {
+                        ev.verify = verify_fit(&s, &steps);
+                    }
+                    if (ev.verify != CL_VERIFY_PASS) {
+                        res->verify_failures++;
+                    } else {
+                        uint8_t sig[CL_DIGEST_BYTES];
+                        cl_steps_behavior(&steps, sig);
+                        bool fresh = true;
+                        for (size_t h = 0; h < s.nhyp; ++h)
+                            if (memcmp(s.hyps[h], sig, CL_DIGEST_BYTES) == 0) fresh = false;
+                        if (fresh && s.nhyp < MAX_HYP) memcpy(s.hyps[s.nhyp++], sig, CL_DIGEST_BYTES);
+                        if (fresh && s.npending < MAX_PENDING) {
+                            if (s.npending == 0) s.pending_since = res->generated;
+                            s.pending[s.npending].node_id = ev.child;
+                            s.pending[s.npending].steps = steps;
+                            s.npending++;
+                        }
+                    }
+                } else if (s.n - mismatch >= robust_need && (int)(s.n - mismatch) > best_matches) {
+                    best_matches = (int)(s.n - mismatch);
+                    best_node = ev.child;
+                    best_parent = (uint32_t)pi;
+                    best_op = (uint16_t)oi;
+                }
+                emit(&s, &ev);
+
+                if (s.npending && res->generated >= s.pending_since + cfg.ambiguity_scan) flush_pending(&s);
+            }
+        }
+        level_start = level_end;
+        level_end = s.count;
+        if (level_start == level_end) break;
+    }
+    if (!s.solved && s.npending) {
+        s.stop = false;
+        flush_pending(&s);
+    }
+    if (!s.solved && best_matches >= 0 && res->oracle_queries < s.max_queries) {
+        ClSteps steps;
+        if (build_steps(&s, best_parent, best_op, &steps) == 0 && verify_fit(&s, &steps) == CL_VERIFY_PASS) {
+            s.stop = false;
+            submit_one(&s, best_node, &steps, CL_SUBMIT_ROBUST);
+        }
+    }
+
+    free(s.nodes);
+    free(s.vals);
+    free(s.table);
+    free(scratch);
+    clock_gettime(CLOCK_MONOTONIC, &t1);
+    res->wall_ns = (uint64_t)(t1.tv_sec - t0.tv_sec) * 1000000000ULL + (uint64_t)(t1.tv_nsec - t0.tv_nsec);
+    return 0;
+}
diff --git a/src/crumbline/cl_search.h b/src/crumbline/cl_search.h
new file mode 100644
index 000000000..05d7ed398
--- /dev/null
+++ b/src/crumbline/cl_search.h
@@ -0,0 +1,100 @@
+/*
+ * cl_search.h -- Omega synthesis over a Crumbline crumb (the Omega-side adapter).
+ *
+ * Inputs: the learner-visible crumb, an operation bank (Omega's base
+ * vocabulary from omega_synth_base_prim_defs, optionally extended from the
+ * learner's OmegaLibrary) and an oracle handle. The oracle is the ONLY route to
+ * the sealed verifier: it takes one candidate step chain and returns one
+ * verdict byte. It cannot return held-out inputs, outputs, counterexamples or
+ * labels.
+ *
+ * The search is a level-by-level enumeration of compositions, like
+ * omega_synthesize (left untouched: the M9 gates pin its enumeration order),
+ * extended with:
+ *   - observational-equivalence pruning over visible inputs + public probes;
+ *   - acceptance through omega_program_verify (V0 + V2) plus a native vs
+ *     reference-semantics differential check before anything is submitted;
+ *   - an ambiguity scan: after the first visible fit the search keeps looking
+ *     for behaviourally different rival fits before it commits;
+ *   - rejected candidates are recorded (event stream) and search continues;
+ *   - a robust fallback (best partial fit) for observations no exact
+ *     program explains.
+ */
+#ifndef CL_SEARCH_H
+#define CL_SEARCH_H
+
+#include "cl_crumb.h"
+#include "cl_program.h"
+
+typedef enum {
+    CL_VERDICT_NONE = 0,
+    CL_VERDICT_ACCEPT = 1,
+    CL_VERDICT_REJECT = 2,
+    CL_VERDICT_EXHAUSTED = 3,
+} ClVerdict;
+
+#define CL_SUBMIT_ROBUST 0x01u
+
+typedef struct {
+    /* Submit one candidate; writes one ClVerdict. */
+    int (*submit)(void *ctx, uint32_t node, const ClSteps *cand, uint8_t flags, uint8_t hypotheses, uint8_t *verdict);
+    void *ctx;
+} ClOracle;
+
+/* Search events (the learner half of the crumbs trace schema). */
+enum { CL_EV_EXPAND = 1, CL_EV_SUBMIT = 2 };
+enum { CL_PRUNE_NONE = 0, CL_PRUNE_EQUIV = 1, CL_PRUNE_COST = 2, CL_PRUNE_FRONTIER_CAP = 3, CL_PRUNE_STEP_CAP = 4 };
+enum {
+    CL_VERIFY_NOT_REACHED = 0,
+    CL_VERIFY_PASS = 1,
+    CL_VERIFY_FAIL_OMEGA = 2,
+    CL_VERIFY_FAIL_DIFFERENTIAL = 3,
+    CL_VERIFY_FAIL_BUILD = 4,
+};
+enum { CL_FIT_NONE = 0, CL_FIT_EXACT = 1, CL_FIT_ROBUST = 2 };
+
+typedef struct {
+    uint8_t kind, prune, verify, fit;
+    uint16_t op_index;
+    uint32_t parent, child;
+    uint32_t exec_cost;
+    uint16_t oracle_index;
+} ClEvent;
+
+typedef struct {
+    void (*emit)(void *ctx, const ClEvent *ev);
+    void *ctx;
+} ClEventSink;
+
+typedef struct {
+    uint32_t max_candidates;
+    uint32_t max_depth;
+    uint32_t frontier_cap;
+    uint32_t max_oracle_queries;
+    uint32_t ambiguity_scan;
+    uint32_t robust_min_pct;
+    uint32_t max_program_insns;
+} ClSearchConfig;
+
+void cl_search_default_config(ClSearchConfig *cfg);
+
+enum { CL_OUTCOME_SOLVED = 1, CL_OUTCOME_UNSOLVED = 2, CL_OUTCOME_UNSUPPORTED = 3 };
+
+typedef struct {
+    uint8_t outcome;
+    uint32_t solution_node;
+    ClSteps solution;
+    uint32_t generated, evaluated, expansions;
+    uint32_t pruned_equiv, pruned_cost, pruned_cap;
+    uint32_t visible_fits, verify_failures, oracle_queries, oracle_rejections;
+    uint32_t candidates_to_solution, hypotheses_at_first_submit;
+    uint64_t exec_count, wall_ns;
+} ClSearchResult;
+
+int cl_search_run(const ClCrumb *crumb, const ClBank *bank, const ClSearchConfig *cfg, const ClOracle *oracle,
+                  const ClEventSink *sink /* nullable */, ClSearchResult *res);
+
+/* Widest visible input magnitude in bits (lane 0), used for library scope. */
+uint8_t cl_crumb_input_bits(const ClCrumb *c);
+
+#endif /* CL_SEARCH_H */
diff --git a/src/omega_synthesis.c b/src/omega_synthesis.c
index 9500ff2fe..a1086f066 100644
--- a/src/omega_synthesis.c
+++ b/src/omega_synthesis.c
@@ -8,32 +8,35 @@
 
 static const uint64_t PROBE_INPUTS[SYNTH_PROBE_COUNT] = { 0, 1, 3, 7, 13, 42 };
 
+static const OmegaSynthPrimDef BASE_PRIM_DEFS[] = {
+    { "add_1",  OP_ADD, 1 },
+    { "add_2",  OP_ADD, 2 },
+    { "add_3",  OP_ADD, 3 },
+    { "add_5",  OP_ADD, 5 },
+    { "sub_1",  OP_SUB, 1 },
+    { "sub_2",  OP_SUB, 2 },
+    { "sub_3",  OP_SUB, 3 },
+    { "sub_5",  OP_SUB, 5 },
+    { "mul_2",  OP_MUL, 2 },
+    { "mul_3",  OP_MUL, 3 },
+    { "mul_4",  OP_MUL, 4 },
+    { "and_ff", OP_AND, 0xFF },
+    { "and_0f", OP_AND, 0x0F },
+    { "or_1",   OP_OR,  1 },
+    { "or_2",   OP_OR,  2 }
+};
+
+size_t omega_synth_base_prim_defs(const OmegaSynthPrimDef **out) {
+    if (out) *out = BASE_PRIM_DEFS;
+    return sizeof(BASE_PRIM_DEFS) / sizeof(BASE_PRIM_DEFS[0]);
+}
+
 int omega_synth_bank_init(SynthPrimitiveBank *bank) {
     if (!bank) return -1;
     memset(bank, 0, sizeof(SynthPrimitiveBank));
 
-    struct {
-        const char *name;
-        OpCode op;
-        uint64_t imm;
-    } prim_defs[] = {
-        { "add_1",  OP_ADD, 1 },
-        { "add_2",  OP_ADD, 2 },
-        { "add_3",  OP_ADD, 3 },
-        { "add_5",  OP_ADD, 5 },
-        { "sub_1",  OP_SUB, 1 },
-        { "sub_2",  OP_SUB, 2 },
-        { "sub_3",  OP_SUB, 3 },
-        { "sub_5",  OP_SUB, 5 },
-        { "mul_2",  OP_MUL, 2 },
-        { "mul_3",  OP_MUL, 3 },
-        { "mul_4",  OP_MUL, 4 },
-        { "and_ff", OP_AND, 0xFF },
-        { "and_0f", OP_AND, 0x0F },
-        { "or_1",   OP_OR,  1 },
-        { "or_2",   OP_OR,  2 }
-    };
-    size_t num_defs = sizeof(prim_defs) / sizeof(prim_defs[0]);
+    const OmegaSynthPrimDef *prim_defs = NULL;
+    size_t num_defs = omega_synth_base_prim_defs(&prim_defs);
 
     for (size_t i = 0; i < num_defs && i < SYNTH_MAX_PRIMITIVES; ++i) {
         if (omega_program_build_unary_op(&bank->programs[i], prim_defs[i].name,
diff --git a/src/omega_synthesis.h b/src/omega_synthesis.h
index b0f8ef984..5da16bdb5 100644
--- a/src/omega_synthesis.h
+++ b/src/omega_synthesis.h
@@ -47,6 +47,17 @@ typedef struct {
     size_t count;
 } EquivTable;
 
+/* The default primitive vocabulary as (name, op, imm) rows. omega_synth_bank_init
+ * builds its bank from exactly these rows; other searches (Crumbline) start from
+ * the same vocabulary instead of copying it. */
+typedef struct {
+    const char *name;
+    OpCode op;
+    uint64_t imm;
+} OmegaSynthPrimDef;
+
+size_t omega_synth_base_prim_defs(const OmegaSynthPrimDef **out);
+
 /* Initialize default primitive bank (add, sub, mul, and, or with diverse imm) */
 int omega_synth_bank_init(SynthPrimitiveBank *bank);
 
diff --git a/tests/crumbline/run_conformance.sh b/tests/crumbline/run_conformance.sh
new file mode 100755
index 000000000..fae38f7b6
--- /dev/null
+++ b/tests/crumbline/run_conformance.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# Crumb v1 conformance: Omega's visible-crumb reader must decode every vector
+# produced by the crumbs crate (aien-sovereign-core, crates/crumbs) exactly as
+# crumbs itself parses it. Vectors: `crumbs vectors DIR` (one per registered
+# family, seed 7) plus expected.txt.
+#
+# Also checks that malformed bytes are rejected and that the learner binary
+# carries no sealed-side symbols.
+set -u
+LEARNER=${1:-build/crumbline-learner}
+DIR=${2:-tests/crumbline/vectors}
+pass=0
+fail=0
+while read -r name rest; do
+    got=$("$LEARNER" --decode "$DIR/$name")
+    if [ "$got" == "$rest" ]; then
+        pass=$((pass + 1))
+    else
+        fail=$((fail + 1))
+        echo "MISMATCH $name"
+        echo "  want: $rest"
+        echo "  got:  $got"
+    fi
+done < "$DIR/expected.txt"
+
+# Negative vectors: truncated, wrong magic, trailing byte, non-canonical decimal.
+tmp=$(mktemp -d)
+head -c 20 "$DIR/v001.crb" > "$tmp/trunc.crb"
+printf 'XRB1' | cat - <(tail -c +5 "$DIR/v001.crb") > "$tmp/magic.crb"
+cat "$DIR/v001.crb" <(printf '\0') > "$tmp/trail.crb"
+printf 'CRB1\x01\x00\x01\x00\x01\x01\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x02\x00\x00\x0003' > "$tmp/zero.crb"
+for bad in trunc magic trail zero; do
+    if "$LEARNER" --decode "$tmp/$bad.crb" | grep -q '^decode-error'; then
+        pass=$((pass + 1))
+    else
+        fail=$((fail + 1))
+        echo "ACCEPTED MALFORMED $bad"
+    fi
+done
+rm -rf "$tmp"
+
+# The learner links no generator, sealed record or gate code.
+if nm "$LEARNER" | grep -Eiq 'sealed|heldout|generator|nvrm|_gates'; then
+    fail=$((fail + 1))
+    echo "LEARNER LINKS SEALED OR GATE SYMBOLS"
+else
+    pass=$((pass + 1))
+fi
+
+echo "CRUMBLINE_CONFORMANCE pass=$pass fail=$fail"
+[ "$fail" -eq 0 ]
diff --git a/tests/crumbline/vectors/expected.txt b/tests/crumbline/vectors/expected.txt
new file mode 100644
index 000000000..93142d904
--- /dev/null
+++ b/tests/crumbline/vectors/expected.txt
@@ -0,0 +1,122 @@
+v001.crb ok enc=1 in=1x0 out=1x0 n=8 | 228 -> 456 | 6 -> 12 | 108 -> 216 | 94 -> 188 | 245 -> 490 | 177 -> 354 | 214 -> 428 | 121 -> 242
+v002.crb ok enc=1 in=1x0 out=1x0 n=8 | 1150 -> 1144 | 772 -> 766 | 30 -> 24 | 26821 -> 26815 | 3404 -> 3398 | 1816 -> 1810 | 1783 -> 1777 | 3324 -> 3318
+v003.crb ok enc=1 in=1x0 out=1x0 n=8 | 30 -> 30 | 17 -> 17 | 3182 -> 3182 | 143 -> 143 | 3593 -> 3593 | 2030 -> 2030 | 3924 -> 3924 | 442 -> 442
+v004.crb ok enc=1 in=1x0 out=1x0 n=8 | 10 -> 17 | 15 -> 22 | 139 -> 146 | 7 -> 14 | 206 -> 213 | 91 -> 98 | 238 -> 245 | 4 -> 11
+v005.crb ok enc=1 in=1x0 out=1x0 n=8 | 1574 -> 1570 | 30 -> 26 | 3222 -> 3218 | 2067 -> 2063 | 1590 -> 1586 | 11934 -> 11930 | 7 -> 3 | 16 -> 14
+v006.crb ok enc=1 in=1x0 out=1x0 n=8 | 3630 -> 3637 | 1343 -> 1350 | 2389 -> 2396 | 3664 -> 3671 | 30 -> 37 | 2693 -> 2700 | 520 -> 527 | 367509420 -> 367509431
+v007.crb ok enc=1 in=1x0 out=1x0 n=8 | 198 -> 7 | 18 -> 3 | 5 -> 6 | 149 -> 6 | 190 -> 15 | 13 -> 14 | 154 -> 11 | 69 -> 6
+v008.crb ok enc=1 in=1x0 out=1x0 n=8 | 839 -> 851 | 2018 -> 2014 | 2388 -> 2386 | 11 -> 23 | 31092 -> 31090 | 23058 -> 23070 | 1187 -> 1183 | 997 -> 1011
+v009.crb ok enc=1 in=1x0 out=1x0 n=8 | 2585 -> 13050 | 695 -> 3600 | 251935157 -> 1259675830 | 1214 -> 6195 | 2081 -> 10530 | 3128 -> 15765 | 2279 -> 11440 | 3990 -> 19995
+v010.crb ok enc=1 in=1x0 out=1x0 n=8 | 144 -> 150 | 232 -> 238 | 67 -> 73 | 115 -> 121 | 190 -> 196 | 132 -> 138 | 11 -> 17 | 244 -> 250
+v011.crb ok enc=1 in=1x0 out=1x0 n=8 | 3122 -> 3115 | 30 -> 31 | 47182 -> 47183 | 4571 -> 4573 | 1274 -> 1275 | 20700 -> 20703 | 1040 -> 1035 | 6 -> 18446744073709551615
+v012.crb ok enc=1 in=1x0 out=1x0 n=8 | 2030 -> 2035 | 3348 -> 3345 | 1 -> 18446744073709551614 | 27 -> 32 | 997 -> 994 | 18 -> 15 | 1088660112 -> 1088660109 | 3951 -> 3948
+v013.crb ok enc=1 in=1x0 out=1x0 n=8 | 1105 -> 2263040 | 4230139349 -> 8663325386752 | 0 -> 0 | 2646 -> 5419008 | 4081 -> 8357888 | 2505 -> 5130240 | 3592 -> 7356416 | 2946 -> 6033408
+v014.crb ok enc=2 in=1x4 out=1x8 n=8 | 315 -> 317 | 2694176146 -> 2694176148 | 3024937241 -> 3024937243 | 311313056 -> 311313058 | 3963847823 -> 3963847825 | 1719237780 -> 1719237782 | 788439969 -> 788439971 | 14 -> 16
+v015.crb ok enc=1 in=1x0 out=1x0 n=8 | 1348 -> 10752 | 81 -> 616 | 11 -> 56 | 979037772 -> 7832302144 | 3286 -> 26256 | 3999 -> 31960 | 3363558290 -> 26908466288 | 1876873678 -> 15014989392
+v016.crb ok enc=2 in=1x4 out=1x8 n=8 | 3744 -> 3743 | 2973 -> 2964 | 1359 -> 1350 | 3732 -> 3731 | 2748 -> 2739 | 2319 -> 2310 | 1193 -> 1184 | 423 -> 422
+v017.crb ok enc=1 in=1x0 out=1x0 n=8 | 343 -> 210 | 2388 -> 82 | 72 -> 195 | 1144 -> 128 | 2131 -> 66 | 3934 -> 50 | 629596406 -> 39349960 | 481153699 -> 30072301
+v018.crb ok enc=2 in=1x4 out=1x8 n=8 | 2441 -> 2530 | 782859392 -> 3097 | 3416 -> 3377 | 1777 -> 1674 | 796 -> 893 | 3245372790 -> 1303 | 1743 -> 1704 | 1726 -> 1759
+v019.crb ok enc=1 in=1x0 out=1x0 n=8 | 61576 -> 1539400 | 40346 -> 1008650 | 1132 -> 28300 | 21 -> 525 | 19 -> 475 | 1288 -> 32200 | 46797 -> 1169925 | 35899 -> 897475
+v020.crb ok enc=1 in=1x0 out=1x0 n=8 | 20 -> 44 | 29 -> 53 | 2443 -> 2467 | 2 -> 26 | 27 -> 51 | 4370 -> 4394 | 440 -> 464 | 43553 -> 43577
+v021.crb ok enc=1 in=1x0 out=1x0 n=8 | 5 -> 9 | 1049 -> 1045 | 3539 -> 3543 | 1239 -> 1235 | 27644 -> 27640 | 2229 -> 2233 | 1753 -> 1749 | 40462 -> 40458
+v022.crb ok enc=1 in=1x0 out=1x0 n=8 | 85 -> 77 | 150 -> 166 | 202 -> 186 | 69 -> 189 | 0 -> 0 | 92 -> 252 | 204 -> 236 | 30 -> 238
+v023.crb ok enc=1 in=1x0 out=1x0 n=8 | 1978 -> 186 | 4 -> 20 | 23 -> 23 | 615 -> 119 | 1999 -> 223 | 32999 -> 247 | 1133 -> 125 | 502 -> 246
+v024.crb ok enc=1 in=1x0 out=1x0 n=8 | 3741 -> 3739 | 2 -> 2 | 2065 -> 2065 | 2249 -> 2249 | 2591 -> 2591 | 100 -> 100 | 30 -> 30 | 2041 -> 2041
+v025.crb ok enc=1 in=1x0 out=1x0 n=8 | 1477 -> 1479 | 222 -> 222 | 4 -> 4 | 3279 -> 3279 | 576 -> 64 | 8 -> 8 | 2769 -> 2771 | 860 -> 92
+v026.crb ok enc=1 in=1x0 out=1x0 n=8 | 24 -> 120 | 1753 -> 1745 | 469 -> 461 | 3782 -> 18910 | 308 -> 1540 | 21 -> 13 | 9 -> 1 | 27 -> 19
+v027.crb ok enc=1 in=1x0 out=1x0 n=8 | 42 -> 126 | 37982 -> 37976 | 3942 -> 11826 | 22614 -> 67842 | 1014 -> 3042 | 1573 -> 1567 | 1093 -> 1087 | 7 -> 1
+v028.crb ok enc=1 in=2x0 out=1x0 n=8 | 2041 2431 -> 30049 | 899 1998 -> 21584 | 1600 2457 -> 28519 | 1574 1137 -> 16535 | 162 29 -> 915 | 1788 3437 -> 38091 | 1349 3284 -> 34958 | 947 2751 -> 28553
+v029.crb ok enc=1 in=3x0 out=1x0 n=8 | 269 3440 996 -> 28785 | 1667 3806 1797 -> 33912 | 1244 1236 493 -> 11625 | 15 17 2959 -> 3110 | 1953 1647 688 -> 15817 | 4018 2044 1415 -> 21785 | 1233 2978 1886 -> 26943 | 1256 17 1211 -> 2603
+v030.crb ok enc=1 in=4x0 out=1x0 n=8 | 30 20 30 2426 -> 7420 | 1946 2004 1454 2011 -> 14907 | 1 1647 2415 1259 -> 11914 | 1 3139 951 3860 -> 19773 | 19 1857 8 3533 -> 14360 | 3606 1587 3440 1472 -> 18088 | 6 302 3199 31 -> 7113 | 8 30 1804 3628 -> 14572
+v031.crb ok enc=1 in=2x0 out=1x0 n=8 | 22179 2960 -> 153752 | 1017 888 -> 1032 | 2667 30805 -> 225104 | 55007 3032 -> 415800 | 29 181 -> 1216 | 2570 20 -> 20400 | 3606 1868 -> 13904 | 19 3796 -> 30216
+v032.crb ok enc=1 in=2x0 out=1x0 n=8 | 15 171 -> 30210 | 30 140 -> 21180 | 112 245 -> 73997 | 107 299 -> 102474 | 113 891 -> 810666 | 386 16 -> 150860 | 429 117 -> 199914 | 837 230 -> 757737
+v033.crb ok enc=1 in=3x0 out=1x0 n=8 | 13 593 690 -> 838286 | 748 706 171 -> 1100181 | 30 679 1023 -> 1522326 | 562 739 524 -> 1151141 | 28 826 864 -> 1443300 | 24 290 10 -> 87368 | 855 798 115 -> 1395198 | 170 226 858 -> 826172
+v034.crb ok enc=1 in=2x0 out=1x0 n=8 | 4 3273 -> 13112 | 11 623 -> 6901 | 7 1459 -> 10245 | 5 9 -> 69 | 3 1224 -> 3688 | 9 2473 -> 22297 | 2 3999 -> 8010 | 5 2139 -> 10719
+v035.crb ok enc=1 in=2x0 out=1x0 n=8 | 30834 35459 -> 1 | 388 3032 -> 4 | 29 12 -> 1 | 2549 56310 -> 1 | 3365 3147 -> 1 | 1548 1575 -> 9 | 1 3614 -> 1 | 2401 25 -> 1
+v036.crb ok enc=1 in=1x0 out=1x0 n=8 | 3 -> 298 | 10 -> 4893354 | 15 -> 5010795178 | 16 -> 20043180714 | 12 -> 78293674 | 2 -> 74 | 7 -> 76458 | 22 -> 82096868207274
+v037.crb ok enc=1 in=1x0 out=1x0 n=8 | 18 -> 21668995017 | 16 -> 1507527531 | 7 -> 9315 | 2 -> 12 | 11 -> 1924560 | 3 -> 45 | 15 -> 397629405 | 24 -> 64351596007521
+v038.crb ok enc=1 in=1x0 out=1x0 n=8 | 7 -> 53 | 31 -> 965 | 17 -> 293 | 21 -> 445 | 36 -> 1300 | 18 -> 328 | 11 -> 125 | 4 -> 20
+v039.crb ok enc=1 in=1x0 out=1x0 n=8 | 27 -> 0 | 183 -> 1 | 5 -> 0 | 165 -> 1 | 2 -> 1 | 25 -> 0 | 22 -> 0 | 33 -> 1
+v040.crb ok enc=1 in=1x0 out=1x0 n=8 | 2441 -> 0 | 2824 -> 0 | 766 -> 0 | 1658 -> 0 | 1107 -> 0 | 3159 -> 0 | 1 -> 0 | 1863 -> 0
+v041.crb ok enc=1 in=1x0 out=1x0 n=8 | 63370 -> 0 | 3836 -> 2 | 1819 -> 3 | 18 -> 2 | 2203 -> 3 | 3038 -> 2 | 3861 -> 2 | 1728 -> 3
+v042.crb ok enc=1 in=3x0 out=1x0 n=8 | 102 11 230 -> 2960 | 13 26 249 -> 829 | 34 99 26 -> 1496 | 67 77 187 -> 2372 | 154 247 57 -> 5267 | 167 49 51 -> 4596 | 8 252 250 -> 1835 | 13 64 50 -> 820
+v043.crb ok enc=1 in=5x0 out=1x0 n=8 | 217 14 162 235 93 -> 65193 | 237 23 36 120 174 -> 68494 | 7 218 9 3 24 -> 21044 | 46 225 107 180 208 -> 33936 | 140 202 229 91 148 -> 58064 | 203 179 172 92 26 -> 71690 | 4 162 212 17 21 -> 19993 | 73 214 63 189 130 -> 39398
+v044.crb ok enc=1 in=1x0 out=1x0 n=8 | 39 -> 9984 | 2448 -> 36873 | 3593 -> 2318 | 11451 -> 47916 | 3458 -> 33293 | 2 -> 512 | 59922 -> 4842 | 3639 -> 14094
+v045.crb ok enc=1 in=1x0 out=1x0 n=8 | 2039 -> 4144431104 | 3704 -> 2014183424 | 1872 -> 1342636032 | 157 -> 2634022912 | 3689 -> 1762525184 | 2559 -> 4278779904 | 23 -> 385875968 | 30 -> 503316480
+v046.crb ok enc=1 in=1x0 out=1x0 n=8 | 152 -> 25 | 182 -> 109 | 197 -> 163 | 49 -> 140 | 154 -> 89 | 33 -> 132 | 65 -> 130 | 163 -> 197
+v047.crb ok enc=1 in=1x0 out=1x0 n=8 | 10 -> 20480 | 2729 -> 38224 | 38507 -> 54889 | 3083 -> 53296 | 2645 -> 43600 | 0 -> 0 | 2599 -> 58448 | 2138 -> 23056
+v048.crb ok enc=1 in=1x0 out=1x0 n=8 | 3801 -> 40656 | 21475 -> 13285 | 3924 -> 20304 | 18 -> 8208 | 3221 -> 23696 | 27 -> 45072 | 958 -> 58288 | 4016 -> 4016
+v049.crb ok enc=1 in=1x0 out=1x0 n=8 | 1023 -> 11 | 3471 -> 9 | 595 -> 6 | 545 -> 4 | 2714 -> 7 | 1321 -> 6 | 2091 -> 6 | 11 -> 4
+v050.crb ok enc=1 in=1x0 out=1x0 n=8 | 1632244236 -> 13 | 1 -> 4 | 2771 -> 10 | 13 -> 6 | 23 -> 7 | 0 -> 3 | 2530 -> 9 | 493 -> 10
+v051.crb ok enc=1 in=1x0 out=1x0 n=8 | 1028 -> 41 | 2152 -> 37 | 16 -> 16 | 8 -> 8 | 1839 -> 6 | 1519 -> 15 | 15 -> 15 | 1109 -> 28
+v052.crb ok enc=1 in=1x0 out=1x0 n=8 | 9 -> 67 | 3427 -> 441 | 4081 -> 411 | 2561 -> 11 | 676 -> 128 | 13 -> 95 | 409 -> 307 | 8 -> 60
+v053.crb ok enc=1 in=1x0 out=1x0 n=8 | 15 -> 15 | 14 -> 14 | 246 -> 31 | 2057 -> 36 | 11629750 -> 13 | 141 -> 12 | 344 -> 0 | 2229 -> 36
+v054.crb ok enc=1 in=1x0 out=1x0 n=8 | 3275 -> 202 | 3 -> 26 | 23 -> 146 | 4079 -> 162 | 1026 -> 20 | 1607 -> 178 | 9595500 -> 144 | 858 -> 36
+v055.crb ok enc=1 in=1x0 out=1x0 n=8 | 7 -> 1 | 38 -> 2 | 49 -> 1 | 19 -> 1 | 5 -> 2 | 62 -> 1 | 10 -> 2 | 23 -> 1
+v056.crb ok enc=1 in=1x0 out=1x0 n=8 | 309 -> 1 | 231 -> 1 | 851 -> 1 | 611 -> 1 | 920 -> 1 | 107 -> 1 | 311 -> 1 | 153 -> 1
+v057.crb ok enc=1 in=1x0 out=1x0 n=6 | 8 -> 2470 | 3 -> 8 | 11 -> 2470 | 0 -> 3495 | 2 -> 36 | 10 -> 3494
+v058.crb ok enc=1 in=1x0 out=1x0 n=6 | 7 -> 65535 | 12 -> 65535 | 13 -> 65535 | 4 -> 65535 | 14 -> 65535 | 8 -> 65535
+v059.crb ok enc=1 in=1x0 out=1x0 n=8 | 1725 -> 15 | 366998 -> 41 | 642 -> 12 | 1945 -> 19 | 8 -> 8 | 1245 -> 12 | 952 -> 16 | 20 -> 2
+v060.crb ok enc=1 in=1x0 out=1x0 n=8 | 1687 -> 6765 | 180 -> 737 | 921 -> 3701 | 31 -> 141 | 191 -> 781 | 3369 -> 13493 | 55458 -> 221849 | 2991 -> 11981
+v061.crb ok enc=1 in=1x0 out=1x0 n=8 | 2012 -> 6049 | 31 -> 106 | 3752 -> 11269 | 843 -> 2542 | 1963 -> 5902 | 20 -> 73 | 5 -> 28 | 9 -> 40
+v062.crb ok enc=1 in=1x0 out=1x0 n=8 | 938 -> 21858 | 1061 -> 21229 | 3956 -> 22972 | 33168 -> 55128 | 3851 -> 22979 | 1133 -> 21157 | 2997 -> 23933 | 1284 -> 21452
+v063.crb ok enc=1 in=1x0 out=1x0 n=8 | 320 -> 0 | 285 -> 11 | 18 -> 14 | 1150 -> 2 | 3756 -> 4 | 3307 -> 13 | 2268 -> 4 | 1492 -> 12
+v064.crb ok enc=1 in=1x0 out=1x0 n=8 | 2967 -> 14 | 1808 -> 2 | 1581 -> 10 | 1365 -> 10 | 960507066 -> 6 | 642614747 -> 6 | 274 -> 6 | 0 -> 2
+v065.crb ok enc=1 in=1x0 out=1x0 n=8 | 26 -> 27 | 3971 -> 3 | 2941 -> 61 | 844 -> 13 | 2582 -> 23 | 1016 -> 57 | 17 -> 17 | 1820 -> 34
+v066.crb ok enc=1 in=1x0 out=1x0 n=8 | 4 -> 25 | 10 -> 55 | 20 -> 105 | 30 -> 155 | 1 -> 10 | 26 -> 135 | 25 -> 130 | 18 -> 95
+v067.crb ok enc=1 in=1x0 out=1x0 n=8 | 3059 -> 3 | 674 -> 2 | 407 -> 7 | 539 -> 11 | 27 -> 11 | 3971 -> 3 | 4003 -> 3 | 1354 -> 10
+v068.crb ok enc=1 in=1x0 out=1x0 n=8 | 30 -> 153 | 295 -> 1478 | 1 -> 8 | 210 -> 1053 | 24 -> 123 | 16 -> 83 | 361 -> 1808 | 12 -> 63
+v069.crb ok enc=1 in=1x0 out=1x0 n=8 | 1566 -> 150 | 59181 -> 225 | 3081 -> 45 | 30 -> 150 | 3074 -> 10 | 526 -> 70 | 2 -> 10 | 61469 -> 145
+v070.crb ok enc=1 in=1x0 out=1x0 n=8 | 811872346 -> 12388 | 2597952207 -> 39641 | 734800834 -> 11212 | 4131255859 -> 63037 | 2895752335 -> 44185 | 1067597720 -> 16290 | 3448556930 -> 52620 | 3164191887 -> 48281
+v071.crb ok enc=1 in=1x0 out=1x0 n=6 | 4 -> 18446744073709551611 | 2 -> 18446744073709551609 | 0 -> 18446744073709551607 | 1 -> 18446744073709551608 | 5 -> 18446744073709551612 | 3 -> 18446744073709551610
+v072.crb ok enc=1 in=1x0 out=1x0 n=8 | 2 -> 6 | 7 -> 7 | 5 -> 5 | 6 -> 6 | 4 -> 4 | 1 -> 5 | 3 -> 7 | 0 -> 4
+v073.crb ok enc=1 in=1x0 out=1x0 n=8 | 1 -> 7 | 5 -> 11 | 4 -> 10 | 0 -> 6 | 6 -> 12 | 3 -> 9 | 7 -> 13 | 2 -> 8
+v074.crb ok enc=1 in=1x0 out=1x0 n=12 | 1660 -> 1661 | 19608 -> 19609 | 2400 -> 2401 | 3468 -> 3469 | 22 -> 23 | 746 -> 747 | 2694 -> 2711 | 37293 -> 37294 | 212 -> 213 | 1322 -> 1323 | 60908 -> 60909 | 547 -> 548
+v075.crb ok enc=1 in=1x0 out=1x0 n=12 | 2951 -> 5944 | 31 -> 72 | 2636 -> 5314 | 26 -> 62 | 11 -> 64 | 2111 -> 4232 | 117 -> 244 | 2359 -> 4728 | 60722 -> 121454 | 1291 -> 2624 | 24 -> 58 | 14208 -> 28459
+v076.crb ok enc=1 in=1x0 out=1x0 n=2 | 17 -> 11 | 21 -> 15
+v077.crb ok enc=1 in=1x0 out=1x0 n=3 | 23 -> 23 | 10 -> 10 | 9 -> 11
+v078.crb ok enc=1 in=1x0 out=1x0 n=8 | 72 -> 565995 | 148 -> 1416021 | 37 -> 16740236 | 185 -> 6082036 | 232 -> 8375426 | 8 -> 10291487 | 109 -> 5043034 | 105 -> 1000834
+v079.crb ok enc=1 in=1x0 out=1x0 n=8 | 18 -> 29 | 2443 -> 2454 | 710 -> 717 | 9 -> 20 | 275 -> 286 | 3517 -> 3524 | 27008 -> 27015 | 25 -> 36
+v080.crb ok enc=1 in=1x0 out=1x0 n=8 | 6 -> 3 | 4018 -> 4015 | 31 -> 28 | 27 -> 24 | 21752 -> 21749 | 38854 -> 38851 | 2417 -> 2414 | 613 -> 610
+v081.crb ok enc=1 in=1x0 out=1x0 n=8 | 6 -> 12 | 1390 -> 8316 | 3834 -> 22980 | 4052 -> 24288 | 7880 -> 47256 | 45367 -> 272178 | 2418 -> 14484 | 3489 -> 20910
+v082.crb ok enc=1 in=1x0 out=1x0 n=8 | 30 -> 120 | 19 -> 76 | 1174 -> 4696 | 169 -> 676 | 1733 -> 6932 | 13 -> 52 | 25 -> 100 | 3851 -> 15404
+v083.crb ok enc=1 in=1x0 out=1x0 n=8 | 1457 -> 175 | 3129 -> 55 | 2323 -> 17 | 12 -> 10 | 11 -> 9 | 432 -> 174 | 2662 -> 100 | 20215 -> 245
+v084.crb ok enc=1 in=1x0 out=1x0 n=8 | 3453 -> 13828 | 960 -> 3856 | 576 -> 2320 | 3351 -> 13420 | 439 -> 1772 | 26966 -> 107880 | 1795 -> 7196 | 2171 -> 8700
+v085.crb ok enc=1 in=1x0 out=1x0 n=8 | 44 -> 88 | 2840 -> 5680 | 2502 -> 5004 | 3325 -> 6650 | 3681 -> 7362 | 28 -> 56 | 25992 -> 2832 | 31946 -> 6548
+v086.crb ok enc=1 in=1x0 out=1x0 n=8 | 3996 -> 26 | 2394 -> 24 | 380 -> 58 | 19 -> 17 | 1771 -> 41 | 325 -> 3 | 21 -> 19 | 54285 -> 11
+v087.crb ok enc=1 in=1x0 out=1x0 n=8 | 2926 -> 12 | 1396 -> 8 | 789 -> 10 | 406 -> 12 | 24436 -> 8 | 1633 -> 2 | 4061 -> 10 | 3652 -> 8
+v088.crb ok enc=1 in=1x0 out=1x0 n=8 | 31 -> 93 | 2936 -> 8808 | 821 -> 2463 | 3603 -> 10809 | 3096 -> 9288 | 44137 -> 9531 | 3511 -> 10533 | 50783 -> 4893
+v089.crb ok enc=1 in=1x0 out=1x0 n=8 | 59899 -> 2564 | 16128 -> 3849 | 738 -> 747 | 3801 -> 3810 | 2067 -> 2076 | 798 -> 807 | 60492 -> 3157 | 952 -> 961
+v090.crb ok enc=1 in=1x0 out=1x0 n=8 | 1306 -> 2630 | 19910 -> 39838 | 5749 -> 11516 | 18 -> 54 | 1866 -> 3750 | 3908 -> 7834 | 3395 -> 6808 | 2910 -> 5838
+v091.crb ok enc=1 in=1x0 out=1x0 n=8 | 16 -> 20 | 1539 -> 1547 | 2916 -> 2924 | 26 -> 34 | 3 -> 11 | 1766 -> 1770 | 3153 -> 3161 | 1109 -> 1113
+v092.crb ok enc=1 in=1x0 out=1x0 n=8 | 49163 -> 294936 | 2978 -> 17826 | 367 -> 2160 | 22349 -> 134052 | 560 -> 3318 | 29 -> 132 | 2393 -> 14316 | 1836 -> 10974
+v093.crb ok enc=1 in=1x0 out=1x0 n=8 | 3918 -> 93936 | 14 -> 240 | 9 -> 120 | 1598 -> 38256 | 826 -> 19728 | 2595 -> 62184 | 1585 -> 37944 | 34513 -> 828216
+v094.crb ok enc=1 in=1x0 out=1x0 n=8 | 428 -> 174 | 60713 -> 162 | 21706 -> 38 | 7 -> 26 | 12 -> 46 | 27 -> 106 | 43865 -> 98 | 3275 -> 42
+v095.crb ok enc=1 in=1x0 out=1x0 n=8 | 3581 -> 1020 | 9 -> 44 | 19 -> 84 | 2792 -> 936 | 3933 -> 380 | 23 -> 100 | 719 -> 836 | 8 -> 40
+v096.crb ok enc=1 in=1x0 out=1x0 n=8 | 2196 -> 1216 | 19 -> 184 | 0 -> 32 | 3676 -> 4864 | 141 -> 1160 | 2375 -> 2648 | 897 -> 7208 | 3000 -> 7648
+v097.crb ok enc=1 in=1x0 out=1x0 n=8 | 29 -> 56 | 22 -> 42 | 41 -> 16 | 1 -> 0 | 3330 -> 2 | 3139 -> 4 | 14970 -> 50 | 3766 -> 42
+v098.crb ok enc=1 in=1x0 out=1x0 n=8 | 5 -> 6 | 1913 -> 14 | 19769 -> 14 | 2026 -> 0 | 361 -> 14 | 205 -> 6 | 3907 -> 2 | 2101 -> 6
+v099.crb ok enc=1 in=1x0 out=1x0 n=8 | 2994 -> 12 | 19 -> 18 | 1379 -> 18 | 31353 -> 6 | 8 -> 0 | 1 -> 6 | 22 -> 36 | 41698 -> 12
+v100.crb ok enc=1 in=1x0 out=1x0 n=8 | 3613 -> 2656 | 43273 -> 2852 | 3687 -> 2878 | 65461 -> 3880 | 2369 -> 3020 | 2492 -> 3389 | 3966 -> 3715 | 3625 -> 2692
+v101.crb ok enc=1 in=1x0 out=1x0 n=8 | 3839 -> 7714 | 1979 -> 3994 | 901 -> 1838 | 55990 -> 5520 | 179 -> 394 | 1240 -> 2516 | 211 -> 458 | 642 -> 1320
+v102.crb ok enc=1 in=1x0 out=1x0 n=8 | 1029 -> 2087 | 23 -> 71 | 3475 -> 6975 | 39 -> 103 | 1902 -> 3829 | 298 -> 621 | 2762 -> 5549 | 13953 -> 27935
+v103.crb ok enc=1 in=1x0 out=1x0 n=8 | 48425 -> 290592 | 3576 -> 21474 | 43529 -> 261216 | 2426 -> 14598 | 2939 -> 17676 | 1508 -> 9090 | 31592 -> 189570 | 8 -> 66
+v104.crb ok enc=1 in=1x0 out=1x0 n=8 | 1500 -> 5988 | 21102 -> 84396 | 20 -> 68 | 966 -> 3852 | 3743 -> 14960 | 2654 -> 10604 | 1041 -> 4152 | 4086 -> 16332
+v105.crb ok enc=1 in=1x0 out=1x0 n=8 | 1 -> 236 | 1462 -> 42 | 578 -> 114 | 652 -> 46 | 17036 -> 46 | 305 -> 12 | 1553 -> 76 | 1901 -> 116
+v106.crb ok enc=1 in=1x0 out=1x0 n=8 | 1201 -> 19232 | 58 -> 944 | 1415 -> 22656 | 20 -> 336 | 46837 -> 749408 | 3474 -> 55600 | 7 -> 128 | 49942 -> 799088
+v107.crb ok enc=1 in=1x0 out=1x0 n=8 | 692 -> 356 | 3309 -> 470 | 36582 -> 456 | 5 -> 6 | 63668 -> 356 | 732 -> 436 | 18 -> 32 | 1164 -> 276
+v108.crb ok enc=1 in=1x0 out=1x0 n=8 | 4041 -> 50 | 887 -> 42 | 8 -> 46 | 3431 -> 42 | 88 -> 46 | 3996 -> 62 | 2592 -> 14 | 18 -> 22
+v109.crb ok enc=1 in=1x0 out=1x0 n=8 | 568 -> 0 | 3864 -> 0 | 3981 -> 4 | 3940 -> 0 | 45006 -> 8 | 2613 -> 4 | 2036 -> 0 | 1951 -> 12
+v110.crb ok enc=1 in=1x0 out=1x0 n=8 | 46448 -> 138 | 2035 -> 147 | 3816 -> 114 | 1273 -> 165 | 30 -> 84 | 3057 -> 141 | 2508 -> 30 | 3401 -> 21
+v111.crb ok enc=1 in=1x0 out=1x0 n=8 | 1886 -> 21 | 18054 -> 21 | 4081 -> 11 | 2155 -> 15 | 23 -> 23 | 37102 -> 21 | 4050 -> 13 | 1483 -> 15
+v112.crb ok enc=1 in=1x0 out=1x0 n=8 | 3659 -> 21972 | 289 -> 1752 | 63772 -> 14010 | 2307 -> 13860 | 16196 -> 23466 | 33371 -> 3636 | 750 -> 4518 | 2868 -> 17226
+v113.crb ok enc=1 in=1x0 out=1x0 n=8 | 24 -> 44 | 66 -> 86 | 31984 -> 3332 | 32226 -> 3574 | 20112 -> 3748 | 19 -> 39 | 883 -> 903 | 190 -> 206
+v114.crb ok enc=1 in=1x0 out=1x0 n=8 | 17469 -> 34953 | 1811 -> 3637 | 14308 -> 28631 | 2219 -> 4453 | 41673 -> 83361 | 3987 -> 7989 | 2 -> 19 | 7715 -> 15445
+v115.crb ok enc=1 in=1x0 out=1x0 n=8 | 231 -> 1386 | 3121 -> 18750 | 3890 -> 23364 | 3461 -> 20766 | 3396 -> 20400 | 373 -> 2238 | 64663 -> 387978 | 24334 -> 146004
+v116.crb ok enc=1 in=1x0 out=1x0 n=8 | 170 -> 680 | 29866 -> 680 | 630 -> 872 | 2975 -> 504 | 3104 -> 520 | 25708 -> 712 | 21 -> 344 | 30 -> 488
+v117.crb ok enc=1 in=1x0 out=1x0 n=8 | 2136 -> 12 | 1266 -> 4 | 3231 -> 8 | 1950 -> 4 | 1 -> 0 | 3363 -> 8 | 3 -> 8 | 1491 -> 8
+v118.crb ok enc=1 in=1x0 out=1x0 n=8 | 923 -> 5574 | 2818 -> 560 | 1697 -> 2026 | 2602 -> 7456 | 4095 -> 8222 | 1694 -> 2008 | 5566 -> 664 | 1364 -> 8220
+v119.crb ok enc=1 in=1x0 out=1x0 n=8 | 2133 -> 736 | 1809 -> 6368 | 1516 -> 4024 | 48549 -> 3424 | 38500 -> 4984 | 31 -> 304 | 5 -> 96 | 29913 -> 1824
+v120.crb ok enc=1 in=1x0 out=1x0 n=8 | 15 -> 8 | 12 -> 5 | 500 -> 45 | 11831 -> 48 | 1006 -> 39 | 1 -> 58 | 3986 -> 11 | 2943 -> 56
+v121.crb ok enc=1 in=1x0 out=1x0 n=8 | 8819 -> 0 | 3054 -> 0 | 1813 -> 0 | 2645 -> 0 | 2223 -> 0 | 2628 -> 0 | 0 -> 0 | 3205 -> 0
+v122.crb ok enc=1 in=1x0 out=1x0 n=8 | 11904 -> 133 | 17271 -> 106 | 3810 -> 171 | 15476 -> 101 | 241 -> 220 | 4 -> 21 | 2323 -> 66 | 8 -> 29
diff --git a/tests/crumbline/vectors/v001.crb b/tests/crumbline/vectors/v001.crb
new file mode 100644
index 000000000..8b8f9a506
Binary files /dev/null and b/tests/crumbline/vectors/v001.crb differ
diff --git a/tests/crumbline/vectors/v002.crb b/tests/crumbline/vectors/v002.crb
new file mode 100644
index 000000000..01d69e7ea
Binary files /dev/null and b/tests/crumbline/vectors/v002.crb differ
diff --git a/tests/crumbline/vectors/v003.crb b/tests/crumbline/vectors/v003.crb
new file mode 100644
index 000000000..93c925289
Binary files /dev/null and b/tests/crumbline/vectors/v003.crb differ
diff --git a/tests/crumbline/vectors/v004.crb b/tests/crumbline/vectors/v004.crb
new file mode 100644
index 000000000..c6a750f8d
Binary files /dev/null and b/tests/crumbline/vectors/v004.crb differ
diff --git a/tests/crumbline/vectors/v005.crb b/tests/crumbline/vectors/v005.crb
new file mode 100644
index 000000000..9d7e9dbde
Binary files /dev/null and b/tests/crumbline/vectors/v005.crb differ
diff --git a/tests/crumbline/vectors/v006.crb b/tests/crumbline/vectors/v006.crb
new file mode 100644
index 000000000..9796338ef
Binary files /dev/null and b/tests/crumbline/vectors/v006.crb differ
diff --git a/tests/crumbline/vectors/v007.crb b/tests/crumbline/vectors/v007.crb
new file mode 100644
index 000000000..de2546492
Binary files /dev/null and b/tests/crumbline/vectors/v007.crb differ
diff --git a/tests/crumbline/vectors/v008.crb b/tests/crumbline/vectors/v008.crb
new file mode 100644
index 000000000..1b5c48cc8
Binary files /dev/null and b/tests/crumbline/vectors/v008.crb differ
diff --git a/tests/crumbline/vectors/v009.crb b/tests/crumbline/vectors/v009.crb
new file mode 100644
index 000000000..fbbf39891
Binary files /dev/null and b/tests/crumbline/vectors/v009.crb differ
diff --git a/tests/crumbline/vectors/v010.crb b/tests/crumbline/vectors/v010.crb
new file mode 100644
index 000000000..52062a8f8
Binary files /dev/null and b/tests/crumbline/vectors/v010.crb differ
diff --git a/tests/crumbline/vectors/v011.crb b/tests/crumbline/vectors/v011.crb
new file mode 100644
index 000000000..77f1af93c
Binary files /dev/null and b/tests/crumbline/vectors/v011.crb differ
diff --git a/tests/crumbline/vectors/v012.crb b/tests/crumbline/vectors/v012.crb
new file mode 100644
index 000000000..3662f3184
Binary files /dev/null and b/tests/crumbline/vectors/v012.crb differ
diff --git a/tests/crumbline/vectors/v013.crb b/tests/crumbline/vectors/v013.crb
new file mode 100644
index 000000000..1f92b479b
Binary files /dev/null and b/tests/crumbline/vectors/v013.crb differ
diff --git a/tests/crumbline/vectors/v014.crb b/tests/crumbline/vectors/v014.crb
new file mode 100644
index 000000000..58cd00ef9
Binary files /dev/null and b/tests/crumbline/vectors/v014.crb differ
diff --git a/tests/crumbline/vectors/v015.crb b/tests/crumbline/vectors/v015.crb
new file mode 100644
index 000000000..77da07e66
Binary files /dev/null and b/tests/crumbline/vectors/v015.crb differ
diff --git a/tests/crumbline/vectors/v016.crb b/tests/crumbline/vectors/v016.crb
new file mode 100644
index 000000000..3d2d4ba4c
Binary files /dev/null and b/tests/crumbline/vectors/v016.crb differ
diff --git a/tests/crumbline/vectors/v017.crb b/tests/crumbline/vectors/v017.crb
new file mode 100644
index 000000000..9759b5965
Binary files /dev/null and b/tests/crumbline/vectors/v017.crb differ
diff --git a/tests/crumbline/vectors/v018.crb b/tests/crumbline/vectors/v018.crb
new file mode 100644
index 000000000..dcb4510eb
Binary files /dev/null and b/tests/crumbline/vectors/v018.crb differ
diff --git a/tests/crumbline/vectors/v019.crb b/tests/crumbline/vectors/v019.crb
new file mode 100644
index 000000000..28fee31a4
Binary files /dev/null and b/tests/crumbline/vectors/v019.crb differ
diff --git a/tests/crumbline/vectors/v020.crb b/tests/crumbline/vectors/v020.crb
new file mode 100644
index 000000000..cb9e2c70e
Binary files /dev/null and b/tests/crumbline/vectors/v020.crb differ
diff --git a/tests/crumbline/vectors/v021.crb b/tests/crumbline/vectors/v021.crb
new file mode 100644
index 000000000..6f81a9a05
Binary files /dev/null and b/tests/crumbline/vectors/v021.crb differ
diff --git a/tests/crumbline/vectors/v022.crb b/tests/crumbline/vectors/v022.crb
new file mode 100644
index 000000000..cf6429dc4
Binary files /dev/null and b/tests/crumbline/vectors/v022.crb differ
diff --git a/tests/crumbline/vectors/v023.crb b/tests/crumbline/vectors/v023.crb
new file mode 100644
index 000000000..7013ae2da
Binary files /dev/null and b/tests/crumbline/vectors/v023.crb differ
diff --git a/tests/crumbline/vectors/v024.crb b/tests/crumbline/vectors/v024.crb
new file mode 100644
index 000000000..be54a0e0c
Binary files /dev/null and b/tests/crumbline/vectors/v024.crb differ
diff --git a/tests/crumbline/vectors/v025.crb b/tests/crumbline/vectors/v025.crb
new file mode 100644
index 000000000..c7ba033e6
Binary files /dev/null and b/tests/crumbline/vectors/v025.crb differ
diff --git a/tests/crumbline/vectors/v026.crb b/tests/crumbline/vectors/v026.crb
new file mode 100644
index 000000000..e8f1b3c35
Binary files /dev/null and b/tests/crumbline/vectors/v026.crb differ
diff --git a/tests/crumbline/vectors/v027.crb b/tests/crumbline/vectors/v027.crb
new file mode 100644
index 000000000..e9bc7cfb6
Binary files /dev/null and b/tests/crumbline/vectors/v027.crb differ
diff --git a/tests/crumbline/vectors/v028.crb b/tests/crumbline/vectors/v028.crb
new file mode 100644
index 000000000..bd1649585
Binary files /dev/null and b/tests/crumbline/vectors/v028.crb differ
diff --git a/tests/crumbline/vectors/v029.crb b/tests/crumbline/vectors/v029.crb
new file mode 100644
index 000000000..13c3167d6
Binary files /dev/null and b/tests/crumbline/vectors/v029.crb differ
diff --git a/tests/crumbline/vectors/v030.crb b/tests/crumbline/vectors/v030.crb
new file mode 100644
index 000000000..b52065a91
Binary files /dev/null and b/tests/crumbline/vectors/v030.crb differ
diff --git a/tests/crumbline/vectors/v031.crb b/tests/crumbline/vectors/v031.crb
new file mode 100644
index 000000000..e377115a8
Binary files /dev/null and b/tests/crumbline/vectors/v031.crb differ
diff --git a/tests/crumbline/vectors/v032.crb b/tests/crumbline/vectors/v032.crb
new file mode 100644
index 000000000..79e42089b
Binary files /dev/null and b/tests/crumbline/vectors/v032.crb differ
diff --git a/tests/crumbline/vectors/v033.crb b/tests/crumbline/vectors/v033.crb
new file mode 100644
index 000000000..fe161b83f
Binary files /dev/null and b/tests/crumbline/vectors/v033.crb differ
diff --git a/tests/crumbline/vectors/v034.crb b/tests/crumbline/vectors/v034.crb
new file mode 100644
index 000000000..82839775f
Binary files /dev/null and b/tests/crumbline/vectors/v034.crb differ
diff --git a/tests/crumbline/vectors/v035.crb b/tests/crumbline/vectors/v035.crb
new file mode 100644
index 000000000..a29b523e4
Binary files /dev/null and b/tests/crumbline/vectors/v035.crb differ
diff --git a/tests/crumbline/vectors/v036.crb b/tests/crumbline/vectors/v036.crb
new file mode 100644
index 000000000..174c1b702
Binary files /dev/null and b/tests/crumbline/vectors/v036.crb differ
diff --git a/tests/crumbline/vectors/v037.crb b/tests/crumbline/vectors/v037.crb
new file mode 100644
index 000000000..a63495d6a
Binary files /dev/null and b/tests/crumbline/vectors/v037.crb differ
diff --git a/tests/crumbline/vectors/v038.crb b/tests/crumbline/vectors/v038.crb
new file mode 100644
index 000000000..57420f983
Binary files /dev/null and b/tests/crumbline/vectors/v038.crb differ
diff --git a/tests/crumbline/vectors/v039.crb b/tests/crumbline/vectors/v039.crb
new file mode 100644
index 000000000..8bbb1277f
Binary files /dev/null and b/tests/crumbline/vectors/v039.crb differ
diff --git a/tests/crumbline/vectors/v040.crb b/tests/crumbline/vectors/v040.crb
new file mode 100644
index 000000000..f68ef79dd
Binary files /dev/null and b/tests/crumbline/vectors/v040.crb differ
diff --git a/tests/crumbline/vectors/v041.crb b/tests/crumbline/vectors/v041.crb
new file mode 100644
index 000000000..9196a75ba
Binary files /dev/null and b/tests/crumbline/vectors/v041.crb differ
diff --git a/tests/crumbline/vectors/v042.crb b/tests/crumbline/vectors/v042.crb
new file mode 100644
index 000000000..b557d70da
Binary files /dev/null and b/tests/crumbline/vectors/v042.crb differ
diff --git a/tests/crumbline/vectors/v043.crb b/tests/crumbline/vectors/v043.crb
new file mode 100644
index 000000000..2c98b73c4
Binary files /dev/null and b/tests/crumbline/vectors/v043.crb differ
diff --git a/tests/crumbline/vectors/v044.crb b/tests/crumbline/vectors/v044.crb
new file mode 100644
index 000000000..c486dec34
Binary files /dev/null and b/tests/crumbline/vectors/v044.crb differ
diff --git a/tests/crumbline/vectors/v045.crb b/tests/crumbline/vectors/v045.crb
new file mode 100644
index 000000000..feea22724
Binary files /dev/null and b/tests/crumbline/vectors/v045.crb differ
diff --git a/tests/crumbline/vectors/v046.crb b/tests/crumbline/vectors/v046.crb
new file mode 100644
index 000000000..0a869c72a
Binary files /dev/null and b/tests/crumbline/vectors/v046.crb differ
diff --git a/tests/crumbline/vectors/v047.crb b/tests/crumbline/vectors/v047.crb
new file mode 100644
index 000000000..f1d8f4082
Binary files /dev/null and b/tests/crumbline/vectors/v047.crb differ
diff --git a/tests/crumbline/vectors/v048.crb b/tests/crumbline/vectors/v048.crb
new file mode 100644
index 000000000..3fa683ad3
Binary files /dev/null and b/tests/crumbline/vectors/v048.crb differ
diff --git a/tests/crumbline/vectors/v049.crb b/tests/crumbline/vectors/v049.crb
new file mode 100644
index 000000000..a7db04a12
Binary files /dev/null and b/tests/crumbline/vectors/v049.crb differ
diff --git a/tests/crumbline/vectors/v050.crb b/tests/crumbline/vectors/v050.crb
new file mode 100644
index 000000000..98a86b8ed
Binary files /dev/null and b/tests/crumbline/vectors/v050.crb differ
diff --git a/tests/crumbline/vectors/v051.crb b/tests/crumbline/vectors/v051.crb
new file mode 100644
index 000000000..3e3f49345
Binary files /dev/null and b/tests/crumbline/vectors/v051.crb differ
diff --git a/tests/crumbline/vectors/v052.crb b/tests/crumbline/vectors/v052.crb
new file mode 100644
index 000000000..0ab6bad1f
Binary files /dev/null and b/tests/crumbline/vectors/v052.crb differ
diff --git a/tests/crumbline/vectors/v053.crb b/tests/crumbline/vectors/v053.crb
new file mode 100644
index 000000000..a9c8ae9f7
Binary files /dev/null and b/tests/crumbline/vectors/v053.crb differ
diff --git a/tests/crumbline/vectors/v054.crb b/tests/crumbline/vectors/v054.crb
new file mode 100644
index 000000000..b892efbbe
Binary files /dev/null and b/tests/crumbline/vectors/v054.crb differ
diff --git a/tests/crumbline/vectors/v055.crb b/tests/crumbline/vectors/v055.crb
new file mode 100644
index 000000000..d7b2be3d2
Binary files /dev/null and b/tests/crumbline/vectors/v055.crb differ
diff --git a/tests/crumbline/vectors/v056.crb b/tests/crumbline/vectors/v056.crb
new file mode 100644
index 000000000..61a7aaeb0
Binary files /dev/null and b/tests/crumbline/vectors/v056.crb differ
diff --git a/tests/crumbline/vectors/v057.crb b/tests/crumbline/vectors/v057.crb
new file mode 100644
index 000000000..88dad986d
Binary files /dev/null and b/tests/crumbline/vectors/v057.crb differ
diff --git a/tests/crumbline/vectors/v058.crb b/tests/crumbline/vectors/v058.crb
new file mode 100644
index 000000000..7d6a72e30
Binary files /dev/null and b/tests/crumbline/vectors/v058.crb differ
diff --git a/tests/crumbline/vectors/v059.crb b/tests/crumbline/vectors/v059.crb
new file mode 100644
index 000000000..a5c266d15
Binary files /dev/null and b/tests/crumbline/vectors/v059.crb differ
diff --git a/tests/crumbline/vectors/v060.crb b/tests/crumbline/vectors/v060.crb
new file mode 100644
index 000000000..087224f38
Binary files /dev/null and b/tests/crumbline/vectors/v060.crb differ
diff --git a/tests/crumbline/vectors/v061.crb b/tests/crumbline/vectors/v061.crb
new file mode 100644
index 000000000..d2aa1ffb5
Binary files /dev/null and b/tests/crumbline/vectors/v061.crb differ
diff --git a/tests/crumbline/vectors/v062.crb b/tests/crumbline/vectors/v062.crb
new file mode 100644
index 000000000..64802fa5c
Binary files /dev/null and b/tests/crumbline/vectors/v062.crb differ
diff --git a/tests/crumbline/vectors/v063.crb b/tests/crumbline/vectors/v063.crb
new file mode 100644
index 000000000..c2a285cbc
Binary files /dev/null and b/tests/crumbline/vectors/v063.crb differ
diff --git a/tests/crumbline/vectors/v064.crb b/tests/crumbline/vectors/v064.crb
new file mode 100644
index 000000000..3989f61df
Binary files /dev/null and b/tests/crumbline/vectors/v064.crb differ
diff --git a/tests/crumbline/vectors/v065.crb b/tests/crumbline/vectors/v065.crb
new file mode 100644
index 000000000..da73c3e82
Binary files /dev/null and b/tests/crumbline/vectors/v065.crb differ
diff --git a/tests/crumbline/vectors/v066.crb b/tests/crumbline/vectors/v066.crb
new file mode 100644
index 000000000..05138c03e
Binary files /dev/null and b/tests/crumbline/vectors/v066.crb differ
diff --git a/tests/crumbline/vectors/v067.crb b/tests/crumbline/vectors/v067.crb
new file mode 100644
index 000000000..16f95ab4c
Binary files /dev/null and b/tests/crumbline/vectors/v067.crb differ
diff --git a/tests/crumbline/vectors/v068.crb b/tests/crumbline/vectors/v068.crb
new file mode 100644
index 000000000..e61b144cf
Binary files /dev/null and b/tests/crumbline/vectors/v068.crb differ
diff --git a/tests/crumbline/vectors/v069.crb b/tests/crumbline/vectors/v069.crb
new file mode 100644
index 000000000..dcc18181b
Binary files /dev/null and b/tests/crumbline/vectors/v069.crb differ
diff --git a/tests/crumbline/vectors/v070.crb b/tests/crumbline/vectors/v070.crb
new file mode 100644
index 000000000..f1fa699e5
Binary files /dev/null and b/tests/crumbline/vectors/v070.crb differ
diff --git a/tests/crumbline/vectors/v071.crb b/tests/crumbline/vectors/v071.crb
new file mode 100644
index 000000000..3bdd952e1
Binary files /dev/null and b/tests/crumbline/vectors/v071.crb differ
diff --git a/tests/crumbline/vectors/v072.crb b/tests/crumbline/vectors/v072.crb
new file mode 100644
index 000000000..dfd26b4a8
Binary files /dev/null and b/tests/crumbline/vectors/v072.crb differ
diff --git a/tests/crumbline/vectors/v073.crb b/tests/crumbline/vectors/v073.crb
new file mode 100644
index 000000000..a3b12901e
Binary files /dev/null and b/tests/crumbline/vectors/v073.crb differ
diff --git a/tests/crumbline/vectors/v074.crb b/tests/crumbline/vectors/v074.crb
new file mode 100644
index 000000000..defd0a91e
Binary files /dev/null and b/tests/crumbline/vectors/v074.crb differ
diff --git a/tests/crumbline/vectors/v075.crb b/tests/crumbline/vectors/v075.crb
new file mode 100644
index 000000000..c2d9a5ba0
Binary files /dev/null and b/tests/crumbline/vectors/v075.crb differ
diff --git a/tests/crumbline/vectors/v076.crb b/tests/crumbline/vectors/v076.crb
new file mode 100644
index 000000000..2c65fba4c
Binary files /dev/null and b/tests/crumbline/vectors/v076.crb differ
diff --git a/tests/crumbline/vectors/v077.crb b/tests/crumbline/vectors/v077.crb
new file mode 100644
index 000000000..ea24402f3
Binary files /dev/null and b/tests/crumbline/vectors/v077.crb differ
diff --git a/tests/crumbline/vectors/v078.crb b/tests/crumbline/vectors/v078.crb
new file mode 100644
index 000000000..42ea41b28
Binary files /dev/null and b/tests/crumbline/vectors/v078.crb differ
diff --git a/tests/crumbline/vectors/v079.crb b/tests/crumbline/vectors/v079.crb
new file mode 100644
index 000000000..0c96316d6
Binary files /dev/null and b/tests/crumbline/vectors/v079.crb differ
diff --git a/tests/crumbline/vectors/v080.crb b/tests/crumbline/vectors/v080.crb
new file mode 100644
index 000000000..07cc598ec
Binary files /dev/null and b/tests/crumbline/vectors/v080.crb differ
diff --git a/tests/crumbline/vectors/v081.crb b/tests/crumbline/vectors/v081.crb
new file mode 100644
index 000000000..078f13c87
Binary files /dev/null and b/tests/crumbline/vectors/v081.crb differ
diff --git a/tests/crumbline/vectors/v082.crb b/tests/crumbline/vectors/v082.crb
new file mode 100644
index 000000000..c20049c63
Binary files /dev/null and b/tests/crumbline/vectors/v082.crb differ
diff --git a/tests/crumbline/vectors/v083.crb b/tests/crumbline/vectors/v083.crb
new file mode 100644
index 000000000..ae1d30398
Binary files /dev/null and b/tests/crumbline/vectors/v083.crb differ
diff --git a/tests/crumbline/vectors/v084.crb b/tests/crumbline/vectors/v084.crb
new file mode 100644
index 000000000..e931299fb
Binary files /dev/null and b/tests/crumbline/vectors/v084.crb differ
diff --git a/tests/crumbline/vectors/v085.crb b/tests/crumbline/vectors/v085.crb
new file mode 100644
index 000000000..25cc32db7
Binary files /dev/null and b/tests/crumbline/vectors/v085.crb differ
diff --git a/tests/crumbline/vectors/v086.crb b/tests/crumbline/vectors/v086.crb
new file mode 100644
index 000000000..83b558c54
Binary files /dev/null and b/tests/crumbline/vectors/v086.crb differ
diff --git a/tests/crumbline/vectors/v087.crb b/tests/crumbline/vectors/v087.crb
new file mode 100644
index 000000000..0f022695a
Binary files /dev/null and b/tests/crumbline/vectors/v087.crb differ
diff --git a/tests/crumbline/vectors/v088.crb b/tests/crumbline/vectors/v088.crb
new file mode 100644
index 000000000..d7f31f44e
Binary files /dev/null and b/tests/crumbline/vectors/v088.crb differ
diff --git a/tests/crumbline/vectors/v089.crb b/tests/crumbline/vectors/v089.crb
new file mode 100644
index 000000000..401e13d66
Binary files /dev/null and b/tests/crumbline/vectors/v089.crb differ
diff --git a/tests/crumbline/vectors/v090.crb b/tests/crumbline/vectors/v090.crb
new file mode 100644
index 000000000..ea7f36298
Binary files /dev/null and b/tests/crumbline/vectors/v090.crb differ
diff --git a/tests/crumbline/vectors/v091.crb b/tests/crumbline/vectors/v091.crb
new file mode 100644
index 000000000..33a712d1e
Binary files /dev/null and b/tests/crumbline/vectors/v091.crb differ
diff --git a/tests/crumbline/vectors/v092.crb b/tests/crumbline/vectors/v092.crb
new file mode 100644
index 000000000..5fc0d73d1
Binary files /dev/null and b/tests/crumbline/vectors/v092.crb differ
diff --git a/tests/crumbline/vectors/v093.crb b/tests/crumbline/vectors/v093.crb
new file mode 100644
index 000000000..15c0551fe
Binary files /dev/null and b/tests/crumbline/vectors/v093.crb differ
diff --git a/tests/crumbline/vectors/v094.crb b/tests/crumbline/vectors/v094.crb
new file mode 100644
index 000000000..d9f356eef
Binary files /dev/null and b/tests/crumbline/vectors/v094.crb differ
diff --git a/tests/crumbline/vectors/v095.crb b/tests/crumbline/vectors/v095.crb
new file mode 100644
index 000000000..7c53c8d17
Binary files /dev/null and b/tests/crumbline/vectors/v095.crb differ
diff --git a/tests/crumbline/vectors/v096.crb b/tests/crumbline/vectors/v096.crb
new file mode 100644
index 000000000..6a9dd43f0
Binary files /dev/null and b/tests/crumbline/vectors/v096.crb differ
diff --git a/tests/crumbline/vectors/v097.crb b/tests/crumbline/vectors/v097.crb
new file mode 100644
index 000000000..6ee37a288
Binary files /dev/null and b/tests/crumbline/vectors/v097.crb differ
diff --git a/tests/crumbline/vectors/v098.crb b/tests/crumbline/vectors/v098.crb
new file mode 100644
index 000000000..f018c04d7
Binary files /dev/null and b/tests/crumbline/vectors/v098.crb differ
diff --git a/tests/crumbline/vectors/v099.crb b/tests/crumbline/vectors/v099.crb
new file mode 100644
index 000000000..c7d93a024
Binary files /dev/null and b/tests/crumbline/vectors/v099.crb differ
diff --git a/tests/crumbline/vectors/v100.crb b/tests/crumbline/vectors/v100.crb
new file mode 100644
index 000000000..273d45e28
Binary files /dev/null and b/tests/crumbline/vectors/v100.crb differ
diff --git a/tests/crumbline/vectors/v101.crb b/tests/crumbline/vectors/v101.crb
new file mode 100644
index 000000000..e295a80bb
Binary files /dev/null and b/tests/crumbline/vectors/v101.crb differ
diff --git a/tests/crumbline/vectors/v102.crb b/tests/crumbline/vectors/v102.crb
new file mode 100644
index 000000000..9519dfa92
Binary files /dev/null and b/tests/crumbline/vectors/v102.crb differ
diff --git a/tests/crumbline/vectors/v103.crb b/tests/crumbline/vectors/v103.crb
new file mode 100644
index 000000000..bd03b3176
Binary files /dev/null and b/tests/crumbline/vectors/v103.crb differ
diff --git a/tests/crumbline/vectors/v104.crb b/tests/crumbline/vectors/v104.crb
new file mode 100644
index 000000000..48d20801f
Binary files /dev/null and b/tests/crumbline/vectors/v104.crb differ
diff --git a/tests/crumbline/vectors/v105.crb b/tests/crumbline/vectors/v105.crb
new file mode 100644
index 000000000..fa182675b
Binary files /dev/null and b/tests/crumbline/vectors/v105.crb differ
diff --git a/tests/crumbline/vectors/v106.crb b/tests/crumbline/vectors/v106.crb
new file mode 100644
index 000000000..deac6aa19
Binary files /dev/null and b/tests/crumbline/vectors/v106.crb differ
diff --git a/tests/crumbline/vectors/v107.crb b/tests/crumbline/vectors/v107.crb
new file mode 100644
index 000000000..6d96549df
Binary files /dev/null and b/tests/crumbline/vectors/v107.crb differ
diff --git a/tests/crumbline/vectors/v108.crb b/tests/crumbline/vectors/v108.crb
new file mode 100644
index 000000000..e0483d95e
Binary files /dev/null and b/tests/crumbline/vectors/v108.crb differ
diff --git a/tests/crumbline/vectors/v109.crb b/tests/crumbline/vectors/v109.crb
new file mode 100644
index 000000000..7e50d9d3c
Binary files /dev/null and b/tests/crumbline/vectors/v109.crb differ
diff --git a/tests/crumbline/vectors/v110.crb b/tests/crumbline/vectors/v110.crb
new file mode 100644
index 000000000..bedc960ed
Binary files /dev/null and b/tests/crumbline/vectors/v110.crb differ
diff --git a/tests/crumbline/vectors/v111.crb b/tests/crumbline/vectors/v111.crb
new file mode 100644
index 000000000..a4be8367c
Binary files /dev/null and b/tests/crumbline/vectors/v111.crb differ
diff --git a/tests/crumbline/vectors/v112.crb b/tests/crumbline/vectors/v112.crb
new file mode 100644
index 000000000..6c7779196
Binary files /dev/null and b/tests/crumbline/vectors/v112.crb differ
diff --git a/tests/crumbline/vectors/v113.crb b/tests/crumbline/vectors/v113.crb
new file mode 100644
index 000000000..34380cbc3
Binary files /dev/null and b/tests/crumbline/vectors/v113.crb differ
diff --git a/tests/crumbline/vectors/v114.crb b/tests/crumbline/vectors/v114.crb
new file mode 100644
index 000000000..0269b5b2d
Binary files /dev/null and b/tests/crumbline/vectors/v114.crb differ
diff --git a/tests/crumbline/vectors/v115.crb b/tests/crumbline/vectors/v115.crb
new file mode 100644
index 000000000..8f43dcaf8
Binary files /dev/null and b/tests/crumbline/vectors/v115.crb differ
diff --git a/tests/crumbline/vectors/v116.crb b/tests/crumbline/vectors/v116.crb
new file mode 100644
index 000000000..022a811ba
Binary files /dev/null and b/tests/crumbline/vectors/v116.crb differ
diff --git a/tests/crumbline/vectors/v117.crb b/tests/crumbline/vectors/v117.crb
new file mode 100644
index 000000000..e0929c58d
Binary files /dev/null and b/tests/crumbline/vectors/v117.crb differ
diff --git a/tests/crumbline/vectors/v118.crb b/tests/crumbline/vectors/v118.crb
new file mode 100644
index 000000000..6647f9a71
Binary files /dev/null and b/tests/crumbline/vectors/v118.crb differ
diff --git a/tests/crumbline/vectors/v119.crb b/tests/crumbline/vectors/v119.crb
new file mode 100644
index 000000000..977cee5c7
Binary files /dev/null and b/tests/crumbline/vectors/v119.crb differ
diff --git a/tests/crumbline/vectors/v120.crb b/tests/crumbline/vectors/v120.crb
new file mode 100644
index 000000000..dc7f11fda
Binary files /dev/null and b/tests/crumbline/vectors/v120.crb differ
diff --git a/tests/crumbline/vectors/v121.crb b/tests/crumbline/vectors/v121.crb
new file mode 100644
index 000000000..f7609f321
Binary files /dev/null and b/tests/crumbline/vectors/v121.crb differ
diff --git a/tests/crumbline/vectors/v122.crb b/tests/crumbline/vectors/v122.crb
new file mode 100644
index 000000000..f33aa9e27
Binary files /dev/null and b/tests/crumbline/vectors/v122.crb differ
diff --git a/tools/crumbline_learner.c b/tools/crumbline_learner.c
new file mode 100644
index 000000000..e4c24e8ba
--- /dev/null
+++ b/tools/crumbline_learner.c
@@ -0,0 +1,294 @@
+/*
+ * crumbline_learner.c -- Omega as a Crumbline learner.
+ *
+ * A standalone process that speaks the crumbs learner protocol v1 on
+ * stdin/stdout (see crumbs/src/protocol.rs). It links only learner-side code:
+ * the Crumb v1 visible reader, Omega's program/realization/verification
+ * stack, the synthesis vocabulary, OmegaLibrary and the Crumbline search. It
+ * contains no generator, sealed record, held-out set or label of any kind,
+ * and everything it can know arrives as protocol frames.
+ *
+ * Modes:
+ *   crumbline-learner                 serve the protocol on stdin/stdout
+ *   crumbline-learner --decode FILE   decode a visible crumb file and print its shape
+ */
+#include "crumbline/cl_crumb.h"
+#include "crumbline/cl_program.h"
+#include "crumbline/cl_search.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+enum {
+    FT_HELLO = 0x01,
+    FT_CRUMB = 0x02,
+    FT_VERDICT = 0x03,
+    FT_ADMIT = 0x04,
+    FT_SHUTDOWN = 0x05,
+    FT_READY = 0x81,
+    FT_BANK = 0x82,
+    FT_SUBMIT = 0x83,
+    FT_EVENTS = 0x84,
+    FT_DONE = 0x85,
+};
+
+#define MAX_FRAME (1u << 24)
+#define EVENT_BYTES 20
+#define EVENT_BATCH 4096
+
+static int read_all(int fd, uint8_t *p, size_t n) {
+    while (n) {
+        ssize_t r = read(fd, p, n);
+        if (r < 0 && errno == EINTR) continue;
+        if (r <= 0) return -1;
+        p += r;
+        n -= (size_t)r;
+    }
+    return 0;
+}
+
+static int write_all(int fd, const uint8_t *p, size_t n) {
+    while (n) {
+        ssize_t r = write(fd, p, n);
+        if (r < 0 && errno == EINTR) continue;
+        if (r <= 0) return -1;
+        p += r;
+        n -= (size_t)r;
+    }
+    return 0;
+}
+
+static int send_frame(uint8_t type, const uint8_t *payload, size_t len) {
+    uint8_t hdr[5] = {type, (uint8_t)len, (uint8_t)(len >> 8), (uint8_t)(len >> 16), (uint8_t)(len >> 24)};
+    if (write_all(1, hdr, 5) != 0) return -1;
+    return len ? write_all(1, payload, len) : 0;
+}
+
+/* Returns frame type, or -1. *buf is malloc'd (caller frees). */
+static int recv_frame(uint8_t **buf, size_t *len) {
+    uint8_t hdr[5];
+    if (read_all(0, hdr, 5) != 0) return -1;
+    uint32_t n = (uint32_t)hdr[1] | (uint32_t)hdr[2] << 8 | (uint32_t)hdr[3] << 16 | (uint32_t)hdr[4] << 24;
+    if (n > MAX_FRAME) return -1;
+    *buf = malloc(n ? n : 1);
+    if (!*buf) return -1;
+    if (n && read_all(0, *buf, n) != 0) {
+        free(*buf);
+        return -1;
+    }
+    *len = n;
+    return hdr[0];
+}
+
+/* ---- event batching ---------------------------------------------------- */
+
+typedef struct {
+    uint8_t buf[4 + EVENT_BATCH * EVENT_BYTES];
+    uint32_t count;
+    int failed;
+} EventBatch;
+
+static void flush_events(EventBatch *b) {
+    if (b->count == 0) return;
+    b->buf[0] = (uint8_t)b->count;
+    b->buf[1] = (uint8_t)(b->count >> 8);
+    b->buf[2] = (uint8_t)(b->count >> 16);
+    b->buf[3] = (uint8_t)(b->count >> 24);
+    if (send_frame(FT_EVENTS, b->buf, 4 + (size_t)b->count * EVENT_BYTES) != 0) b->failed = 1;
+    b->count = 0;
+}
+
+static void emit_event(void *ctx, const ClEvent *ev) {
+    EventBatch *b = ctx;
+    ClWriter w;
+    cl_w_init(&w, b->buf + 4 + (size_t)b->count * EVENT_BYTES, EVENT_BYTES);
+    cl_w_u8(&w, ev->kind);
+    cl_w_u8(&w, ev->prune);
+    cl_w_u8(&w, ev->verify);
+    cl_w_u8(&w, ev->fit);
+    cl_w_u16(&w, ev->op_index);
+    cl_w_u32(&w, ev->parent);
+    cl_w_u32(&w, ev->child);
+    cl_w_u32(&w, ev->exec_cost);
+    cl_w_u16(&w, ev->oracle_index);
+    b->count++;
+    if (b->count == EVENT_BATCH) flush_events(b);
+}
+
+/* ---- oracle over the protocol ----------------------------------------- */
+
+static int oracle_submit(void *ctx, uint32_t node, const ClSteps *cand, uint8_t flags, uint8_t hyp, uint8_t *verdict) {
+    EventBatch *b = ctx;
+    flush_events(b);
+    uint8_t buf[16 + 7 + CL_MAX_STEPS * 9];
+    ClWriter w;
+    cl_w_init(&w, buf, sizeof(buf));
+    cl_w_u32(&w, node);
+    cl_w_u8(&w, flags);
+    cl_w_u8(&w, hyp);
+    if (cl_steps_encode_cpg1(cand, &w) != 0) return -1;
+    if (send_frame(FT_SUBMIT, buf, w.len) != 0) return -1;
+    uint8_t *p = NULL;
+    size_t n = 0;
+    int t = recv_frame(&p, &n);
+    if (t != FT_VERDICT || n != 1) {
+        free(p);
+        return -1;
+    }
+    *verdict = p[0];
+    free(p);
+    return 0;
+}
+
+static int send_bank(const ClBank *bank) {
+    size_t cap = 4 + bank->count * (5 + 7 + CL_MAX_STEPS * 9);
+    uint8_t *buf = malloc(cap);
+    if (!buf) return -1;
+    ClWriter w;
+    cl_w_init(&w, buf, cap);
+    cl_w_u32(&w, (uint32_t)bank->count);
+    for (size_t i = 0; i < bank->count; ++i) {
+        cl_w_u8(&w, bank->ops[i].origin);
+        cl_w_u32(&w, bank->ops[i].op_ref);
+        cl_steps_encode_cpg1(&bank->ops[i].steps, &w);
+    }
+    int rc = w.overflow ? -1 : send_frame(FT_BANK, buf, w.len);
+    free(buf);
+    return rc;
+}
+
+static int send_done(const ClSearchResult *r) {
+    uint8_t buf[1 + 4 + 12 * 4 + 16];
+    ClWriter w;
+    cl_w_init(&w, buf, sizeof(buf));
+    cl_w_u8(&w, r->outcome);
+    cl_w_u32(&w, r->solution_node);
+    uint32_t f[12] = {r->generated,      r->evaluated,       r->expansions,     r->pruned_equiv,
+                      r->pruned_cost,    r->pruned_cap,      r->visible_fits,   r->verify_failures,
+                      r->oracle_queries, r->oracle_rejections, r->candidates_to_solution, r->hypotheses_at_first_submit};
+    for (int i = 0; i < 12; ++i) cl_w_u32(&w, f[i]);
+    cl_w_u64(&w, r->exec_count);
+    cl_w_u64(&w, r->wall_ns);
+    return send_frame(FT_DONE, buf, w.len);
+}
+
+static int serve(void) {
+    ClSearchConfig cfg;
+    cl_search_default_config(&cfg);
+    bool library_enabled = false;
+    ClLearnerLibrary *lib = calloc(1, sizeof(*lib));
+    ClCrumb *crumb = calloc(1, sizeof(*crumb));
+    ClBank *bank = calloc(1, sizeof(*bank));
+    EventBatch *batch = calloc(1, sizeof(*batch));
+    if (!lib || !crumb || !bank || !batch || cl_library_init(lib) != 0) return 3;
+
+    for (;;) {
+        uint8_t *p = NULL;
+        size_t n = 0;
+        int t = recv_frame(&p, &n);
+        if (t < 0) return 2;
+        ClReader r;
+        cl_r_init(&r, p, n);
+        int rc = 0;
+        switch (t) {
+            case FT_HELLO: {
+                if (cl_r_u16(&r) != 1) {
+                    rc = -1;
+                    break;
+                }
+                library_enabled = cl_r_u8(&r) != 0;
+                cfg.max_candidates = cl_r_u32(&r);
+                cfg.max_depth = cl_r_u32(&r);
+                cfg.frontier_cap = cl_r_u32(&r);
+                cfg.max_oracle_queries = cl_r_u32(&r);
+                cfg.ambiguity_scan = cl_r_u32(&r);
+                cfg.robust_min_pct = cl_r_u32(&r);
+                if (!cl_r_done(&r)) {
+                    rc = -1;
+                    break;
+                }
+                uint8_t ready[2] = {1, 0};
+                rc = send_frame(FT_READY, ready, 2);
+                break;
+            }
+            case FT_ADMIT: {
+                uint32_t op_ref = cl_r_u32(&r);
+                uint8_t scope = cl_r_u8(&r);
+                ClSteps steps;
+                if (cl_steps_decode_cpg1(&r, &steps) != 0 || !cl_r_done(&r)) {
+                    rc = -1;
+                    break;
+                }
+                /* A learner without reuse ignores admissions (control condition). */
+                if (library_enabled) cl_library_admit(lib, &steps, scope, op_ref);
+                break;
+            }
+            case FT_CRUMB: {
+                ClSearchResult res;
+                memset(&res, 0, sizeof(res));
+                if (cl_crumb_decode(p, n, crumb) != CL_CRUMB_OK) {
+                    res.outcome = CL_OUTCOME_UNSUPPORTED;
+                    res.solution_node = UINT32_MAX;
+                    rc = send_bank(bank) != 0 || send_done(&res) != 0 ? -1 : 0;
+                    break;
+                }
+                cl_bank_init_base(bank);
+                if (library_enabled) cl_library_export(lib, cl_crumb_input_bits(crumb), bank);
+                if (send_bank(bank) != 0) {
+                    rc = -1;
+                    break;
+                }
+                ClOracle oracle = {oracle_submit, batch};
+                ClEventSink sink = {emit_event, batch};
+                batch->count = 0;
+                if (cl_search_run(crumb, bank, &cfg, &oracle, &sink, &res) != 0) res.outcome = CL_OUTCOME_UNSOLVED;
+                flush_events(batch);
+                rc = (batch->failed || send_done(&res) != 0) ? -1 : 0;
+                break;
+            }
+            case FT_SHUTDOWN:
+                free(p);
+                cl_library_destroy(lib);
+                return 0;
+            default:
+                rc = -1;
+        }
+        free(p);
+        if (rc != 0) return 2;
+    }
+}
+
+static int decode_file(const char *path) {
+    FILE *f = fopen(path, "rb");
+    if (!f) return 1;
+    static uint8_t buf[1 << 20];
+    size_t n = fread(buf, 1, sizeof(buf), f);
+    fclose(f);
+    ClCrumb *c = calloc(1, sizeof(*c));
+    int rc = cl_crumb_decode(buf, n, c);
+    if (rc != CL_CRUMB_OK) {
+        printf("decode-error %d\n", rc);
+        free(c);
+        return 1;
+    }
+    printf("ok enc=%u in=%ux%u out=%ux%u n=%u", c->encoding, c->in_arity, c->in_lane_bytes, c->out_arity,
+           c->out_lane_bytes, c->n);
+    for (uint32_t i = 0; i < c->n; ++i) {
+        printf(" |");
+        for (uint8_t l = 0; l < c->in_arity; ++l) printf(" %llu", (unsigned long long)c->in[i][l]);
+        printf(" ->");
+        for (uint8_t l = 0; l < c->out_arity; ++l) printf(" %llu", (unsigned long long)c->out[i][l]);
+    }
+    printf("\n");
+    free(c);
+    return 0;
+}
+
+int main(int argc, char **argv) {
+    if (argc == 3 && strcmp(argv[1], "--decode") == 0) return decode_file(argv[2]);
+    if (argc != 1) return 64;
+    return serve();
+}