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/om/meaning/test/vectors # 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 / om / meaning / test / vectors` 230 lines ยท 7261 bytes Raw Blame History 1 # om/meaning/test/vectors: input of om/meaning/test/driver.om (record formats in the driver header). 2 # Expected values: K table, coefficient lines (K) and the counting argument come from Wolfram Language 3 # evaluations quoted in spec/program-identity.md section 9; program_id goldens (I) are the C goldens of 4 # tests/language/golden/v0.txt lines 24 and 27. Programs are numbered in order of their D lines. 5 # 6 # 0..3 x+1+1, x+2, 2+x, x+3 (w 64) 7 D 64 x 1 add 1 add 8 D 64 x 2 add 9 D 64 2 x add 10 D 64 x 3 add 11 # 4..7 x(x+1), x*x+x, x(x+1) + 2^63 x(x-1) (2^63 x(x-1) is a null polynomial mod 2^64), x^2 12 D 64 x x 1 add mul 13 D 64 x x mul x add 14 D 64 x x 1 add mul 0x8000000000000000 x mul x 1 sub mul add 15 D 64 x x mul 16 # 8 x(x-1)...(x-65) (66 factors: divisible by 66!, v2(66!) = 64), 9 the constant 0, 17 # 10 x(x-1)...(x-64) (65 factors: v2(65!) = 63, nonzero at x = 65) 18 D 64 x x 1 sub mul x 2 sub mul x 3 sub mul x 4 sub mul x 5 sub mul x 6 sub mul x 7 sub mul x 8 sub mul x 9 sub mul x 10 sub mul x 11 sub mul x 12 sub mul x 13 sub mul x 14 sub mul x 15 sub mul x 16 sub mul x 17 sub mul x 18 sub mul x 19 sub mul x 20 sub mul x 21 sub mul x 22 sub mul x 23 sub mul x 24 sub mul x 25 sub mul x 26 sub mul x 27 sub mul x 28 sub mul x 29 sub mul x 30 sub mul x 31 sub mul x 32 sub mul x 33 sub mul x 34 sub mul x 35 sub mul x 36 sub mul x 37 sub mul x 38 sub mul x 39 sub mul x 40 sub mul x 41 sub mul x 42 sub mul x 43 sub mul x 44 sub mul x 45 sub mul x 46 sub mul x 47 sub mul x 48 sub mul x 49 sub mul x 50 sub mul x 51 sub mul x 52 sub mul x 53 sub mul x 54 sub mul x 55 sub mul x 56 sub mul x 57 sub mul x 58 sub mul x 59 sub mul x 60 sub mul x 61 sub mul x 62 sub mul x 63 sub mul x 64 sub mul x 65 sub mul 19 D 64 0 20 D 64 x x 1 sub mul x 2 sub mul x 3 sub mul x 4 sub mul x 5 sub mul x 6 sub mul x 7 sub mul x 8 sub mul x 9 sub mul x 10 sub mul x 11 sub mul x 12 sub mul x 13 sub mul x 14 sub mul x 15 sub mul x 16 sub mul x 17 sub mul x 18 sub mul x 19 sub mul x 20 sub mul x 21 sub mul x 22 sub mul x 23 sub mul x 24 sub mul x 25 sub mul x 26 sub mul x 27 sub mul x 28 sub mul x 29 sub mul x 30 sub mul x 31 sub mul x 32 sub mul x 33 sub mul x 34 sub mul x 35 sub mul x 36 sub mul x 37 sub mul x 38 sub mul x 39 sub mul x 40 sub mul x 41 sub mul x 42 sub mul x 43 sub mul x 44 sub mul x 45 sub mul x 46 sub mul x 47 sub mul x 48 sub mul x 49 sub mul x 50 sub mul x 51 sub mul x 52 sub mul x 53 sub mul x 54 sub mul x 55 sub mul x 56 sub mul x 57 sub mul x 58 sub mul x 59 sub mul x 60 sub mul x 61 sub mul x 62 sub mul x 63 sub mul x 64 sub mul 21 # 11 fn mask(x: u64) -> u64 { x & 0xff }; 12 fn transform requires true ensures result >= 1 { x * 2 + 1 } 22 D 64 x 255 and 23 D 64 x 2 mul 1 add ; true ; result >= 1 24 # 13 the same body without the contract, 14 2(x+1) - 1 25 D 64 x 2 mul 1 add 26 D 64 x 1 add 2 mul 1 sub 27 # 15..18 w 8: x and 255, x, x(x-1)...(x-8) (9 factors, v2(9!) = 7 < 8: zero on 0..8, 8! at 9... nonzero), 0 28 D 8 x 255 and 29 D 8 x 30 D 8 x x 1 sub mul x 2 sub mul x 3 sub mul x 4 sub mul x 5 sub mul x 6 sub mul x 7 sub mul x 8 sub mul 31 D 8 0 32 # 19..21 coefficient vectors computed by Wolfram 33 D 8 x x mul x mul 3 mul x 5 mul add 7 add 34 D 16 x x mul x mul x mul x mul 7 mul x x mul 200 mul add 13 add 35 D 8 x x mul 255 mul 254 add 36 # 22..24 w 8: x+2, x+1+1, x+3 (exhaustive proofs) 37 D 8 x 2 add 38 D 8 x 1 add 1 add 39 D 8 x 3 add 40 # 25..28 w 64: x and (2^63-1) (outside the fragment), x and all-ones, x, x-1+1 41 D 64 x 0x7fffffffffffffff and 42 D 64 x 0xffffffffffffffff and 43 D 64 x 44 D 64 x 1 sub 1 add 45 # 29, 30 w 16: x^2, x(x-1)+x 46 D 16 x x mul 47 D 16 x x 1 sub mul x add 48 # 31..33 one-bit constant differences: x + 2^63 vs x; 2^62 x vs 3 2^62 x 49 D 64 x 0x8000000000000000 add 50 D 64 x 0x4000000000000000 mul 51 D 64 x 0xc000000000000000 mul 52 # 34..37 reassociation and commutation of add: (x+3)+5, x+(5+3), 3+(x+5), x+8 53 D 64 x 3 add 5 add 54 D 64 x 5 3 add add 55 D 64 3 x 5 add add 56 D 64 x 8 add 57 # 38, 39 (x x) x vs x (x x); 40, 41 (x+3) 5 vs 5x + 15 58 D 64 x x mul x mul 59 D 64 x x x mul mul 60 D 64 x 3 add 5 mul 61 D 64 x 5 mul 15 add 62 # 42, 43 w 64 or: x or 0 = x; and 0 = 0 63 D 64 x 0 or 64 D 64 x 0 and 65 # 44 the outside program 25 with its operands swapped (another body: the fallback id differs), 66 # 45, 46 x and 1 (not a polynomial function for w >= 2: outside the fragment) 67 D 64 0x7fffffffffffffff x and 68 D 64 x 1 and 69 D 8 x 1 and 70 # 71 # must collapse 72 C 0 1 73 C 0 2 74 C 1 2 75 C 4 5 76 C 4 6 77 C 5 6 78 C 8 9 79 C 12 14 80 C 15 16 81 C 26 27 82 C 27 28 83 C 29 30 84 C 34 35 85 C 34 36 86 C 34 37 87 C 38 39 88 C 40 41 89 C 42 27 90 C 43 9 91 C 22 23 92 # must not collapse (one-bit constant differences and near misses) 93 N 1 3 94 N 31 27 95 N 32 33 96 N 10 9 97 N 17 18 98 N 4 7 99 N 25 27 100 N 11 27 101 N 22 24 102 N 15 22 103 N 16 27 104 N 25 44 105 N 45 27 106 # the same body twice: same FUNCTION_ID (12 and 13 differ only in the contract) 107 C 12 13 108 # classes 109 F 0 1 110 F 8 1 111 F 11 2 112 F 25 2 113 F 15 1 114 F 26 1 115 F 42 1 116 F 43 1 117 F 44 2 118 F 45 2 119 F 46 2 120 # canonical coefficients (Wolfram) 121 K 4 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 122 K 7 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 123 K 6 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 K 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 125 K 19 7 8 9 3 0 0 0 0 0 0 126 K 20 13 207 305 175 70 7 0 0 0 0 0 0 0 0 0 0 0 0 127 K 21 254 255 127 0 0 0 0 0 0 0 128 # program_id v2 goldens (tests/language/golden/v0.txt) 129 I 11 `e180baf4807d890dc1ba22472e847da76e877ee04d59b0762f6dfc26b2af62ff` 130 I 12 `83bd39597742d3bb83e5140c662532c0a2ecb59e5f868e38be16276981644543` 131 # FUNCTION_ID goldens: sha256sum of the section 9.3 preimage built byte by byte in run.sh 132 H 0 `11b8858ec5c305c0160d84eb2f30786c9429731bc6a88516d530ecefc819bef2` 133 H 2 `11b8858ec5c305c0160d84eb2f30786c9429731bc6a88516d530ecefc819bef2` 134 H 8 `96cb6ace92436b94aa6f49967d967b900f069c6c34b9cf73f7ce2d7d773cc1fa` 135 H 9 `96cb6ace92436b94aa6f49967d967b900f069c6c34b9cf73f7ce2d7d773cc1fa` 136 H 19 `89877bca66e566c52e7dbc92df7fc3bacb25542066df417a3641f504e1d216eb` 137 # K(w) for w = 1..64 (Wolfram: least k with IntegerExponent[k!, 2] >= w) 138 W 1 2 139 W 2 4 140 W 3 4 141 W 4 6 142 W 5 8 143 W 6 8 144 W 7 8 145 W 8 10 146 W 9 12 147 W 10 12 148 W 11 14 149 W 12 16 150 W 13 16 151 W 14 16 152 W 15 16 153 W 16 18 154 W 17 20 155 W 18 20 156 W 19 22 157 W 20 24 158 W 21 24 159 W 22 24 160 W 23 26 161 W 24 28 162 W 25 28 163 W 26 30 164 W 27 32 165 W 28 32 166 W 29 32 167 W 30 32 168 W 31 32 169 W 32 34 170 W 33 36 171 W 34 36 172 W 35 38 173 W 36 40 174 W 37 40 175 W 38 40 176 W 39 42 177 W 40 44 178 W 41 44 179 W 42 46 180 W 43 48 181 W 44 48 182 W 45 48 183 W 46 48 184 W 47 50 185 W 48 52 186 W 49 52 187 W 50 54 188 W 51 56 189 W 52 56 190 W 53 56 191 W 54 58 192 W 55 60 193 W 56 60 194 W 57 62 195 W 58 64 196 W 59 64 197 W 60 64 198 W 61 64 199 W 62 64 200 W 63 64 201 W 64 66 202 # refused programs (negative controls): constant not below 2^w, missing operand, two results, widths 203 V 4 8 x 256 add 204 V 5 8 x add 205 V 7 8 x x 206 V 1 0 x 207 V 1 65 x 208 V 4 1 x 2 add 209 # graph proofs: exhaustive equal (w 8 and 16), exhaustive differ, witness found, no witness 210 E 22 23 0 211 E 29 30 0 212 E 22 24 1 213 X 1 3 1 214 X 25 27 1 215 X 26 27 0 216 X 4 7 1 217 # queries: class of x+1+1 is {x+1+1, x+2, 2+x}; class of w 8 x+2 is {x+2, x+1+1} 218 Q 0 3 219 Q 22 2 220 Q 9 3 221 Q 11 1 222 P 0 4 223 P 3 3 224 # randomized differential: FUNCTION_ID equal iff value signatures equal (both in the fragment) 225 R 1 64 3 226 R 3 300 5 227 R 8 300 12345 228 R 16 120 777 229 R 64 300 99 230 G