Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/src/synapse/syn_layout.lst # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / src / synapse / syn_layout.lst` 136 lines ยท 4967 bytes Raw Blame History 1 # Synapse binary codec v2 port (ADR 0003 section 9 step 33, J1): the one list every workspace offset and 2 # constant of syn_codec.osc is generated from (syn_gen.sh). Format: NAME VALUE (decimal; text after '#' is a 3 # comment). Cells are u64. The specification is synapse docs/J1_OMEGA_CODEC.md and the Rust codec 4 # (synapse crates/synapse-store/src/codec.rs); the corpus tests/synapse/j1-corpus/corpus.bin pins it. 5 6 # --- ABI header --- 7 ABI_MAGIC `1398361674` # 0x53594E4A "SYNJ" 8 ABI_VERSION 1 9 W_MAGIC 0 10 W_VERSION 1 11 W_CELLS 2 # exact workspace length in cells 12 W_ENTRY 3 # 1 WAL record, 2 checkpoint content 13 W_MODE 4 # 1 decode (bytes -> logical form), 2 encode (logical form -> bytes) 14 W_CAP 5 # record cap (decode); a checkpoint content's cap is its own length 15 W_CKSEQ 6 # checkpoint_seq (checkpoint decode and encode) 16 W_ERR 7 # result: 0 accepted, else a refusal kind below 17 W_ERR_AT 8 18 W_ERR_X 9 19 W_ERR_Y 10 20 W_ERR_FIELD 11 21 W_POS 12 # reader cursor (absolute input offset) 22 W_END 13 # end of the region being read 23 W_BASE 14 # refusal offsets are relative to this (a nested revision record) 24 W_CORE 15 # depth inside embedded synapse-core encodings 25 W_LF 16 # logical-form cursor (encode) 26 W_LF_N 17 # logical-form length: written by decode, given to encode 27 W_OUT 18 # encoded length (encode) 28 W_LF_BASE 19 # logical-form region (cells) 29 W_LF_CAP 20 30 W_OUT_BASE 21 # output region (one byte per cell) 31 W_OUT_CAP 22 32 W_EMB_AT 23 # length-prefix offset of the open embedded synapse-core encoding 33 W_EMB_F 24 # its refusal field id 34 W_KHAS 25 # a previous map key exists (checkpoint order check) 35 W_KPREV 26 # stream offset of the previous map entry 36 W_HDR 32 # header cells; regions start at or after this 37 38 MODE_DECODE 1 39 MODE_ENCODE 2 40 ENTRY_RECORD 1 41 ENTRY_CHECKPOINT 2 42 CODEC_V2 2 43 INPUT_MAX `1000000` # LIMIT above this many input bytes or logical-form cells (loop bound) 44 LOOP_MAX `1000000` 45 46 # --- Rust layout sizes the record decoder's reservation check uses (size_of::(); corpus header) --- 47 SZ_ATTACHMENT 88 48 SZ_MUTATION 72 49 SZ_REVIEW 64 50 SZ_STRING 24 51 52 # --- refusal kinds: 1..9 are CodecRefusal in declaration order --- 53 R_TRUNCATED 1 54 R_OVER_CAP 2 55 R_TRAILING 3 56 R_TAG 4 57 R_UTF8 5 58 R_VERSION 6 59 R_NOT_CANON 7 60 R_REPO 8 61 R_EMBEDDED 9 62 # encode refusals (the logical form is not a value the Rust types can hold) 63 R_LF_TYPE 20 64 R_LF_END 21 65 R_LF_VALUE 22 66 R_LF_UTF8 23 67 R_LF_REPO 24 68 R_OUT_FULL 25 69 R_LF_TRAILING 26 70 R_LF_ORDER 27 71 R_ABI 30 72 R_LIMIT 31 73 R_LF_FULL 32 74 # internal: a refusal inside an embedded synapse-core encoding, converted to R_EMBEDDED when it closes 75 R_CORE_VERSION 98 76 R_CORE 99 77 C_MALFORMED 1 # EnvelopeMalformed 78 C_VERSION 2 # EnvelopeVersionUnsupported 79 80 # --- refusal field ids (corpus field table order) --- 81 F_BOOL 1 82 F_OPTION 2 83 F_MUTOP 3 84 F_FMODE 4 85 F_KIND 5 86 F_ENV2 6 87 F_CHAIN 7 88 F_MARKER 8 89 F_CHANGESETS 9 90 F_IDEM 10 91 F_BLOBS 11 92 F_PROJ 12 93 F_CANON 13 94 F_REVS 14 95 F_REVKIND 15 96 97 # --- logical-form token types; a token is a header cell type | len << 8, then len cells --- 98 T_U16 2 99 T_U64 4 100 T_BOOL 5 101 T_TAG 6 102 T_FIX 7 103 T_STR 8 104 T_BYTES 9 105 T_REPO 10 106 T_COUNT 11 107 108 # --- checkpoint key kinds (cmpkey) --- 109 K_FIX32 1 110 K_STR 2 111 K_STRFIX 3 112 K_U64 4 113 114 # --- field descriptors (precomputed: OSC literals take their type from context) --- 115 D_FIX16 4103 # T_FIX | 16 << 8 116 D_FIX20 5127 # T_FIX | 20 << 8 117 D_FIX32 8199 # T_FIX | 32 << 8 118 D_FIX64 16391 # T_FIX | 64 << 8 119 D_STR 8 # T_STR (WAL string, capped by W_CAP) 120 D_BYTES 9 # T_BYTES 121 D_PATH 524296 # T_STR, core cap 2048 (path) 122 D_INTENT `1048584` # T_STR, core cap 4096 (intent summary) 123 D_REPO 32778 # T_REPO, core cap 128 124 D_U16 514 # T_U16, 2 bytes 125 D_U64 2052 # T_U64, 8 bytes 126 D_BOOL `83951617` # field 1, tags 0..1, type 5 127 D_OPTION `100728834` # field 2, tags 0..1, type 6 128 D_MUTOP `100794627` # field 3, tags 1..2, type 6 129 D_FMODE `100860164` # field 4, tags 1..3, type 6 130 D_KIND `101187845` # field 5, tags 1..8, type 6 131 D_CHAIN `185598208` # field 0, tags 1..16, type 11 132 H_COUNT 267 # T_COUNT | 1 << 8 133 KF_REVKIND 3844 # R_TAG | F_REVKIND << 8 134 EMB_CORE 0 # emb_open: the inner content length of an envelope v2 (synapse-core rules) 135 EMB_REV 255 # emb_open: a checkpoint revision record (WAL byte run, offsets restart at 0) 136 MASK20 `1048575` # 20-bit field of an emb_open save word; syn_gen.sh refuses INPUT_MAX > MASK20