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/train/aien-train/native/si19/omexp.om # 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 / train / aien-train / native / si19 / omexp.om` 797 lines ยท 14703 bytes Raw Blame History 1 note SPDX-License-Identifier: AGPL-3.0-only 2 note aien-train#24 ORIG-1: omexp-v1 experience records of the Omega matvec realization 3 note chooser (docs/si19/ORIG1-CONTRACT.md). Reader, admission checks, typed features, 4 note partitions and the deterministic baselines. No training here; no execution authority. 5 note RB raw record bytes (at most 2048 records of 256 bytes); RW decoded words, record r 6 note word i at r*32+i; RC: 0 records admitted, 1 bytes, 2 FNV-1a 64 of the bytes, 3 last 7 note status, 4..8 records per family 0..4; XF the 12 state features of the last oxfeat 8 note call in 1/16 units; LB the allow-list text (hashes with AUTHORIZED/SYNTHETIC/REVOKED). 9 note v2 admission (docs/si19/ORIG1-CONTRACT-v2.md, oxadm2): RC[9] = 1, RA per-record code 10 note (0 admitted, negative reason), RS per-record split (0 TRAIN, 1 VALIDATION, 2 HELD-OUT, 11 note 3 refused), RQ refusal counts by reason (RQ[0] admitted, RQ[k] reason -k). AU: audit. 12 global RB uchar 524288 13 global RW ulong 65536 14 global RC ulong 16 15 global XF long 12 16 global LB uchar 4100 17 global RA long 2048 18 global RS uchar 2048 19 global RQ ulong 32 20 global AU ulong 32 21 22 fn oxlg16 v ulong to ulong 23 note floor(log2 v)*16 plus a truncated 4-bit fraction; 0 for v = 0. 24 if eq v 0 25 ret 0 26 end 27 e = ulong 0 28 q = v 29 while gt q 1 bound 64 30 q = shr q 1 31 e = add e 1 32 end 33 ret sub add shr shl v 4 e mul 16 e 16 34 end 35 36 fn oxget pos ulong to ulong 37 v = ulong 0 38 for i ulong 8 39 v = or v shl ulong get RB add pos i mul i 8 40 end 41 ret v 42 end 43 44 fn oxword r ulong i ulong to ulong 45 ret get RW add mul r 32 i 46 end 47 48 fn oxfam r ulong to ulong 49 ret oxword r 2 50 end 51 52 fn oxcore r ulong to ulong 53 ret oxword r 3 54 end 55 56 fn oxpress r ulong to ulong 57 ret oxword r 4 58 end 59 60 fn oxm r ulong to ulong 61 ret oxword r 5 62 end 63 64 fn oxn r ulong to ulong 65 ret oxword r 6 66 end 67 68 fn oxseq r ulong to ulong 69 ret oxword r 14 70 end 71 72 fn oxpart r ulong to ulong 73 note v1: family 0 TRAIN, 1 DEV, 2..4 TEST. v2 (RC[9] = 1): the record's workload-family 74 note split from oxadm2, 3 for a refused record (never in any partition). 75 if eq get RC 9 1 76 ret ulong get RS r 77 end 78 f = oxfam r 79 if gt f 1 80 ret 2 81 end 82 ret f 83 end 84 85 fn oxcache core ulong to ulong 86 note Last private cache per core class (contract s.1). 87 if eq core 0 88 ret `2097152` 89 end 90 if eq core 1 91 ret 524288 92 end 93 ret `1048576` 94 end 95 96 fn oxchk1 r ulong to int 97 note Header, enumerations, shape and profile words of one record. 98 if ne oxword r 0 `3553143591248351811` 99 ret -2 100 end 101 if ne oxword r 1 1 102 ret -2 103 end 104 if or gt oxfam r 4 gt oxcore r 2 105 ret -3 106 end 107 k = oxword r 13 108 if or gt oxpress r 15 or eq k 0 gt k 8 109 ret -3 110 end 111 m = oxm r 112 n = oxn r 113 if or or eq m 0 gt m 8192 or eq n 0 gt n 8192 114 ret -4 115 end 116 if eq oxword r 7 0 117 ret -4 118 end 119 if ne oxword r 10 oxcache oxcore r 120 ret -9 121 end 122 if ne oxword r 9 mul add add mul m n m n 8 123 ret -9 124 end 125 ret 0 126 end 127 128 fn oxchk2 r ulong to int 129 note Eligible mask, measurements, verified flags and the mismatch word. 130 k = oxword r 13 131 e = oxword r 12 132 if eq and e 1 0 133 ret -5 134 end 135 if ge e shl 1 k 136 ret -5 137 end 138 for a ulong k 139 if ne and shr e a 1 0 140 if eq oxword r add 16 a 0 141 ret -6 142 end 143 if ne oxword r add 24 a 1 144 ret -6 145 end 146 end 147 end 148 if ne oxword r 31 0 149 ret -7 150 end 151 ret 0 152 end 153 154 fn oxleak n ulong to int 155 note A TEST-H1 shape key present in TRAIN or DEV is held-out contamination. 156 for r ulong n 157 if eq oxfam r 2 158 for q ulong n 159 if lt oxfam q 2 160 if and eq oxm q oxm r eq oxn q oxn r 161 ret -11 162 end 163 end 164 end 165 end 166 end 167 ret 0 168 end 169 170 fn oxfnv n ulong to ulong 171 note FNV-1a 64 over RB[0..n): the dataset identity for the allow-list and lineage. 172 h = ulong `14695981039346656037` 173 for i ulong n 174 h = mul xor h ulong get RB i `1099511628211` 175 end 176 ret h 177 end 178 179 fn oxload n ulong to int 180 note Decode and admit RB[0..n). Nothing is admitted on refusal. 181 put RC 0 0 182 put RC 3 0 183 put RC 9 0 184 if or eq n 0 or ne rem n 256 0 gt n 524288 185 put RC 3 wsenc -1 186 ret -1 187 end 188 c = div n 256 189 for r ulong c 190 for i ulong 32 191 put RW add mul r 32 i oxget add mul r 256 mul i 8 192 end 193 end 194 for r ulong c 195 s = oxchk1 r 196 if ge s 0 197 s = oxchk2 r 198 end 199 if lt s 0 200 put RC 3 wsenc long s 201 ret s 202 end 203 if gt r 0 204 if le oxseq r oxseq sub r 1 205 put RC 3 wsenc -8 206 ret -8 207 end 208 end 209 end 210 s = oxleak c 211 if lt s 0 212 put RC 3 wsenc long s 213 ret s 214 end 215 for f ulong 5 216 put RC add 4 f 0 217 end 218 for r ulong c 219 f = add 4 oxfam r 220 put RC f add get RC f 1 221 end 222 put RC 0 c 223 put RC 1 n 224 put RC 2 oxfnv n 225 ret 0 226 end 227 228 fn oxdigit p ulong to bool 229 b = get LB p 230 ret and ge b 48 le b 57 231 end 232 233 fn oxline p ulong n ulong to ulong 234 note Position after the end of the line that starts at p. 235 while lt p n bound 4096 236 if eq get LB p 10 237 ret add p 1 238 end 239 p = add p 1 240 end 241 ret n 242 end 243 244 fn oxstatus p ulong n ulong to int 245 note The status token at p: first letter and length decide; -13 when malformed. 246 q = p 247 go = true 248 while and go lt q n bound 4096 249 b = get LB q 250 if or eq b 32 eq b 10 251 go = false 252 else 253 q = add q 1 254 end 255 end 256 k = sub q p 257 b = get LB p 258 if and eq b 65 eq k 10 259 ret 1 260 end 261 if and eq b 83 eq k 9 262 ret 2 263 end 264 if and eq b 82 eq k 7 265 ret -12 266 end 267 ret -13 268 end 269 270 fn oxallow n ulong h ulong to int 271 note Lines "