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/evidence/node-schedpol/receipt.323ef72efdfc06ada9920561909b43f0f5db04eea69c130ce226aa3b8fb9effe.json # 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 / evidence / node-schedpol / receipt.323ef72efdfc06ada9920561909b43f0f5db04eea69c130ce226aa3b8fb9effe.json` 200 lines ยท 71507 bytes Raw Blame History 1 { 2 "checks": [ 3 { 4 "binary_sha256": "`8bd6c1a76cfc9659357e35c9fe538b14696bedcaa072e4fbc80c123620f51808`", 5 "case": "bench-gate", 6 "compile_exit": 0, 7 "expected_exit": 0, 8 "issue": "DRA-399", 9 "run_exit": 0, 10 "source_sha256": "`514a83f155bc129715708c44810cdfb6befb9618231e921c22b5bd11cc0132d5`", 11 "stderr": "", 12 "stdout": "60 402039 402056 `1002352` `1303201`\nbench 1 3 4 `1506305` 402575 415634 1420 1421 55093 90944 64 0 2 1 8 412 : 8 8 200876 201055 401452 401469 `1004478` `1305385`\nbench 2 0 4 `2109210` 30 424834 2000 2007 56128 0 0 0 0 0 14 412 : 15 15 300732 301006 602248 602248 903743 903920 `1204826`\nbench 2 1 4 `2107269` 18 500421 1998 2005 56000 128320 0 0 0 0 14 412 : 9 9 301094 301213 601330 601736 902736 902736 `1203595`\nbench 2 2 4 `1806087` 24 467831 1713 1720 19077 110080 1088 0 5 3 14 412 : 12 12 150422 150831 451266 452049 751879 300913 903240 `1053241` `1204239` 451026\nbench 2 3 4 `1806746` 18 545716 1693 1700 19074 108800 1088 0 2 1 14 412 : 9 9 150750 150826 451947 452066 300703 753499 903398 151319 `1204759` `1204946` 300814\nbench 3 0 4 `1605153` 13 301669 1519 1521 7104 0 0 0 0 0 13 412 : 6 6 300281 300281 601195 601606 902277 200725 200725 401120 401307\nbench 3 1 4 `1607216` 30 405891 1520 1522 7104 97408 0 0 0 0 13 412 : 15 15 301539 301715 602995 603151 904363 200344 200344 401357 401357\nbench 3 2 4 `1607762` 19 378339 1523 1525 6789 97600 192 0 5 2 13 412 : 9 9 100468 201065 301052 502457 602028 803937 803228 `1104899` `1005009` `1205090` `1306087`\nbench 3 3 4 `1608619` 9 386017 1526 1528 6980 97792 192 0 4 3 13 412 : 4 4 100377 200997 301406 401094 603032 702479 904656 `1002817` `1105972` `1203458` `1307165`\nbench 4 0 4 `4018676` `1809612` 927158 3812 3813 123712 0 0 0 0 0 24 412 : 8 8 402168 402168 551752 652312 652312 `1054313` `1105103` `1105103` `1205676` `1356726` `1507125` `1557553` `1957959` `1957959` `2110596` `2211259` `2211259` `2613100` `2663556` `2663556` `2764232` `3065770`\nbench 4 1 4 `3511320` 399477 985441 3333 3334 62715 213376 0 0 1 0 24 412 : 11 11 100682 149685 250057 401614 550758 401911 951111 802500 852485 953039 `1503174` `1353183` `1603694` `1403956` `1654629` `1554913` `1805953` `1906504` `2308266` `2157673` `2458409` `2558944`\nbench 4 2 4 `3516154` 200657 `1056926` 3309 3310 61761 211840 256 0 8 3 24 412 : 10 10 100529 149946 149946 100313 502132 250724 351307 752898 853188 554166 704405 `1105290` `1205842` `1005570` `1406614` `1156757` `1156757` `1657156` `2059039` `2211813` `2061573` `2512567`\nbench 4 3 4 `3614797` 202042 `1063512` 3401 3402 72984 217728 384 0 9 5 24 412 : 7 7 100474 49591 249582 501217 49940 551031 752149 451949 501972 `1002653` 653200 `1102983` `1203487` `1054886` `1504669` `1556360` `1959400` `2109984` `1959883` `2411315` `2662315`\nbench 5 0 4 `3013249` 20 584771 2869 2870 2048 0 0 0 0 0 30 412 : 10 10 100493 301458 301482 401977 602925 604916 601651 602877 602916 601594 601562 600832 601844 601347 601321 601529 601372 600418 601390 601657 600597 601563 601603 602659 601688 602611 601690 601608\nbench 5 1 4 `3013143` 21 746999 2859 2860 2112 183040 0 0 0 0 30 412 : 10 10 100751 301741 301826 402181 602839 602839 601566 602468 601498 601241 600991 600991 600979 600890 601948 600852 601554 601855 601535 601931 601931 602152 601478 602514 601340 600337 601242 600435\nbench 5 2 4 `3012993` 20 724547 2850 2851 1482 182464 896 0 10 1 30 412 : 10 10 100456 200889 201100 301658 198975 200935 702429 602406 199844 `1003982` 289 `1004517` 299152 `1003113` 100224 902016 903183 500957 300376 `1002360` 99502 300385 `1002605` 400417 `1102936` `1104179` `1002362` 701863\nbench 5 3 4 `3012088` 13 785589 2854 2855 1480 182720 960 0 8 0 30 412 : 6 6 100335 100335 99177 301297 301382 199743 501722 603099 199754 904475 603239 199919 `1003626` 602069 199774 `1002734` 602600 199777 `1002560` 602368 199497 `1001869` 602360 501811 `1000620` 401289 `1001344` 701349\nbench 6 0 4 `3462951` 302356 625690 3268 3269 19200 0 0 1 0 0 12 412 : 14 14 452677 452677 704009 854223 `1306387` `1656847` `1907891` `2058578` `2510614` `2861276` `2649428`\nbench 6 1 4 `3464016` 16 704999 3270 3271 896 209344 0 1 0 0 12 412 : 8 8 150865 450454 541184 `1052791` `1203591` `1656083` `2007810` `2258784` `2408973` `2860772` `3212677`\nbench 6 2 4 `3613493` 17 699590 3403 3404 644 217856 128 1 4 2 12 412 : 8 8 150784 141024 652330 803126 `1254787` `1605933` `1856065` `2006847` `2458779` `2809518` `3161278`\nbench 6 3 4 `3467665` 22 711107 3248 3249 707 207936 128 1 3 1 12 412 : 11 11 150170 150923 44055 555983 `1008005` `1358970` `1610419` `1861512` `2212619` `2663708` `3015416`\nPASS node bench\n", 13 "stdout_has": [ 14 "PASS node bench" 15 ], 16 "verdict": "PASS", 17 "wall_ms": 305324 18 }, 19 { 20 "binary_sha256": "`9353e1bae73f33518340d205d3cbc972261c473c924f6c8211b4148f5992cd91`", 21 "case": "mut399-fits-ignores-capacity", 22 "compile_exit": 0, 23 "expected_exit": 70, 24 "issue": "DRA-399", 25 "mutation": { 26 "file": "seed/node/sched.om", 27 "from": "if gt sp_need req k a\nret false\n", 28 "to": "if false\nret false\n" 29 }, 30 "run_exit": 70, 31 "source_sha256": "`07ed1136fe1f443239e4d836eb557bac659075ca7b8c9184c7180edac08f9f18`", 32 "stderr": "", 33 "stdout": "", 34 "verdict": "PASS", 35 "wall_ms": 1 36 }, 37 { 38 "binary_sha256": "`67ed14b29af70ff39b86a5d3213444bfe689be83410fcc870174bb13e5632d1a`", 39 "case": "mut399-reserve-youngest", 40 "compile_exit": 0, 41 "expected_exit": 71, 42 "issue": "DRA-399", 43 "mutation": { 44 "file": "seed/node/sched.om", 45 "from": "if lt get sjarr j get sjarr o\no = j\n", 46 "to": "if gt get sjarr j get sjarr o\no = j\n" 47 }, 48 "run_exit": 71, 49 "source_sha256": "`ecb780730c902361175e915f6e892c3a8715133a1d8c5b442edc3ea4892a2b43`", 50 "stderr": "", 51 "stdout": "bench 1 0 0 `1504230` 600880 350962 1421 1422 54976 0 0 0 0 0 8 416 : 4 600876 902548 902548 `1102693` `1102926` `1303290` `1303617`\nbench 1 1 0 `1305810` 20 365762 1230 1231 30528 78784 0 0 0 0 8 416 : 10 10 200745 401778 602953 904770 904770 `1105552`\n", 52 "verdict": "PASS", 53 "wall_ms": 3236 54 }, 55 { 56 "binary_sha256": "`7c38dc211b1ea8664010ed630131342c78ddf7daad85165fc44cef190a1ab0b8`", 57 "case": "mut399-lost-no-requeue", 58 "compile_exit": 0, 59 "expected_exit": 72, 60 "issue": "DRA-399", 61 "mutation": { 62 "file": "seed/node/sched.om", 63 "from": "if ne and get sjfl j 1 0\nsp_ready j\nelse\n", 64 "to": "if false\nsp_ready j\nelse\n" 65 }, 66 "run_exit": 72, 67 "source_sha256": "`fb85e308f8bea2e710c1a02d9e1d5b8e85efeeb7bb66423e00582ab40474e5bd`", 68 "stderr": "", 69 "stdout": "bench 1 0 0 `1503879` 600552 389173 1418 1419 55104 0 0 0 0 0 8 412 : 5 600547 901611 901611 `1101859` `1101859` `1302711` `1302853`\nbench 1 1 0 `1305314` 200045 425221 1225 1226 30717 78464 0 0 1 0 8 412 : 16 16 201152 402229 602264 803203 `1104577` `1104577`\nbench 1 2 0 `1305609` 13 445748 1235 1236 30913 79104 64 0 1 0 8 412 : 6 6 200639 502219 502219 702517 703199 903565\nbench 1 3 0 `1507316` 20 486372 1421 1422 55479 91008 64 0 2 1 8 412 : 10 10 200926 200926 401180 401446 602253 `1206149`\nbench 2 0 0 `2106150` 21 449331 1982 1989 55744 0 0 0 0 0 14 412 : 10 10 300952 301510 601942 603473 902166 904275 `1203129`\nbench 2 1 0 `2107623` 31 583395 1978 1985 55616 127040 0 0 0 0 14 412 : 15 15 300219 301002 601285 602392 902469 905553 `1203429`\nbench 2 2 0 `1807155` 19 448134 1706 1713 18821 109632 1088 0 5 3 14 412 : 9 9 150160 151507 451372 452355 752520 303262 906450 `1053736` `1208128` 448796\nbench 2 3 0 `1808549` 20 451382 1709 1716 19393 109824 1088 0 1 1 14 412 : 10 10 150380 151145 452109 452109 300724 753172 903676 150694 `1205125` `1205125` 301599\nbench 3 0 0 `1605985` 22 276098 1528 1530 7168 0 0 0 0 0 13 412 : 11 11 301303 301574 602686 602785 902838 200802 201043 401030 402079\nbench 3 1 0 `1606884` 27 438530 1522 1524 7104 97536 0 0 0 0 13 412 : 13 13 300872 301552 602449 602874 903926 200380 200380 401357 401357\nbench 3 2 0 `1605484` 40 497124 1520 1522 6533 97408 192 0 5 2 13 412 : 20 20 100382 200879 300397 502138 601422 803144 801505 `1102213` `1003735` `1204438` `1303528`\nbench 3 3 0 `1606233` 18 444069 1518 1520 6660 97280 192 0 4 3 13 412 : 9 9 100284 201021 301124 401941 602199 703226 903429 `1004688` `1103920` `1205922` `1304925`\nbench 4 0 0 `4017990` `1808410` `1146329` 3799 3800 123456 0 0 0 0 0 24 412 : 17 17 401758 401758 551637 652249 652249 `1054285` `1105190` `1105190` `1205729` `1507053` `1357180` `1557401` `1959129` `1959129` `2110473` `2210618` `2210618` `2612984` `2663598` `2663598` `2763972` `3065518`\nbench 4 1 0 `3414619` 204204 `1002025` 3242 3243 50819 207552 0 0 1 0 24 412 : 10 10 100432 150404 249187 401996 399948 551868 650442 953197 901668 853792 `1406670` `1255994` `1507224` `1307810` `1557734` `1458161` `1709361` `1809712` `2210550` `2059937` `2361433` `2462008`\nbench 4 2 0 `3611328` 599628 `1009494` 3425 3426 74459 219264 256 0 8 2 24 412 : 34 34 100241 149256 149753 402059 150505 550772 500994 950902 651185 701422 `1203153` `1302325` 853607 `1404180` `1304636` `1552724` `1954527` `1654872` `1955086` `2305784` `2707852` `2558214`\nbench 4 3 0 `3616790` 102918 `1112576` 3431 3432 74507 219648 384 0 9 4 24 412 : 12 12 100686 49043 250852 500752 50771 1807 552504 753257 452643 503365 `1004896` `1104583` `1105402` `1406668` `1057037` `1457450` `1859164` `1861320` `2111755` `1961883` `2413019` `2665101`\nbench 5 0 0 `3011916` 17 751404 2855 2856 1984 0 0 0 0 0 30 412 : 8 8 100583 301475 301621 402019 602446 602446 601079 601855 600798 600468 600975 601297 601280 601440 601440 601875 602649 601750 601801 601378 601689 601450 601830 600773 600936 601699 600678 601000\nbench 5 1 0 `3011998` 19 `1008156` 2851 2852 2048 182528 0 0 0 0 30 412 : 9 9 100623 300736 301666 401284 601663 602765 600508 601055 601081 600822 600927 600827 600912 601672 600866 601432 602055 601506 602041 602453 601873 601948 602464 601405 601708 600975 602033 601501\nbench 5 2 0 `3011705` 37 928646 2865 2866 1482 183424 896 0 10 1 30 412 : 18 18 100574 200596 201108 301634 199412 199901 702628 601036 199062 `1003179` `1003473` 300076 `1002308` 100414 901989 902944 500389 903313 99464 200931 `1001957` 99030 `1002070` `1103341` `1102943` `1001850` 602655\nbench 5 3 0 `3010942` 18 744411 2860 2861 1544 183104 1088 0 8 0 30 412 : 9 9 100235 100599 99111 300941 300948 199931 601934 501858 199544 602455 903404 199067 `1001805` 601359 199880 600525 `1001945` 199938 `1001887` 602377 199688 `1002802` 601323 501737 `1002120` 400552 `1001956` 701927\n", 70 "verdict": "PASS", 71 "wall_ms": 66778 72 } 73 ], 74 "compiler": { 75 "path": "seed/out/omc", 76 "sha256": "`5f90edea61bac241398df5036990d899361a5acd9decb37954ce088ec0f6f6df`" 77 }, 78 "cpu_affinity": [ 79 8, 80 9 81 ], 82 "execution": "NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)", 83 "hashes": { 84 "seed/node/bench-gate.om": "`514a83f155bc129715708c44810cdfb6befb9618231e921c22b5bd11cc0132d5`", 85 "seed/node/bench-test.om": "`63cc43a913ec43840489d6fe67a3c2b1548d1e0e8ada416a059954dbcd201884`", 86 "seed/node/pool.om": "`e7fba928bdc5c4194e7aee42109265de4f172d2b197946133d788b2dbcb30ccc`", 87 "seed/node/sched.om": "`9db74591b987694e2d93db1ae5c86ea3e801880a9450ff58b41066b99ab44fbc`", 88 "seed/node/super.om": "`d104ac8116c6df57fdc93f03791d7315e5b60875d8d6177480ef9967b6f53d5a`", 89 "seed/node/transport.om": "`d0dd69ef5e0b71294a2390b3526865d62ca07accd269b9ce57a028339e34f6da`" 90 }, 91 "issue": "DRA-399", 92 "platform": "Linux 7.0.0-1019-nvidia aarch64 spark-b87b", 93 "project": "P-DRA-14", 94 "script": { 95 "binary_sha256": "`ece552af48c3edf11e74f2bef24e1f84669d982b64a5c120e0129addd6f54a52`", 96 "cases": { 97 "cases": [ 98 { 99 "case": "bench-gate", 100 "compose": [ 101 "seed/node/transport.om", 102 "seed/node/pool.om", 103 "seed/node/super.om", 104 "seed/node/sched.om", 105 "seed/node/bench-test.om" 106 ], 107 "expect": 0, 108 "gate": "seed/node/bench-gate.om", 109 "issue": "DRA-399", 110 "repeat": 1, 111 "stdout_has": [ 112 "PASS node bench" 113 ], 114 "timeout": 3000 115 }, 116 { 117 "case": "mut399-fits-ignores-capacity", 118 "expect": 70, 119 "fragments": [ 120 "seed/node/transport.om", 121 "seed/node/pool.om", 122 "seed/node/super.om", 123 "seed/node/sched.om", 124 "seed/node/bench-test.om" 125 ], 126 "issue": "DRA-399", 127 "mutate": [ 128 "seed/node/sched.om", 129 "if gt sp_need req k a\nret false\n", 130 "if false\nret false\n" 131 ], 132 "timeout": 1800, 133 "why": "sp_fits never refuses for capacity. Scenario 1, arm 0, repetition 0: h (2 CPU) and H (4 CPU) are ready with two idle workers, so both are assigned and hold 6 of the 4 CPU; bn_inv (called at every sample) trips the capacity invariant: 70." 134 }, 135 { 136 "case": "mut399-reserve-youngest", 137 "expect": 71, 138 "fragments": [ 139 "seed/node/transport.om", 140 "seed/node/pool.om", 141 "seed/node/super.om", 142 "seed/node/sched.om", 143 "seed/node/bench-test.om" 144 ], 145 "issue": "DRA-399", 146 "mutate": [ 147 "seed/node/sched.om", 148 "if lt get sjarr j get sjarr o\no = j\n", 149 "if gt get sjarr j get sjarr o\no = j\n" 150 ], 151 "timeout": 1800, 152 "why": "The reservation goes to the youngest ready job at the bypass budget instead of the oldest. The first contested reservation (another ready job also at the budget, which bn_fair counts) picks a younger job, and bn_fair's oldest-first check trips: 71. Exits 70 and 72 are unaffected: capacity is still checked, and the reserved job still runs." 153 }, 154 { 155 "case": "mut399-lost-no-requeue", 156 "expect": 72, 157 "fragments": [ 158 "seed/node/transport.om", 159 "seed/node/pool.om", 160 "seed/node/super.om", 161 "seed/node/sched.om", 162 "seed/node/bench-test.om" 163 ], 164 "issue": "DRA-399", 165 "mutate": [ 166 "seed/node/sched.om", 167 "if ne and get sjfl j 1 0\nsp_ready j\nelse\n", 168 "if false\nsp_ready j\nelse\n" 169 ], 170 "timeout": 1800, 171 "why": "A rerunnable job on a lost worker is not put back to ready. Scenarios 1-5 lose no worker and pass; in scenario 6, arm 0, worker 0 is SIGKILLed while busy, its job is never requeued or reviewed, and the 20 s deadline check in bn_loop trips: 72." 172 } 173 ], 174 "issue": "DRA-399", 175 "statuses": { 176 "DRA-399": "IMPLEMENTED; bench EXERCISED only by this receipt; not QUALIFIED; not MERGED; not DEPLOYED", 177 "expected_exits": "derived from the check site each mutant targets (field why), before the run", 178 "gpu": "NOT_RUN (not involved)", 179 "timing": "wall times depend on the cores the run was given; they are recorded with the bench output, not claimed as speed" 180 } 181 }, 182 "cases_sha256": "`80920f1077b0c874ec97245ecaa09b4da1338e122aeab52d9e16b5fbaad5e548`", 183 "path": "seed/node/schedrcpt.om", 184 "sha256": "`56bc2e0e36d70795195f5194172f372955e0af56ee68a41b1b3c53d2eaf9c0a4`", 185 "source": "note SPDX-License-Identifier: Apache-2.0\nnote schedrcpt.om: the scheduler-policy receipt driver of seed/node (P-DRA-14 lane). It replaces\nnote ~/handoffs/hive/sched/bin/receipt.py, which produced the DRA-395/396 and DRA-397 r1 receipts,\nnote and keeps that driver's case-file format, checks, refusals and receipt layout.\nnote Build (json.om appended, it supplies the JSON reader):\nnote cat seed/node/schedrcpt.om seed/json/json.om | seed/out/omc > build/node/schedrcpt\nnote Use, from the repository root under test:\nnote DRIVER_TREE/build/node/schedrcpt CASES.json OUTDIR_REL [--write]\nnote The source hashed into the receipt is DRIVER_TREE/seed/node/schedrcpt.om, found from argv[0].\nnote Exit 0 when every case passes, 1 when one fails, 2 on a driver error, 3 on a dirty tree,\nnote 4 on a mutant whose pattern is not unique, 5 when a gate is not the concatenation of its parts.\nnote\nnote The SHA-256 functions below are copied from om/sha256/sha256-om2.om lines 21-317 at `7f4e1a44`\nnote (export dropped, sha256_final's digest parameter an edit instead of an out), since omc\nnote composes one source text and json.om is the only other part.\nom2\n\nlayout shactx 104\nfield state uint 8 at 0 little\nfield count ulong at 32 little\nfield buf uchar 64 at 40 little\nend\n\nnote ======== driver state ========\nnote gv: scalar slots. gl: signed slots (0 expect, 1 compile exit, 2 last run code).\nnote lst: nine string lists of 2048 arena indices (0 fragments, 1 compose, 2 args, 3 stdout_has,\nnote 4 clean, 5 mutation files, 6 mutation patterns, 7 replacements, 8 hashed files of the receipt).\nnote hsl: hex digests (0 source, 1 binary, 2 scratch). Run codes: 0..255 exit, -N signal N,\nnote 4096 timeout, 4097 no run.\nconst VOBN ulong 0\nconst VDEP ulong 1\nconst VSAN ulong 2\nconst VSON ulong 3\nconst VLN ulong 4\nconst VKPN ulong 5\nconst VKSN ulong 6\nconst VWDN ulong 7\nconst VCWN ulong 8\nconst VPBN ulong 9\nconst VPKN ulong 10\nconst VPKC ulong 11\nconst VPASS ulong 12\nconst VFAIL ulong 13\nconst VSRCN ulong 14\nconst VFBN ulong 15\nconst VTMO ulong 32\nconst VREP ulong 33\nconst VOM2 ulong 34\nconst VCN ulong 35\nconst VGATE ulong 36\nconst VWALL ulong 37\nconst VNRUN ulong 38\nconst VFDO ulong 39\nconst VFDE ulong 40\nconst VCASP ulong 41\nconst VOUT ulong 42\nconst VDRV ulong 43\nconst VBIN ulong 44\nconst VHEAD ulong 45\nconst VTREE ulong 46\nconst VTISS ulong 47\nconst VTSTA ulong 48\nconst VTCAS ulong 49\nconst VOK ulong 50\nconst VNOUT ulong 51\nconst VPLAT ulong 52\nconst NONE ulong `4294967295`\nconst CTMO long 4096\nconst CNONE long 4097\n\nglobal rb uchar `16777216`\nglobal sx uchar `16777216`\nglobal gsrc uchar `16777216`\nglobal fb uchar `16777216`\nglobal fb2 uchar `16777216`\nglobal sa uchar `4194304`\nglobal so ulong 65536\nglobal sl ulong 65536\nglobal lst ulong 18432\nglobal gv ulong 64\nglobal gl long 16\nglobal ctok ulong 16\nglobal kp uchar `1048576`\nglobal ks ulong 196608\nglobal pb uchar 8192\nglobal rp uchar 8192\nglobal wd uchar 4096\nglobal cw uchar 4096\nglobal lb uchar 65536\nglobal nbuf uchar 32\nglobal hsl uchar 256\nglobal rcod long 65536\nglobal rmis uchar 65536\nglobal dst ulong 128\nglobal stb uchar 128\nglobal pk uchar 4096\nglobal ocod long 1024\nglobal omis uchar 1024\nglobal ocnt ulong 1024\nglobal oord ulong 1024\nglobal okb uchar 32768\nglobal okl ulong 1024\n\ntext tpref \"schedrcpt: \"\ntext tnl \"\\n\"\ntext tusage \"usage: build/node/schedrcpt CASES.json OUTDIR_REL [--write], run from the repository root\"\ntext tsuffix \"build/node/schedrcpt\"\ntext tsrcrel \"seed/node/schedrcpt.om\"\ntext tomcabs \"/seed/out/omc\"\ntext tomcrel \"seed/out/omc\"\ntext tgit \"/usr/bin/git\"\ntext tdevnull \"/dev/null\"\ntext twrite \"--write\"\ntext tmfd \"schedrcpt\"\ntext twdpre \"/tmp/schedrcpt-\"\ntext ttmppre \"/tmp/sched-receipt-\"\ntext trcpre \"receipt.\"\ntext tjson \".json\"\ntext tom2 \"om2\\n\"\ntext tbuild \"build/\"\ntext tstatus \"status\"\ntext tporc \"--porcelain\"\ntext tuntr \"--untracked-files=normal\"\ntext trevp \"rev-parse\"\ntext thead \"HEAD\"\ntext thtree \"HEAD^{tree}\"\ntext tostype \"/proc/sys/kernel/ostype\"\ntext tosrel \"/proc/sys/kernel/osrelease\"\ntext thost \"/proc/sys/kernel/hostname\"\ntext tpstat \"/proc/self/status\"\ntext tcpus \"Cpus_allowed_list:\"\ntext tmach \"aarch64\"\ntext tfull \"receipt buffer full (16 MiB)\"\ntext tarena \"string arena full\"\ntext tlist \"list longer than 2048 entries\"\ntext tschema \"case file does not match the schema (see seed/node/README.md)\"\ntext tlong \"string too long (64 KiB) or not decodable\"\ntext tdupkey \"duplicate object key in the case file\"\ntext tpath \"path longer than 4095 bytes\"\ntext targs \"argument list exceeds 64 entries or 4096 bytes\"\ntext tbig \"file larger than its buffer (16 MiB)\"\ntext tread \"read failed\"\ntext topen \"cannot open a file named by the case file or the run\"\ntext tcasesf \"cannot read the case file (at most 983039 bytes)\"\ntext tnotjson \"case file is not valid JSON\"\ntext tgitf \"git failed (run from the root of a git checkout)\"\ntext tfork \"fork failed\"\ntext twait \"waitpid failed\"\ntext tmkwork \"cannot create the work directory\"\ntext tself \"cannot locate the driver: invoke it by a path ending in build/node/schedrcpt\"\ntext twfail \"cannot write the receipt (refusing to overwrite an existing one)\"\ntext tbn \"build/node\"\ntext tbnf \"cannot create build/node in the tree under test\"\ntext tdepth \"nesting too deep\"\ntext trefd \"REFUSED: dirty tree\\n\"\ntext trefm \"REFUSED: mutant \"\ntext trefnf \" is not one of its fragments\\n\"\ntext trefpo \": pattern occurs \"\ntext treftm \" times\\n\"\ntext tref \"REFUSED: \"\ntext trefc \" is not the concatenation\\n\"\ntext tpass \"PASS\"\ntext tfailw \"FAIL\"\ntext texpe \" expect=\"\ntext tgot \" got=\"\ntext tcomp \" compile=\"\ntext truns \" runs=\"\ntext ttimeout \"timeout\"\ntext tpynone \"None\"\ntext tmiss \" missing-stdout\"\ntext tnull \"null\"\ntext ttrue \"true\"\ntext tfalse \"false\"\ntext tsumm \"summary pass=\"\ntext tsfail \" fail=\"\ntext tsdig \" receipt_sha256=\"\ntext tproj \"P-DRA-14\"\ntext texec \"NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)\"\ntext kcase \"case\"\ntext kissue \"issue\"\ntext kfrag \"fragments\"\ntext kgate \"gate\"\ntext kcomp \"compose\"\ntext kom2 \"om2\"\ntext kmut \"mutate\"\ntext kargs \"args\"\ntext kexp \"expect\"\ntext ktmo \"timeout\"\ntext kclean \"clean\"\ntext khas \"stdout_has\"\ntext krep \"repeat\"\ntext kstat \"statuses\"\ntext kcases \"cases\"\ntext kbsha \"binary_sha256\"\ntext kcexit \"compile_exit\"\ntext kexpx \"expected_exit\"\ntext kmutat \"mutation\"\ntext krunx \"run_exit\"\ntext ksrcsha \"source_sha256\"\ntext kstderr \"stderr\"\ntext kstdout \"stdout\"\ntext kverd \"verdict\"\ntext kwall \"wall_ms\"\ntext kouts \"outcomes\"\ntext kruns \"runs\"\ntext kfile \"file\"\ntext kfrom \"from\"\ntext kto \"to\"\ntext kchecks \"checks\"\ntext kcompil \"compiler\"\ntext kpath \"path\"\ntext ksha \"sha256\"\ntext kaffin \"cpu_affinity\"\ntext kexecu \"execution\"\ntext khashes \"hashes\"\ntext kplat \"platform\"\ntext kproj \"project\"\ntext kscript \"script\"\ntext kcsha \"cases_sha256\"\ntext ksource \"source\"\ntext kscom \"source_commit\"\ntext kstree \"source_tree\"\ntext ksumm \"summary\"\ntext kpass \"pass\"\ntext kfail \"fail\"\ntext ktime \"timestamp_utc\"\n\n\nnote K[0..63]: the first 32 bits of the fractional parts of the cube roots of the first 64 primes.\nnote Copied mechanically from seed/qualification/om2/fixtures/sha256-k.dec (tool-computed, never typed).\nfn kinit k edit uint 64 to void\nput k 0 0x428a2f98\nput k 1 0x71374491\nput k 2 0xb5c0fbcf\nput k 3 0xe9b5dba5\nput k 4 0x3956c25b\nput k 5 0x59f111f1\nput k 6 0x923f82a4\nput k 7 0xab1c5ed5\nput k 8 0xd807aa98\nput k 9 0x12835b01\nput k 10 0x243185be\nput k 11 0x550c7dc3\nput k 12 0x72be5d74\nput k 13 0x80deb1fe\nput k 14 0x9bdc06a7\nput k 15 0xc19bf174\nput k 16 0xe49b69c1\nput k 17 0xefbe4786\nput k 18 0x0fc19dc6\nput k 19 0x240ca1cc\nput k 20 0x2de92c6f\nput k 21 0x4a7484aa\nput k 22 0x5cb0a9dc\nput k 23 0x76f988da\nput k 24 0x983e5152\nput k 25 0xa831c66d\nput k 26 0xb00327c8\nput k 27 0xbf597fc7\nput k 28 0xc6e00bf3\nput k 29 0xd5a79147\nput k 30 0x06ca6351\nput k 31 0x14292967\nput k 32 0x27b70a85\nput k 33 0x2e1b2138\nput k 34 0x4d2c6dfc\nput k 35 0x53380d13\nput k 36 0x650a7354\nput k 37 0x766a0abb\nput k 38 0x81c2c92e\nput k 39 0x92722c85\nput k 40 0xa2bfe8a1\nput k 41 0xa81a664b\nput k 42 0xc24b8b70\nput k 43 0xc76c51a3\nput k 44 0xd192e819\nput k 45 0xd6990624\nput k 46 0xf40e3585\nput k 47 0x106aa070\nput k 48 0x19a4c116\nput k 49 0x1e376c08\nput k 50 0x2748774c\nput k 51 0x34b0bcb5\nput k 52 0x391c0cb3\nput k 53 0x4ed8aa4a\nput k 54 0x5b9cca4f\nput k 55 0x682e6ff3\nput k 56 0x748f82ee\nput k 57 0x78a5636f\nput k 58 0x84c87814\nput k 59 0x8cc70208\nput k 60 0x90befffa\nput k 61 0xa4506ceb\nput k 62 0xbef9a3f7\nput k 63 0xc67178f2\nend\n\nnote H(0): the first 32 bits of the fractional parts of the square roots of the first 8 primes\nnote (fixtures/sha256-iv.dec).\nfn iv s edit uint 8 to void\nput s 0 0x6a09e667\nput s 1 0xbb67ae85\nput s 2 0x3c6ef372\nput s 3 0xa54ff53a\nput s 4 0x510e527f\nput s 5 0x9b05688c\nput s 6 0x1f83d9ab\nput s 7 0x5be0cd19\nend\n\nnote Message schedule of the block m[o .. o+64). w is fresh: its incoming contents are never read.\nnote The compiler proves that every get of w reads an element written earlier in this function\nnote (error 27 otherwise): w[0..16) are the block's big-endian words, w[16..64) the FIPS recurrence.\nfn sched w edit uint 64 fresh m view uchar * o ulong to void\nq = ulong 0\nx = uint 0\ny = uint 0\nfor i ulong 16 unroll\nq = add o mul i 4\nx = uint get m q\nx = or shl x 8 uint get m add q 1\nx = or shl x 8 uint get m add q 2\nput w i or shl x 8 uint get m add q 3\nend\nfor i ulong 48 unroll\nx = get w add i 1\ny = get w add i 14\nx = add add get w i get w add i 9 xor xor rotr x 7 rotr x 18 shr x 3\nput w add i 16 add x xor xor rotr y 17 rotr y 19 shr y 10\nend\nend\n\nnote The 64 rounds on the chaining value s. One round body, emitted 64 times by unroll; i is a constant\nnote in each copy, so get kt i and get w i need no run-time check. uint arithmetic wraps mod 2^32.\nnote Ch(e,f,g) = (e and f) xor (not e and g) is written g xor (e and (f xor g)); Maj(a,b,c) =\nnote (a and b) xor (a and c) xor (b and c) is written (a and b) or (c and (a or b)). Both are bitwise\nnote identities. h first becomes T1, then T1 + T2, which is the next a; the names then shift by one.\nnote The sums are built a term per line and each Sigma in two lines through t: 12 names are live, and\nnote omc hands out 16 registers with no spilling (error 12 under compiler-s1/s2 for longer lines).\nfn rounds s edit uint 8 w view uint 64 kt view uint 64 to void\na = get s 0\nb = get s 1\nc = get s 2\nd = get s 3\ne = get s 4\nf = get s 5\ng = get s 6\nh = get s 7\nt = uint 0\nfor i ulong 64 unroll\nh = add h get kt i\nh = add h get w i\nt = xor rotr e 6 rotr e 11\nt = xor t rotr e 25\nh = add h t\nh = add h xor g and e xor f g\nd = add d h\nt = xor rotr a 2 rotr a 13\nt = xor t rotr a 22\nh = add h t\nt = and c or a b\nh = add h or and a b t\nt = h\nh = g\ng = f\nf = e\ne = d\nd = c\nc = b\nb = a\na = t\nend\nput s 0 add get s 0 a\nput s 1 add get s 1 b\nput s 2 add get s 2 c\nput s 3 add get s 3 d\nput s 4 add get s 4 e\nput s 5 add get s 5 f\nput s 6 add get s 6 g\nput s 7 add get s 7 h\nend\n\nnote One block m[o .. o+64) into s. sched and rounds stay calls: inlined, their names would share\nnote one 16-register frame with this function's parameters (no spilling, error 12).\nfn compress s edit uint 8 w edit uint 64 kt view uint 64 m view uchar * o ulong to void\nsched w m o\nrounds s w kt\nend\n\nnote The whole blocks of m (len m is a multiple of 64 and at most 2^25, so under 2^19 passes).\nfn run s edit uint 8 w edit uint 64 kt view uint 64 m view uchar * to void\nfor j ulong shr len m 6\ncompress s w kt m shl j 6\nend\nend\n\nnote The whole blocks of m (len m a multiple of 64). A rolled loop traps 4 after `1000000` passes\nnote (OMEGESE.md section 2; omc s_for), so m is cut into runs of 2^25 bytes (2^19 blocks):\nnote len m = top * 2^44 + mid * 2^25 + rest, and no loop passes 2^20 times. top reaches `1000000`\nnote only above 1.7e19 bytes, which no AArch64 address space holds.\nfn blocks s edit uint 8 w edit uint 64 kt view uint 64 m view uchar * to void\nq = ulong 0\nfor a ulong shr len m 44\nfor b ulong 0x80000\nrun s w kt part m q 0x2000000\nq = add q 0x2000000\nend\nend\nfor b ulong and shr len m 25 0x7ffff\nrun s w kt part m q 0x2000000\nq = add q 0x2000000\nend\nrun s w kt part m q sub len m q\nend\n\nnote Pad the k pending bytes already in p (k < 64; p was all zero past them): 0x80, zeros, and the\nnote 64-bit big-endian bit length of the n-byte message in the last 8 bytes of one or two blocks.\nfn finish s edit uint 8 w edit uint 64 kt view uint 64 p edit uchar 128 k ulong n ulong to void\nput p k 0x80\ne = ulong 64\nif ge k 56\ne = 128\nend\nbits = shl n 3\nfor i ulong 8 unroll\nput p sub e add i 1 uchar and shr bits mul i 8 0xff\nend\ncompress s w kt view p 0\nif eq e 128\ncompress s w kt view p 64\nend\nend\n\nfn sha256_init c edit shactx to void\ns = new uint 8 0\niv s\nfor i ulong 8 unroll\nput c state i get s i\nend\nput c count 0\nend\n\nnote k bytes of d from o into the context's buffer at bi (bi + k <= 64). A function of its own: inside\nnote absorb the copy loop needs more than the 16 registers (error 12 under compiler-s4).\nfn tobuf c edit shactx bi ulong d view uchar * o ulong k ulong to void\nfor i ulong k\nput c buf add bi i get d add o i\nend\nend\n\nnote Whole blocks are hashed straight from d; the bytes that complete a pending block go through blk.\nfn absorb c edit shactx d view uchar * bi ulong to void\nn = len d\ns = new uint 8 0\nw = new uint 64 0\nkt = new uint 64 0\nblk = new uchar 64 0\nkinit kt\nfor i ulong 8 unroll\nput s i get c state i\nend\noff = ulong 0\nif gt bi 0\noff = sub 64 bi\nfor i ulong bi\nput blk i get c buf i\nend\nfor i ulong off\nput blk add bi i get d i\nend\ncompress s w kt view blk 0\nend\nnb = shr sub n off 6\nblocks s w kt part d off shl nb 6\noff = add off shl nb 6\ntobuf c 0 d off sub n off\nfor i ulong 8 unroll\nput c state i get s i\nend\nend\n\nnote Any length, including 0 and >= 2^32. lt n sub 64 bi cannot wrap (bi < 64); add bi n could.\nfn sha256_update c edit shactx d view uchar * to void\nn = len d\ncnt = get c count\nbi = and cnt 63\nput c count add cnt n\nif lt n sub 64 bi\ntobuf c bi d 0 n\nret\nend\nabsorb c d bi\nend\n\nfn sha256_final c edit shactx o edit uchar 32 to void\ns = new uint 8 0\nw = new uint 64 0\nkt = new uint 64 0\np = new uchar 128 0\nv = ulong 0\nkinit kt\nfor i ulong 8 unroll\nput s i get c state i\nend\ncnt = get c count\nk = and cnt 63\nfor i ulong k\nput p i get c buf i\nend\nfinish s w kt p k cnt\nfor i ulong 8 unroll\nv = ulong get s i\nfor j ulong 4 unroll\nput o add mul i 4 j uchar and shr v sub 24 mul j 8 0xff\nend\nend\nend\n\nnote ======== messages and the line buffer ========\n\nnote die: one line on stderr and exit (2 for driver errors)\nfn die t view uchar * code int to void\nr = write 2 tpref 0 len tpref\nr = write 2 t 0 len t\nr = write 2 tnl 0 1\nexit code\nend\n\nfn l_b c uchar to void\nn = get gv VLN\nif lt n len lb\nput lb n c\nput gv VLN add n 1\nend\nend\n\nfn l_txt t view uchar * to void\nfor i ulong len t\nl_b get t i\nend\nend\n\nfn l_sa x ulong to void\np = get so x\nfor i ulong get sl x\nl_b get sa add p i\nend\nend\n\nnote numfmt: decimal digits of v into nb; returns the length\nfn numfmt v long to ulong\nb = new uchar 24 0\nu = ulong 0\nng = false\nif lt v 0\nng = true\nu = ulong neg v\nelse\nu = ulong v\nend\nk = ulong 0\nwhile lt k 24 bound 24\nput b k uchar add 48 rem u 10\nk = add k 1\nu = div u 10\nif eq u 0\nbreak\nend\nend\nw = ulong 0\nif ng\nput nbuf 0 uchar 45\nw = 1\nend\nwhile gt k 0 bound 24\nk = sub k 1\nput nbuf w get b k\nw = add w 1\nend\nret w\nend\n\nfn l_num v long to void\nn = numfmt v\nfor i ulong n\nl_b get nbuf i\nend\nend\n\nfn l_flush fd int to void\nn = get gv VLN\nr = write fd lb 0 n\nput gv VLN 0\nend\n\nnote l_code: a run code as Python prints it (an int, timeout, or None)\nfn l_code v long to void\nif eq v CTMO\nl_txt ttimeout\nret\nend\nif eq v CNONE\nl_txt tpynone\nret\nend\nl_num v\nend\n\nnote ======== JSON output: python json.dumps(indent=2, sort_keys=True, ensure_ascii=True) ========\n\nfn ob_b c uchar to void\nn = get gv VOBN\nif ge n len rb\ndie tfull 2\nend\nput rb n c\nput gv VOBN add n 1\nend\n\nfn o_txt t view uchar * to void\nfor i ulong len t\nob_b get t i\nend\nend\n\nfn o_qtxt t view uchar * to void\nob_b uchar 34\no_txt t\nob_b uchar 34\nend\n\nfn o_num v long to void\nn = numfmt v\nfor i ulong n\nob_b get nbuf i\nend\nend\n\nfn o_open c uchar to void\nob_b c\nd = add get gv VDEP 1\nif ge d len dst\ndie tdepth 2\nend\nput dst d 0\nput gv VDEP d\nend\n\nfn o_item to void\nd = get gv VDEP\nif gt get dst d 0\nob_b uchar 44\nend\nob_b uchar 10\nfor i ulong mul d 2\nob_b uchar 32\nend\nput dst d add get dst d 1\nend\n\nfn o_close c uchar to void\nd = get gv VDEP\nif gt get dst d 0\nob_b uchar 10\nfor i ulong mul sub d 1 2\nob_b uchar 32\nend\nend\nob_b c\nput gv VDEP sub d 1\nend\n\nfn o_colon to void\nob_b uchar 58\nob_b uchar 32\nend\n\nfn o_key t view uchar * to void\no_item\no_qtxt t\no_colon\nend\n\nfn hexc h ulong to uchar\nif lt h 10\nret uchar add 48 h\nend\nret uchar add 87 h\nend\n\nfn o_hex slot ulong to void\nob_b uchar 34\nfor i ulong 64\nob_b get hsl add mul slot 64 i\nend\nob_b uchar 34\nend\n\nfn o_u4 v ulong to void\nob_b uchar 92\nob_b uchar 117\nfor i ulong 4\nob_b hexc and shr v mul sub 3 i 4 15\nend\nend\n\nfn o_bs c uchar to void\nob_b uchar 92\nob_b c\nend\n\nnote o_asc: one ASCII byte as a JSON string character (Python ensure_ascii)\nfn o_asc c ulong to void\nif eq c 34\no_bs uchar 34\nret\nend\nif eq c 92\no_bs uchar 92\nret\nend\nif eq c 10\no_bs uchar 110\nret\nend\nif eq c 13\no_bs uchar 114\nret\nend\nif eq c 9\no_bs uchar 116\nret\nend\nif eq c 8\no_bs uchar 98\nret\nend\nif eq c 12\no_bs uchar 102\nret\nend\nif or lt c 32 eq c 127\no_u4 c\nret\nend\nob_b uchar c\nend\n\nfn o_cp cp ulong to void\nif lt cp 65536\no_u4 cp\nret\nend\nv = sub cp 65536\no_u4 add 55296 shr v 10\no_u4 add 56320 and v 1023\nend\n\nnote u8dec: decode the UTF-8 sequence at sx[i] (end e). Returns the code point or U+FFFD in the\nnote low 32 bits and the bytes consumed above them; an invalid sequence consumes its maximal\nnote subpart, as Python's bytes.decode(errors='replace') does\nfn u8dec i ulong e ulong to ulong\nc = ulong get sx i\nneed = ulong 0\nlo = ulong 128\nhi = ulong 191\ncp = ulong 0\nif and ge c 194 le c 223\nneed = 1\ncp = and c 31\nend\nif and ge c 224 le c 239\nneed = 2\ncp = and c 15\nif eq c 224\nlo = 160\nend\nif eq c 237\nhi = 159\nend\nend\nif and ge c 240 le c 244\nneed = 3\ncp = and c 7\nif eq c 240\nlo = 144\nend\nif eq c 244\nhi = 143\nend\nend\nif eq need 0\nret or 65533 shl ulong 1 32\nend\nk = ulong 1\nwhile le k need bound 4\nif ge add i k e\nret or 65533 shl k 32\nend\nd = ulong get sx add i k\nif or lt d lo gt d hi\nret or 65533 shl k 32\nend\ncp = or shl cp 6 and d 63\nlo = 128\nhi = 191\nk = add k 1\nend\nret or cp shl k 32\nend\n\nnote o_esc: sx[s, s+n) as a quoted JSON string\nfn o_esc s ulong n ulong to void\nob_b uchar 34\ni = s\ne = add s n\nwhile lt i e bound `16777217`\nc = ulong get sx i\nif lt c 128\no_asc c\ni = add i 1\ncontinue\nend\nr = u8dec i e\no_cp and r `4294967295`\ni = add i shr r 32\nend\nob_b uchar 34\nend\n\nfn o_str_sa x ulong to void\np = get so x\nn = get sl x\nfor i ulong n\nput sx i get sa add p i\nend\no_esc 0 n\nend\n\nfn o_ksa t view uchar * x ulong to void\no_key t\no_str_sa x\nend\n\nfn o_code v long to void\nif eq v CTMO\no_qtxt ttimeout\nret\nend\nif eq v CNONE\no_txt tnull\nret\nend\no_num v\nend\n\nnote ======== string arena and lists ========\n\nfn sput b view uchar * to ulong\nn = len b\nx = get gv VSON\np = get gv VSAN\nif or ge x len so gt add p n len sa\ndie tarena 2\nend\ni = ulong 0\nwhile lt i n bound `4194305`\nput sa add p i get b i\ni = add i 1\nend\nput so x p\nput sl x n\nput gv VSAN add p n\nput gv VSON add x 1\nret x\nend\n\nnote sfb: fb[s, s+n) into the arena\nfn sfb s ulong n ulong to ulong\nb = new uchar 65536 0\nif gt n 65536\ndie tlong 2\nend\nfor i ulong n\nput b i get fb add s i\nend\nret sput part b 0 n\nend\n\nfn spop x ulong to void\nput gv VSAN get so x\nput gv VSON x\nend\n\nfn saeq x ulong t view uchar * to bool\nif ne get sl x len t\nret false\nend\np = get so x\nfor i ulong len t\nif ne get sa add p i get t i\nret false\nend\nend\nret true\nend\n\nnote sacmp: bytewise order of two arena strings (-1, 0, 1)\nfn sacmp x ulong y ulong to long\npx = get so x\npy = get so y\nnx = get sl x\nny = get sl y\nm = nx\nif lt ny m\nm = ny\nend\nfor i ulong m\na = get sa add px i\nb = get sa add py i\nif lt a b\nret -1\nend\nif gt a b\nret 1\nend\nend\nif lt nx ny\nret -1\nend\nif gt nx ny\nret 1\nend\nret 0\nend\n\nfn ladd k ulong x ulong to void\nc = get gv add 16 k\nif ge c 2048\ndie tlist 2\nend\nput lst add mul k 2048 c x\nput gv add 16 k add c 1\nend\n\nfn lget k ulong i ulong to ulong\nret get lst add mul k 2048 i\nend\n\nfn lcnt k ulong to ulong\nret get gv add 16 k\nend\n\nnote ======== path and argument builders ========\n\nfn pb_clr to void\nput gv VPBN 0\nend\n\nfn pb_b c uchar to void\nn = get gv VPBN\nif ge n 4095\ndie tpath 2\nend\nput pb n c\nput gv VPBN add n 1\nend\n\nfn pb_txt t view uchar * to void\nfor i ulong len t\npb_b get t i\nend\nend\n\nfn pb_sa x ulong to void\np = get so x\nfor i ulong get sl x\npb_b get sa add p i\nend\nend\n\nfn pb_wd to void\nfor i ulong get gv VWDN\npb_b get wd i\nend\nend\n\nfn pb_cw to void\nfor i ulong get gv VCWN\npb_b get cw i\nend\nend\n\nfn pb_hex slot ulong to void\nfor i ulong 64\npb_b get hsl add mul slot 64 i\nend\nend\n\nfn pb_open flags int mode int to long\nret fopen pb 0 get gv VPBN flags mode\nend\n\nnote pb_bin: the case binary's path, work dir / case name\nfn pb_bin to void\npb_clr\npb_wd\npb_b uchar 47\npb_sa get gv VCN\nend\n\nfn pk_clr to void\nput pk 0 0\nput pk 1 0\nput gv VPKN 2\nput gv VPKC 0\nend\n\nnote pk_pb: append pb as one record of the packed argument list\nfn pk_pb to void\nn = get gv VPBN\nw = get gv VPKN\nc = add get gv VPKC 1\nif or gt c 64 gt add add w 2 n 4096\ndie targs 2\nend\nput pk w uchar and n 255\nput pk add w 1 uchar shr n 8\nfor i ulong n\nput pk add add w 2 i get pb i\nend\nput gv VPKN add add w 2 n\nput gv VPKC c\nput pk 0 uchar and c 255\nput pk 1 uchar shr c 8\nend\n\nfn pk_txt t view uchar * to void\npb_clr\npb_txt t\npk_pb\nend\n\nnote ======== files ========\n\nnote rdfb: the whole of fd (from offset 0) into fb; returns the length\nfn rdfb fd int to ulong\nn = ulong 0\nw = true\nwhile w bound 100000\nk = pread fd fb n sub len fb n long n\nif lt k 0\ndie tread 2\nend\nif eq k 0\nret n\nend\nn = add n ulong k\nif ge n len fb\ndie tbig 2\nend\nend\nret n\nend\n\nnote rdpb: the file named by pb into fb\nfn rdpb to ulong\nfd = pb_open 524288 0\nif lt fd 0\nl_txt tpref\nfor i ulong get gv VPBN\nl_b get pb i\nend\nl_flush 2\ndie topen 2\nend\nn = rdfb int fd\nr = fclose int fd\nret n\nend\n\nfn fsize fd int to ulong\nr = fstat fd stb 0 128\nif lt r 0\ndie tread 2\nend\nv = ulong 0\nfor i ulong 8\nv = or v shl ulong get stb add 48 i mul i 8\nend\nret v\nend\n\nnote wrob: ob[0, n) or gsrc[0, n) (which 0) to fd\nfn wrall fd int which ulong n ulong to void\np = ulong 0\nwhile lt p n bound `1000000`\nk = long 0\nif eq which 0\nk = write fd gsrc p sub n p\nelse\nk = write fd rb p sub n p\nend\nif le k 0\ndie twfail 2\nend\np = add p ulong k\nend\nend\n\nnote ======== SHA-256 (the copied om/sha256 functions) ========\n\nfn hfin c edit shactx slot ulong to void\no = new uchar 32 0\nsha256_final c o\nfor i ulong 32\nb = ulong get o i\nq = add mul slot 64 mul i 2\nput hsl q hexc shr b 4\nput hsl add q 1 hexc and b 15\nend\nend\n\nnote hfd: digest of everything in fd into hsl slot\nfn hfd fd int slot ulong to void\nc = new uchar 104 0\nch = new uchar `1048576` 0\nsha256_init c\np = long 0\nw = true\nwhile w bound `100000000`\nk = pread fd ch 0 `1048576` p\nif lt k 0\ndie tread 2\nend\nif eq k 0\nbreak\nend\nsha256_update c part ch 0 ulong k\np = add p k\nend\nhfin c slot\nend\n\nfn hpb slot ulong to void\nfd = pb_open 524288 0\nif lt fd 0\ndie topen 2\nend\nhfd int fd slot\nr = fclose int fd\nend\n\nnote hglob: digest of gsrc[0, n) (which 0) or ob[0, n)\nfn hglob which ulong n ulong slot ulong to void\nc = new uchar 104 0\nch = new uchar 524288 0\nsha256_init c\np = ulong 0\nwhile lt p n bound `1000000`\nm = sub n p\nif gt m 524288\nm = 524288\nend\nfor i ulong m\nif eq which 0\nput ch i get gsrc add p i\nelse\nput ch i get rb add p i\nend\nend\nsha256_update c part ch 0 m\np = add p m\nend\nhfin c slot\nend\n\nnote ======== processes ========\n\nfn spawn fi int fo int fe int grp bool to long\npid = fork\nif eq pid 0\nif grp\nr = setpgid 0 0\nend\nr = dupfd fi 0 0\nr = dupfd fo 1 0\nr = dupfd fe 2 0\nr = execprog pk 0 get gv VPKN\nexit 127\nend\nif lt pid 0\ndie tfork 2\nend\nif grp\nr = setpgid int pid int pid\nend\nret pid\nend\n\nnote wcode: exit status as Python's returncode (negative signal number when killed)\nfn wcode ws view uchar 4 to long\ns = or ulong get ws 0 shl ulong get ws 1 8\nsg = and s 127\nif eq sg 0\nret long and shr s 8 255\nend\nret neg long sg\nend\n\nfn waitblk pid long to long\nws = new uchar 4 0\nfor i ulong 100000\nr = waitpid int pid ws 0 4 0\nif eq r pid\nret wcode ws\nend\nif ne r -4\ndie twait 2\nend\nend\ndie twait 2\nret 0\nend\n\nnote waitto: reap pid within tmo ns, polling every millisecond. At the deadline the child's\nnote process group gets SIGKILL and the code is CTMO; after a normal exit the group is killed\nnote too, so no grandchild outlives the run\nfn waitto pid long tmo ulong to long\nws = new uchar 4 0\ndl = add ulong monons tmo\nw = true\nwhile w bound `4000000000`\nr = waitpid int pid ws 0 4 1\nif eq r pid\nq = killpid neg int pid 9\nret wcode ws\nend\nif and lt r 0 ne r -4\ndie twait 2\nend\nif ge ulong monons dl\nq = killpid neg int pid 9\nif lt q 0\nq = killpid int pid 9\nend\nc = waitblk pid\nret CTMO\nend\ns = sleepns `1000000`\nend\nret CTMO\nend\n\nfn mfd to int\nr = memfd tmfd 0 len tmfd 1\nif lt r 0\ndie topen 2\nend\nret int r\nend\n\nfn devnull to int\nr = fopen tdevnull 0 len tdevnull 524288 0\nif lt r 0\ndie topen 2\nend\nret int r\nend\n\nnote gitrun: run git (0 status, 1 rev-parse HEAD, 2 rev-parse HEAD^{tree}); stdout into fb\nfn gitrun a ulong to ulong\npk_clr\npk_txt tgit\nif eq a 0\npk_txt tstatus\npk_txt tporc\npk_txt tuntr\nend\nif eq a 1\npk_txt trevp\npk_txt thead\nend\nif eq a 2\npk_txt trevp\npk_txt thtree\nend\nfi = devnull\nfo = mfd\nfe = mfd\npid = spawn fi fo fe false\ncode = waitblk pid\nif ne code 0\ndie tgitf 2\nend\nn = rdfb fo\nr = fclose fi\nr = fclose fo\nr = fclose fe\nret n\nend\n\nfn isws c uchar to bool\nret or or eq c 32 eq c 10 or eq c 13 eq c 9\nend\n\nnote stripfb: fb[0, n) without surrounding white space, into the arena\nfn stripfb n ulong to ulong\ns = ulong 0\ne = n\nwhile and lt s e isws get fb s bound `16777217`\ns = add s 1\nend\nwhile gt e s bound `16777217`\nif not isws get fb sub e 1\nbreak\nend\ne = sub e 1\nend\nret sfb s sub e s\nend\n\nnote dirty: Python's filter, a porcelain line whose path (line[3:]) starts with build/ is ignored\nfn dirty to void\nn = gitrun 0\ns = ulong 0\nbad = false\nl_txt trefd\nwhile lt s n bound `16777217`\ne = s\nwhile and lt e n ne get fb e 10 bound `16777217`\ne = add e 1\nend\nskip = false\nif ge sub e s 9\nskip = true\nfor i ulong 6\nif ne get fb add add s 3 i get tbuild i\nskip = false\nend\nend\nend\nif not skip\nif bad\nl_b uchar 10\nend\nbad = true\nfor i ulong sub e s\nl_b get fb add s i\nend\nend\ns = add e 1\nend\nif bad\nl_b uchar 10\nl_flush 2\nexit 3\nend\nput gv VLN 0\nend\n\nnote ======== recursive removal (shutil.rmtree with ignore_errors) ========\n\nfn isdirl n ulong to bool\nr = lstat rp 0 n stb 0 128\nif lt r 0\nret false\nend\nm = or ulong get stb 16 shl ulong get stb 17 8\nret eq and m 61440 16384\nend\n\nnote rment: one directory entry d[q..] (type ty) of the directory rp[0, n)\nfn rment d view uchar 8192 q ulong ty uchar n ulong dep ulong to void\nm = ulong 0\nwhile ne get d add q m 0 bound 256\nm = add m 1\nend\nif and eq m 1 eq get d q 46\nret\nend\nif and eq m 2 and eq get d q 46 eq get d add q 1 46\nret\nend\nif gt add add n m 1 4095\nret\nend\nput rp n uchar 47\nfor i ulong m\nput rp add add n 1 i get d add q i\nend\nnn = add add n m 1\nisd = eq ty 4\nif eq ty 0\nisd = isdirl nn\nend\nif isd\nrmt nn add dep 1\nelse\nr = unlink rp 0 nn\nend\nend\n\nnote rmbuf: every entry of one getdents batch d[0, k)\nfn rmbuf d view uchar 8192 k ulong n ulong dep ulong to void\np = ulong 0\nwhile lt p k bound 8192\nrl = or ulong get d add p 16 shl ulong get d add p 17 8\nrment d add p 19 get d add p 18 n dep\nif eq rl 0\nret\nend\np = add p rl\nend\nend\n\nnote rmt: remove the directory rp[0, n) and everything below it, never following a symbolic link\nfn rmt n ulong dep ulong to void\nif gt dep 64\nret\nend\nd = new uchar 8192 0\nfor pass ulong 4\nfd = fopen rp 0 n 573440 0\nif lt fd 0\nret\nend\nw = true\nwhile w bound `1000000`\nk = getdnts int fd d 0 8192\nif le k 0\nbreak\nend\nrmbuf d ulong k n dep\nend\nr = fclose int fd\nr = rmdir rp 0 n\nif ge r 0\nret\nend\nend\nend\n\nnote rmpath: rmtree of arena string x (relative to the repository root, or absolute)\nfn rmpath x ulong to void\np = get so x\nn = get sl x\nif or eq n 0 gt n 4095\nret\nend\nfor i ulong n\nput rp i get sa add p i\nend\nif isdirl n\nrmt n 0\nend\nend\n\nfn rmwork to void\nn = get gv VWDN\nif eq n 0\nret\nend\nfor i ulong n\nput rp i get wd i\nend\nif isdirl n\nrmt n 0\nend\nend\n\nfn refuse code int to void\nl_flush 2\nrmwork\nexit code\nend\n\nnote ======== case file ========\n\nfn sdec src view uchar * tp view uint * t ulong to ulong\nty = js_type tp t\nif and ne ty 5 ne ty 6\ndie tschema 2\nend\nb = new uchar 65536 0\nn = js_sget src js_off tp t b\nif lt n 0\ndie tlong 2\nend\nret sput part b 0 ulong n\nend\n\nfn kid x ulong to ulong\nif saeq x kcase\nret 0\nend\nif saeq x kissue\nret 1\nend\nif saeq x kfrag\nret 2\nend\nif saeq x kgate\nret 3\nend\nif saeq x kcomp\nret 4\nend\nif saeq x kom2\nret 5\nend\nif saeq x kmut\nret 6\nend\nif saeq x kargs\nret 7\nend\nif saeq x kexp\nret 8\nend\nif saeq x ktmo\nret 9\nend\nif saeq x kclean\nret 10\nend\nif saeq x khas\nret 11\nend\nif saeq x krep\nret 12\nend\nif saeq x kstat\nret 13\nend\nif saeq x kcases\nret 14\nend\nret 99\nend\n\nnote cscan: value token of each known key of object o into ctok (NONE when absent)\nfn cscan src view uchar * tp view uint * o ulong to void\nfor i ulong 16\nput ctok i NONE\nend\nif ne js_type tp o 1\ndie tschema 2\nend\nk = js_first tp o\nwhile ne k NONE bound `1000000`\nx = sdec src tp k\nid = kid x\nspop x\nif lt id 16\nif ne get ctok id NONE\ndie tdupkey 2\nend\nput ctok id add k 1\nend\nk = js_mnext tp k\nend\nend\n\nnote rdlist: a list of strings into list k (absent: nothing)\nfn rdlist src view uchar * tp view uint * t ulong k ulong to void\nif eq t NONE\nret\nend\nif ne js_type tp t 3\ndie tschema 2\nend\ne = js_first tp t\nwhile ne e NONE bound `1000000`\nladd k sdec src tp e\ne = js_enext tp e\nend\nend\n\nfn mtrip src view uchar * tp view uint * a ulong to void\nif ne js_type tp a 3\ndie tschema 2\nend\ne0 = js_first tp a\nif eq e0 NONE\ndie tschema 2\nend\ne1 = js_enext tp e0\nif eq e1 NONE\ndie tschema 2\nend\ne2 = js_enext tp e1\nif eq e2 NONE\ndie tschema 2\nend\nif ne js_enext tp e2 NONE\ndie tschema 2\nend\nladd 5 sdec src tp e0\nladd 6 sdec src tp e1\nladd 7 sdec src tp e2\nend\n\nnote rdmut: mutate is one [path, old, new] or a list of them; an empty list means none\nfn rdmut src view uchar * tp view uint * t ulong to void\nif eq t NONE\nret\nend\nif ne js_type tp t 3\ndie tschema 2\nend\ne = js_first tp t\nif eq e NONE\nret\nend\nif ne js_type tp e 3\nmtrip src tp t\nret\nend\nwhile ne e NONE bound `1000000`\nmtrip src tp e\ne = js_enext tp e\nend\nend\n\nfn cint src view uchar * tp view uint * t ulong dv long to long\nif eq t NONE\nret dv\nend\nif ne js_type tp t 7\ndie tschema 2\nend\no = js_off tp t\nif not js_isl src o\ndie tschema 2\nend\nret js_tol src o\nend\n\nnote ctmo: timeout seconds (a plain decimal number) as nanoseconds; default 120 s\nfn ctmo src view uchar * tp view uint * t ulong to ulong\nif eq t NONE\nret `120000000000`\nend\nif ne js_type tp t 7\ndie tschema 2\nend\nret tmodec src js_off tp t js_span tp t\nend\n\nnote tmodec: the lexeme src[o, o+n) of a timeout (digits, one optional dot) in nanoseconds\nfn tmodec src view uchar * o ulong n ulong to ulong\nv = ulong 0\nfd = ulong 0\ndot = false\nfor i ulong n\nc = ulong get src add o i\nif and eq c 46 not dot\ndot = true\ncontinue\nend\nif or lt c 48 gt c 57\ndie tschema 2\nend\nif or not dot lt fd 9\nv = add mul v 10 sub c 48\nif dot\nfd = add fd 1\nend\nend\nif gt v `1000000000000000000`\ndie tschema 2\nend\nend\nwhile lt fd 9 bound 10\nif gt v `1000000000000000000`\ndie tschema 2\nend\nv = mul v 10\nfd = add fd 1\nend\nret v\nend\n\nnote cload: read case c into the per-case globals\nfn cload src view uchar * tp view uint * c ulong to void\ncscan src tp c\nfor k ulong 8\nput gv add 16 k 0\nend\nt = get ctok 0\nif eq t NONE\ndie tschema 2\nend\nput gv VCN sdec src tp t\nput gv VGATE NONE\nt = get ctok 3\nif ne t NONE\ng = sdec src tp t\nif gt get sl g 0\nput gv VGATE g\nend\nend\nrdlist src tp get ctok 2 0\nif eq lcnt 0 0\nif eq get gv VGATE NONE\ndie tschema 2\nend\nladd 0 get gv VGATE\nend\nrdlist src tp get ctok 4 1\nrdlist src tp get ctok 7 2\nrdlist src tp get ctok 11 3\nrdlist src tp get ctok 10 4\nrdmut src tp get ctok 6\ncload2 src tp\nend\n\nfn cload2 src view uchar * tp view uint * to void\nput gv VOM2 0\nt = get ctok 5\nif ne t NONE\nif eq js_type tp t 8\nput gv VOM2 1\nend\nend\nt = get ctok 8\nif eq t NONE\ndie tschema 2\nend\nput gl 0 cint src tp t 0\nput gv VTMO ctmo src tp get ctok 9\nr = cint src tp get ctok 12 1\nif lt r 0\nr = 0\nend\nif gt r 65536\ndie tschema 2\nend\nput gv VREP ulong r\nend\n\nnote ======== composition ========\n\nfn hfadd f ulong to void\nn = lcnt 8\nfor i ulong n\nif eq sacmp f lget 8 i 0\nret\nend\nend\nladd 8 f\nend\n\nfn mcheck to void\nfor i ulong lcnt 5\nf = lget 5 i\nfound = false\nfor j ulong lcnt 0\nif eq sacmp f lget 0 j 0\nfound = true\nend\nend\nif not found\nl_txt trefm\nl_sa get gv VCN\nl_b uchar 58\nl_b uchar 32\nl_sa f\nl_txt trefnf\nrefuse 4\nend\nend\nend\n\nnote fbat: does arena string x occur in fb at p\nfn fbat x ulong p ulong to bool\nq = get so x\nn = get sl x\nif gt add p n get gv VFBN\nret false\nend\nfor i ulong n\nif ne get fb add p i get sa add q i\nret false\nend\nend\nret true\nend\n\nnote fbcount: non-overlapping occurrences of x in fb (Python bytes.count)\nfn fbcount x ulong to ulong\nn = get gv VFBN\nm = get sl x\nif eq m 0\nret add n 1\nend\nc = ulong 0\np = ulong 0\nwhile le add p m n bound `16777217`\nif fbat x p\nc = add c 1\np = add p m\nelse\np = add p 1\nend\nend\nret c\nend\n\nfn fbfind x ulong to ulong\nn = get gv VFBN\nm = get sl x\np = ulong 0\nwhile le add p m n bound `16777217`\nif fbat x p\nret p\nend\np = add p 1\nend\nret NONE\nend\n\nnote mutate: apply mutation j (its pattern occurs exactly once) to the fragment in fb\nfn mutate j ulong to void\no = lget 6 j\nw = lget 7 j\nc = fbcount o\nif ne c 1\nl_txt trefm\nl_sa get gv VCN\nl_txt trefpo\nl_num long c\nl_txt treftm\nrefuse 4\nend\nsplice fbfind o get sl o w\nend\n\nnote splice: replace fb[p, p+ol) by arena string w\nfn splice p ulong ol ulong w ulong to void\nn = get gv VFBN\nm = get sl w\ne = add p ol\nnn = add add p m sub n e\nif ge nn len fb\ndie tbig 2\nend\nfbto2 0 0 p\nsato2 p w\nfbto2 e add p m sub n e\nfor i ulong nn\nput fb i get fb2 i\nend\nput gv VFBN nn\nend\n\nfn fbto2 s ulong d ulong n ulong to void\nfor i ulong n\nput fb2 add d i get fb add s i\nend\nend\n\nfn sato2 d ulong w ulong to void\nq = get so w\nfor i ulong get sl w\nput fb2 add d i get sa add q i\nend\nend\n\nfn src_b c uchar to void\nn = get gv VSRCN\nif ge n len gsrc\ndie tbig 2\nend\nput gsrc n c\nput gv VSRCN add n 1\nend\n\nfn compose to void\nput gv VSRCN 0\nif eq get gv VOM2 1\nfor i ulong len tom2\nsrc_b get tom2 i\nend\nend\nfor i ulong lcnt 0\nf = lget 0 i\nhfadd f\npb_clr\npb_sa f\nput gv VFBN rdpb\nfor j ulong lcnt 5\nif eq sacmp lget 5 j f 0\nmutate j\nend\nend\nk = ulong 0\nwhile lt k get gv VFBN bound `16777217`\nsrc_b get fb k\nk = add k 1\nend\nend\nend\n\nnote ccheck: a gate case without a mutation must be exactly the concatenation of its compose list\nfn ccheck to void\nif eq get gv VGATE NONE\nret\nend\nif or gt lcnt 5 0 eq lcnt 1 0\nret\nend\npos = ulong 0\nok = true\nsn = get gv VSRCN\nfor i ulong lcnt 1\npb_clr\npb_sa lget 1 i\nn = rdpb\nif gt add pos n sn\nok = false\nbreak\nend\nk = ulong 0\nwhile lt k n bound `16777217`\nif ne get fb k get gsrc add pos k\nok = false\nbreak\nend\nk = add k 1\nend\npos = add pos n\nend\nif or not ok ne pos sn\nl_txt tref\nl_sa get gv VGATE\nl_txt trefc\nrefuse 5\nend\nend\n\nnote ======== compile and run ========\n\nfn closefd x ulong to void\nif ne get gv x NONE\nr = fclose int get gv x\nput gv x NONE\nend\nend\n\nfn compile to long\nfi = mfd\nwrall fi 0 get gv VSRCN\nr = fseek fi 0 0\npb_bin\nfo = pb_open 524865 493\nif lt fo 0\ndie topen 2\nend\nfe = mfd\npk_clr\npb_clr\npb_cw\npb_txt tomcabs\npk_pb\npid = spawn fi int fo fe false\nr = fclose fi\nr = fclose int fo\ncode = waitblk pid\npb_bin\nr = chmod pb 0 get gv VPBN 493\nclosefd VFDE\nput gv VFDE ulong fe\nret code\nend\n\nnote hasall: true when every stdout_has string occurs in fd's contents\nfn hasall fd int to bool\nfor i ulong lcnt 3\nif not mhas fd lget 3 i\nret false\nend\nend\nret true\nend\n\nnote mhas: substring search over fd in windows of fb2 (each window overlaps the next by m-1)\nfn mhas fd int x ulong to bool\nm = get sl x\nif eq m 0\nret true\nend\nw = sub len fb2 65536\np = ulong 0\nfor it ulong `1000000`\nk = pread fd fb2 0 add w m long p\nif lt k 0\ndie tread 2\nend\ngot = ulong k\nif lt got m\nret false\nend\nlim = add sub got m 1\nif gt lim w\nlim = w\nend\nif inwin x lim\nret true\nend\nif lt got add w m\nret false\nend\np = add p w\nend\nret false\nend\n\nfn inwin x ulong lim ulong to bool\ns = ulong 0\nwhile lt s lim bound `16777217`\nif w2at s x\nret true\nend\ns = add s 1\nend\nret false\nend\n\nfn w2at s ulong x ulong to bool\nq = get so x\nfor i ulong get sl x\nif ne get fb2 add s i get sa add q i\nret false\nend\nend\nret true\nend\n\nfn runone i ulong to void\nfor j ulong lcnt 4\nrmpath lget 4 j\nend\nfi = devnull\nfo = mfd\nfe = mfd\npk_clr\npb_bin\npk_pb\nfor j ulong lcnt 2\npb_clr\npb_sa lget 2 j\npk_pb\nend\npid = spawn fi fo fe true\nr = fclose fi\ncode = waitto pid get gv VTMO\nput rcod i code\nput rmis i 0\nif not hasall fo\nput rmis i 1\nend\nput gl 2 code\nclosefd VFDO\nclosefd VFDE\nput gv VFDO ulong fo\nput gv VFDE ulong fe\nend\n\nfn runall to void\nn = get gv VREP\nput gl 2 CNONE\nt0 = ulong monons\nfor i ulong n\nrunone i\nend\nput gv VNRUN n\nput gv VWALL div sub ulong monons t0 `1000000`\nok = true\nfor i ulong n\nif or ne get rcod i get gl 0 ne get rmis i 0\nok = false\nend\nend\nput gv VOK 0\nif ok\nput gv VOK 1\nend\nend\n\nnote ======== outcome histogram ========\n\nfn okey j ulong to void\nb = mul j 32\nw = ulong 0\nc = get ocod j\nif eq c CTMO\nfor i ulong len ttimeout\nput okb add b i get ttimeout i\nend\nw = len ttimeout\nelse\nw = numfmt c\nfor i ulong w\nput okb add b i get nbuf i\nend\nend\nif ne get omis j 0\nfor i ulong len tmiss\nput okb add add b w i get tmiss i\nend\nw = add w len tmiss\nend\nput okl j w\nend\n\nfn ocmp x ulong y ulong to bool\nnx = get okl x\nny = get okl y\nm = nx\nif lt ny m\nm = ny\nend\nfor i ulong m\na = get okb add mul x 32 i\nb = get okb add mul y 32 i\nif ne a b\nret lt a b\nend\nend\nret lt nx ny\nend\n\nfn ofind nd ulong c long m uchar to ulong\nfor j ulong nd\nif eq get ocod j c\nif eq get omis j m\nret j\nend\nend\nend\nret NONE\nend\n\nnote hist: distinct outcomes in first-seen order (ocod, omis, ocnt); returns their number\nfn hist to ulong\nnd = ulong 0\nfor i ulong get gv VNRUN\nc = get rcod i\nm = get rmis i\nf = ofind nd c m\nif eq f NONE\nif ge nd 1024\ndie tlist 2\nend\nput ocod nd c\nput omis nd m\nput ocnt nd 0\nokey nd\nf = nd\nnd = add nd 1\nend\nput ocnt f add get ocnt f 1\nend\nret nd\nend\n\nfn o_hist nd ulong to void\nfor i ulong nd\nput oord i i\nend\nfor i ulong nd\nj = i\nwhile gt j 0 bound 1024\na = get oord sub j 1\nb = get oord j\nif not ocmp b a\nbreak\nend\nput oord sub j 1 b\nput oord j a\nj = sub j 1\nend\nend\no_open uchar 123\nfor i ulong nd\nj = get oord i\no_item\nob_b uchar 34\nfor k ulong get okl j\nob_b get okb add mul j 32 k\nend\nob_b uchar 34\no_colon\no_num long get ocnt j\nend\no_close uchar 125\nend\n\nfn l_hist nd ulong to void\nl_b uchar 123\nfor j ulong nd\nif gt j 0\nl_b uchar 44\nl_b uchar 32\nend\nl_b uchar 39\nfor k ulong get okl j\nl_b get okb add mul j 32 k\nend\nl_b uchar 39\nl_b uchar 58\nl_b uchar 32\nl_num long get ocnt j\nend\nl_b uchar 125\nend\n\nnote ======== check entries ========\n\nnote o_tail: the last cap bytes of fd's contents, cut forward to a UTF-8 boundary\nfn o_tail x ulong cap ulong to void\nif eq get gv x NONE\no_esc 0 0\nret\nend\nfd = int get gv x\nn = fsize fd\ns = ulong 0\nif gt n cap\ns = sub n cap\nend\no_tl fd s sub n s\nend\n\nnote o_tl: n bytes of fd from s, skipping up to 3 leading UTF-8 continuation bytes when s > 0\nfn o_tl fd int s ulong n ulong to void\nk = pread fd sx 0 n long s\nif lt k 0\ndie tread 2\nend\nm = ulong k\nb = ulong 0\nw = gt s 0\nwhile and w lt b 3 bound 4\nif ge b m\nbreak\nend\nif ne and get sx b 192 128\nbreak\nend\nb = add b 1\nend\no_esc b sub m b\nend\n\nfn o_full x ulong to void\nfd = int get gv x\nn = fsize fd\nif ge n len sx\ndie tbig 2\nend\nk = pread fd sx 0 n long 0\nif lt k 0\ndie tread 2\nend\no_esc 0 ulong k\nend\n\nfn o_mutobj i ulong to void\no_open uchar 123\no_ksa kfile lget 5 i\no_ksa kfrom lget 6 i\no_ksa kto lget 7 i\no_close uchar 125\nend\n\nfn o_mut to void\nn = lcnt 5\nif eq n 0\nret\nend\no_key kmutat\nif eq n 1\no_mutobj 0\nret\nend\no_open uchar 91\nfor i ulong n\no_item\no_mutobj i\nend\no_close uchar 93\nend\n\nfn o_opt src view uchar * tp view uint * t ulong to void\nif eq t NONE\no_txt tnull\nelse\no_tree src tp t\nend\nend\n\nnote o_head: the keys every check entry has before mutation\nfn o_head src view uchar * tp view uint * to void\no_ksa kcase get gv VCN\no_key kcexit\no_num get gl 1\no_key kexpx\no_num get gl 0\no_key kissue\no_opt src tp get ctok 1\no_mut\nend\n\nfn emitfail src view uchar * tp view uint * to void\no_item\no_open uchar 123\no_head src tp\no_key krunx\no_txt tnull\no_key ksrcsha\no_hex 0\no_key kstderr\no_full VFDE\no_key kverd\no_qtxt tfailw\no_close uchar 125\nput gv VFAIL add get gv VFAIL 1\nend\n\nfn emitok src view uchar * tp view uint * nd ulong to void\no_item\no_open uchar 123\no_key kbsha\no_hex 1\no_head src tp\nif gt get gv VNRUN 1\no_key krep\no_open uchar 123\no_key kouts\no_hist nd\no_key kruns\no_num long get gv VNRUN\no_close uchar 125\nend\no_key krunx\no_code get gl 2\no_key ksrcsha\no_hex 0\no_key kstderr\no_tail VFDE 2000\no_key kstdout\no_tail VFDO 4000\nif gt lcnt 3 0\no_key khas\no_tree src tp get ctok 11\nend\no_key kverd\nif eq get gv VOK 1\no_qtxt tpass\nelse\no_qtxt tfailw\nend\no_key kwall\no_num long get gv VWALL\no_close uchar 125\nend\n\nfn pline nd ulong to void\nif eq get gv VOK 1\nl_txt tpass\nput gv VPASS add get gv VPASS 1\nelse\nl_txt tfailw\nput gv VFAIL add get gv VFAIL 1\nend\nl_b uchar 32\nl_sa get gv VCN\nl_txt texpe\nl_num get gl 0\nl_txt tgot\nl_code get gl 2\nif gt get gv VNRUN 1\nl_txt truns\nl_hist nd\nend\nl_b uchar 10\nl_flush 1\nend\n\nnote A case that does not compile still gets its console line (it is a FAIL\nnote in the receipt, so the summary counts it). The Python ORACLE printed\nnote nothing for it.\nfn cfline to void\nl_txt tfailw\nl_b uchar 32\nl_sa get gv VCN\nl_txt texpe\nl_num get gl 0\nl_txt tcomp\nl_num get gl 1\nl_b uchar 10\nl_flush 1\nend\n\nfn docase src view uchar * tp view uint * c ulong to void\ncload src tp c\nmcheck\ncompose\nccheck\nhglob 0 get gv VSRCN 0\nce = compile\nput gl 1 ce\nif ne ce 0\nemitfail src tp\ncfline\nclosefd VFDE\nret\nend\nrunall\npb_bin\nhpb 1\nnd = hist\nemitok src tp nd\npline nd\nclosefd VFDO\nclosefd VFDE\nend\n\nnote ======== JSON copy of case-file values (keys sorted, duplicates refused) ========\n\nfn o_jstr src view uchar * tp view uint * t ulong to void\nb = new uchar 65536 0\nn = js_sget src js_off tp t b\nif lt n 0\ndie tlong 2\nend\nfor i ulong ulong n\nput sx i get b i\nend\no_esc 0 ulong n\nend\n\nfn kpush src view uchar * tp view uint * k ulong to void\nb = new uchar 65536 0\nn = js_sget src js_off tp k b\nif lt n 0\ndie tlong 2\nend\nkstore b ulong n k\nend\n\nfn kstore b view uchar 65536 n ulong k ulong to void\np = get gv VKPN\ns = get gv VKSN\nif or gt add p n len kp gt add s 3 len ks\ndie tarena 2\nend\nfor i ulong n\nput kp add p i get b i\nend\nput ks s p\nput ks add s 1 n\nput ks add s 2 k\nput gv VKSN add s 3\nput gv VKPN add p n\nend\n\nfn kcmp a ulong b ulong to long\npa = get ks a\nna = get ks add a 1\npb2 = get ks b\nnb2 = get ks add b 1\nm = na\nif lt nb2 m\nm = nb2\nend\nfor i ulong m\nx = get kp add pa i\ny = get kp add pb2 i\nif lt x y\nret -1\nend\nif gt x y\nret 1\nend\nend\nif lt na nb2\nret -1\nend\nif gt na nb2\nret 1\nend\nret 0\nend\n\nfn kswap x ulong y ulong to void\nfor q ulong 3\na = get ks add x q\nput ks add x q get ks add y q\nput ks add y q a\nend\nend\n\nfn ksort base ulong top ulong to void\ni = add base 3\nwhile lt i top bound `1000000`\nj = i\nwhile gt j base bound `1000000`\nc = kcmp sub j 3 j\nif eq c 0\ndie tdupkey 2\nend\nif lt c 0\nbreak\nend\nkswap sub j 3 j\nj = sub j 3\nend\ni = add i 3\nend\nend\n\nfn o_kp e ulong to void\np = get ks e\nn = get ks add e 1\nfor i ulong n\nput sx i get kp add p i\nend\no_esc 0 n\nend\n\nfn o_obj src view uchar * tp view uint * t ulong to void\no_open uchar 123\nbase = get gv VKSN\nkb = get gv VKPN\nk = js_first tp t\nwhile ne k NONE bound `1000000`\nkpush src tp k\nk = js_mnext tp k\nend\ntop = get gv VKSN\nksort base top\ni = base\nwhile lt i top bound `1000000`\no_item\no_kp i\no_colon\no_tree src tp add get ks add i 2 1\ni = add i 3\nend\nput gv VKSN base\nput gv VKPN kb\no_close uchar 125\nend\n\nfn o_arr src view uchar * tp view uint * t ulong to void\no_open uchar 91\ne = js_first tp t\nwhile ne e NONE bound `1000000`\no_item\no_tree src tp e\ne = js_enext tp e\nend\no_close uchar 93\nend\n\nfn o_tree src view uchar * tp view uint * t ulong to void\nty = js_type tp t\nif eq ty 1\no_obj src tp t\nret\nend\nif eq ty 3\no_arr src tp t\nret\nend\nif or eq ty 5 eq ty 6\no_jstr src tp t\nret\nend\nif eq ty 7\no = js_off tp t\nfor i ulong js_span tp t\nob_b get src add o i\nend\nret\nend\nif eq ty 8\no_txt ttrue\nret\nend\nif eq ty 9\no_txt tfalse\nret\nend\no_txt tnull\nend\n\nnote ======== receipt fields ========\n\nnote sfile: a small text file (path text t), trimmed, into the arena\nfn sfile t view uchar * to ulong\npb_clr\npb_txt t\nret stripfb rdpb\nend\n\nnote o_plat: system release machine node, as platform.uname() gives them\nfn o_plat to void\na = sfile tostype\nb = sfile tosrel\nc = sfile thost\nn = sxsa 0 a\nput sx n 32\nn = sxsa add n 1 b\nput sx n 32\nn = add n 1\nfor i ulong len tmach\nput sx add n i get tmach i\nend\nn = add n len tmach\nput sx n 32\nn = sxsa add n 1 c\no_esc 0 n\nend\n\nnote sxsa: arena string x into sx at n; returns the end\nfn sxsa n ulong x ulong to ulong\np = get so x\nm = get sl x\nfor i ulong m\nput sx add n i get sa add p i\nend\nret add n m\nend\n\nnote pnum: a decimal number in fb at p; returns the value and moves gv VNOUT past it\nfn pnum p ulong n ulong to ulong\nv = ulong 0\nq = p\nwhile and lt q n and ge get fb q 48 le get fb q 57 bound 32\nv = add mul v 10 sub ulong get fb q 48\nq = add q 1\nend\nput gv VNOUT q\nret v\nend\n\nnote o_affin: Cpus_allowed_list of this process, expanded (os.sched_getaffinity)\nfn o_affin to void\npb_clr\npb_txt tpstat\nn = rdpb\np = ulong 0\nf = NONE\nwhile lt p n bound `16777217`\nif fbtxt p tcpus\nf = add p len tcpus\nbreak\nend\nwhile and lt p n ne get fb p 10 bound `16777217`\np = add p 1\nend\np = add p 1\nend\no_open uchar 91\nif eq f NONE\no_close uchar 93\nret\nend\np = f\nwhile and lt p n or eq get fb p 9 eq get fb p 32 bound 64\np = add p 1\nend\nw = true\nwhile w bound 4096\na = pnum p n\np = get gv VNOUT\nb = a\nif and lt p n eq get fb p 45\nb = pnum add p 1 n\np = get gv VNOUT\nend\nv = a\nwhile le v b bound 65536\no_item\no_num long v\nv = add v 1\nend\nif or ge p n ne get fb p 44\nbreak\nend\np = add p 1\nend\no_close uchar 93\nend\n\nfn fbtxt p ulong t view uchar * to bool\nfor i ulong len t\nif ne get fb add p i get t i\nret false\nend\nend\nret true\nend\n\nfn sxd p ulong v ulong w ulong to void\nx = v\nk = w\nwhile gt k 0 bound 8\nk = sub k 1\nput sx add p k uchar add 48 rem x 10\nx = div x 10\nend\nend\n\nnote o_time: datetime.now(timezone.utc).isoformat()\nfn o_time to void\nns = ulong realns\nsecs = div ns `1000000000`\nsdate div secs 86400\no_time2 rem secs 86400 div rem ns `1000000000` 1000\nend\n\nnote sdate: YYYY-MM-DDT for day number t since 1970-01-01 (civil_from_days, H. Hinnant)\nfn sdate t ulong to void\nz = add t 719468\nera = div z 146097\ndoe = sub z mul era 146097\nyoe = yoef doe\ny = add yoe mul era 400\ndoy = sub doe sub add mul 365 yoe div yoe 4 div yoe 100\nmp = div add mul 5 doy 2 153\nd = add sub doy div add mul 153 mp 2 5 1\nm = add mp 3\nif ge mp 10\nm = sub mp 9\nend\nif le m 2\ny = add y 1\nend\nsxd 0 y 4\nput sx 4 45\nsxd 5 m 2\nput sx 7 45\nsxd 8 d 2\nput sx 10 84\nend\n\nfn yoef doe ulong to ulong\na = sub doe div doe 1460\nb = add a div doe 36524\nret div sub b div doe 146096 365\nend\n\nfn o_time2 sod ulong us ulong to void\nsxd 11 div sod 3600 2\nput sx 13 58\nsxd 14 div rem sod 3600 60 2\nput sx 16 58\nsxd 17 rem sod 60 2\nn = ulong 19\nif gt us 0\nput sx 19 46\nsxd 20 us 6\nn = 26\nend\nput sx n 43\nsxd add n 1 0 2\nput sx add n 3 58\nsxd add n 4 0 2\no_esc 0 add n 6\nend\n\nfn o_hashes to void\nn = lcnt 8\nfor i ulong n\nj = i\nwhile gt j 0 bound 2048\na = lget 8 sub j 1\nb = lget 8 j\nif le sacmp a b 0\nbreak\nend\nput lst add 16384 sub j 1 b\nput lst add 16384 j a\nj = sub j 1\nend\nend\no_open uchar 123\nfor i ulong n\nf = lget 8 i\no_item\no_str_sa f\no_colon\npb_clr\npb_sa f\nhpb 2\no_hex 2\nend\no_close uchar 125\nend\n\nfn o_script src view uchar * tp view uint * to void\no_open uchar 123\no_key kbsha\npb_clr\npb_sa get gv VBIN\nhpb 2\no_hex 2\no_key kcases\no_tree src tp 0\no_key kcsha\npb_clr\npb_sa get gv VCASP\nhpb 2\no_hex 2\no_key kpath\no_qtxt tsrcrel\no_key ksha\npb_clr\npb_sa get gv VDRV\nhpb 2\no_hex 2\no_key ksource\npb_clr\npb_sa get gv VDRV\nfd = pb_open 524288 0\nif lt fd 0\ndie topen 2\nend\nput gv VFDO ulong fd\no_full VFDO\nr = fclose int fd\nput gv VFDO NONE\no_close uchar 125\nend\n\nfn o_rest src view uchar * tp view uint * to void\no_key kcompil\no_open uchar 123\no_key kpath\no_qtxt tomcrel\no_key ksha\npb_clr\npb_txt tomcrel\nhpb 2\no_hex 2\no_close uchar 125\no_key kaffin\no_affin\no_key kexecu\no_qtxt texec\no_key khashes\no_hashes\no_key kissue\no_tree src tp get gv VTISS\no_key kplat\no_plat\no_key kproj\no_qtxt tproj\no_key kscript\no_script src tp\no_ksa kscom get gv VHEAD\no_ksa kstree get gv VTREE\no_key kstat\nif eq get gv VTSTA NONE\no_open uchar 123\no_close uchar 125\nelse\no_tree src tp get gv VTSTA\nend\no_key ksumm\no_open uchar 123\no_key kfail\no_num long get gv VFAIL\no_key kpass\no_num long get gv VPASS\no_close uchar 125\no_key ktime\no_time\nend\n\nnote ======== setup ========\n\nnote argsa: argument i into the arena\nfn argsa i ulong to ulong\nb = new uchar 4096 0\nn = argread i b 0 4096\nif lt n 0\ndie tpath 2\nend\nret sput part b 0 ulong n\nend\n\nnote self: the driver binary is argv0; its source is the sibling seed/node/schedrcpt.om of the\nnote build/node/schedrcpt it was invoked as\nfn self to void\nx = argsa 0\nn = get sl x\nm = len tsuffix\nif lt n m\ndie tself 2\nend\np = get so x\nfor i ulong m\nif ne get sa add add p sub n m i get tsuffix i\ndie tself 2\nend\nend\nput gv VBIN x\nb = new uchar 4096 0\nfor i ulong sub n m\nput b i get sa add p i\nend\nk = sub n m\nfor i ulong len tsrcrel\nput b add k i get tsrcrel i\nend\nput gv VDRV sput part b 0 add k len tsrcrel\nend\n\nnote mkbuild: create build/node in the tree under test, the README's build\nnote step (mkdir -p build/node; build/ is outside the dirty check). Gates\nnote open journals and work directories below it, and jn_open creates only\nnote the last directory of its path.\nfn mkbuild to void\nr = makedir tbn 0 5 493\nif and lt r 0 ne r neg long 17\ndie tbnf 2\nend\nr = makedir tbn 0 10 493\nif and lt r 0 ne r neg long 17\ndie tbnf 2\nend\nend\n\nfn mkwork to void\nr = new uchar 8 0\nq = random r 0 8 0\nif ne q 8\ndie tmkwork 2\nend\npb_clr\npb_txt twdpre\nfor i ulong 8\nb = ulong get r i\npb_b hexc shr b 4\npb_b hexc and b 15\nend\nq = makedir pb 0 get gv VPBN 448\nif lt q 0\ndie tmkwork 2\nend\nfor i ulong get gv VPBN\nput wd i get pb i\nend\nput gv VWDN get gv VPBN\nend\n\nfn ldcases src edit uchar * to ulong\npb_clr\npb_sa get gv VCASP\nfd = pb_open 524288 0\nif lt fd 0\ndie tcasesf 2\nend\nn = ulong 0\nw = true\nwhile w bound `1000000`\nk = pread int fd src n sub len src n long n\nif lt k 0\ndie tcasesf 2\nend\nif eq k 0\nbreak\nend\nn = add n ulong k\nif ge n len src\ndie tcasesf 2\nend\nend\nr = fclose int fd\nret n\nend\n\nfn wflag to bool\nf = false\nfor i ulong sub ulong argcnt 1\nx = argsa add i 1\nif saeq x twrite\nf = true\nend\nspop x\nend\nret f\nend\n\nnote save: write the receipt (ob) and print its path (--write) or put it in /tmp\nfn save wr bool to void\nn = get gv VOBN\npb_clr\nif wr\no = get gv VOUT\npb_sa o\nfor i ulong get gv VPBN\nif and gt i 0 eq get pb i 47\nr = makedir pb 0 i 493\nend\nend\nr = makedir pb 0 get gv VPBN 493\nif ne get pb sub get gv VPBN 1 47\npb_b uchar 47\nend\npb_txt trcpre\nelse\npb_txt ttmppre\nend\npb_hex 2\npb_txt tjson\nfl = int 524865\nif wr\nfl = 524481\nend\nfd = pb_open fl 420\nif lt fd 0\ndie twfail 2\nend\nwrall int fd 1 n\nr = fclose int fd\nif wr\nif ne get pb 0 47\nfor i ulong get gv VCWN\nl_b get cw i\nend\nl_b uchar 47\nend\nfor i ulong get gv VPBN\nl_b get pb i\nend\nl_b uchar 10\nl_flush 1\nend\nend\n\nfn main to int\nsrc = new uchar 983040 0\ntp = new uint 262144 0\nif lt argcnt 3\ndie tusage 2\nend\nput gv VFDO NONE\nput gv VFDE NONE\nself\nput gv VCASP argsa 1\nput gv VOUT argsa 2\nwr = wflag\nq = cwd cw 0 4096\nif lt q 2\ndie tpath 2\nend\nput gv VCWN sub ulong q 1\nn = ldcases src\nr = js_init tp 983040 48\nif lt r 0\ndie tnotjson 2\nend\nr = js_parse src tp n\nif lt r 0\ndie tnotjson 2\nend\ncscan src tp 0\nput gv VTISS get ctok 1\nput gv VTSTA get ctok 13\nput gv VTCAS get ctok 14\nif or eq get gv VTISS NONE eq get gv VTCAS NONE\ndie tschema 2\nend\nif ne js_type tp get gv VTCAS 3\ndie tschema 2\nend\ndirty\nput gv VHEAD stripfb gitrun 1\nput gv VTREE stripfb gitrun 2\nmkbuild\nmkwork\no_open uchar 123\no_key kchecks\no_open uchar 91\ne = js_first tp get gv VTCAS\nwhile ne e NONE bound `1000000`\ndocase src tp e\ne = js_enext tp e\nend\no_close uchar 93\nrmwork\nput gv VWDN 0\no_rest src tp\no_close uchar 125\nob_b uchar 10\nhglob 1 get gv VOBN 2\nl_txt tsumm\nl_num long get gv VPASS\nl_txt tsfail\nl_num long get gv VFAIL\nl_txt tsdig\nfor i ulong 64\nl_b get hsl add 128 i\nend\nl_b uchar 10\nl_flush 1\nsave wr\nif eq get gv VFAIL 0\nret 0\nend\nret 1\nend\n" 186 }, 187 "source_commit": "`bd57beaacba7b79395f4f231f907f6af0ba9a926`", 188 "source_tree": "`87a6b6f92f289efaae227b8f7c8836c000712c27`", 189 "statuses": { 190 "DRA-399": "IMPLEMENTED; bench EXERCISED only by this receipt; not QUALIFIED; not MERGED; not DEPLOYED", 191 "expected_exits": "derived from the check site each mutant targets (field why), before the run", 192 "gpu": "NOT_RUN (not involved)", 193 "timing": "wall times depend on the cores the run was given; they are recorded with the bench output, not claimed as speed" 194 }, 195 "summary": { 196 "fail": 0, 197 "pass": 4 198 }, 199 "timestamp_utc": "2026-11-07T11:50:00.367766+00:00" 200 }