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/aien-architecture-mv/blob/main/tools/candidate/check_pins.om # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-architecture-mv / tools / candidate / check_pins.om` 1655 lines ยท 26326 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note check_pins: do the pins of a candidate manifest equal what the pinned code consumes? 3 note Seeded native Omega port of scripts/check_candidate_pins.sh (aien-architecture #316). 4 note usage: check_pins exit 0 = every pin agrees, 1 = any mismatch or read failure 5 note check_candidate proves each pinned commit exists; this program proves the pins agree with each 6 note other. It reads the lock files of the pinned commits and compares: 7 note sovereign-core omega.lock = [commits] omega 8 note sovereign-core Cargo.lock aien-protocols rev = [commits] aien-protocols 9 note sovereign-core Cargo.lock crumb-spec rev = [contracts] crumb-spec 10 note sovereign-core Cargo.lock spark-crumbs rev = [contracts] spark-crumbs 11 note omega physics.lock = [commits] physics (when pinned) 12 note omega aienos.lock = [commits] aienos 13 note every [consumed_pins] key it knows = the value read from its lock file 14 note A Cargo.lock package with more than one git revision, or a lock file that cannot be read, fails. 15 note A Cargo.lock source counts under the repo's name or its -mv name (aien-dev/-mv, issue 815, 16 note sovereign-core #906); both names are one pin, so two revisions across them are "several". 17 note A contract the manifest states as built in-tree, contracts.-consumed = "in-tree" (sovereign-core 18 note #892, mirroring its [pins] "in-tree"), must have a path package (no source line) in Cargo.lock 19 note and no git source under either name; its [contracts] commit is then not compared with Cargo.lock. 20 note Files come from `gh api -H "Accept: application/vnd.github.raw" repos/aien-dev//contents/?ref=`, 21 note or from the command in CAND_FILE_AT (run as: $CAND_FILE_AT , printing the file). 22 note Same lines, same order and same exit code as the bash it replaces: the [consumed_pins] walk 23 note follows a bash 5.2 associative array (FNV-1 hash, 1024 buckets, x4 growth, newest first in a 24 note bucket). Children run through /bin/sh with this process's environment replayed from a memfd. 25 note Capacities (exit 70 beyond them): a manifest or a fetched file of 999000 bytes, 4096 keys, 26 note 256 git revisions of one package in Cargo.lock, a child argument list of 4096 bytes. 27 note See tools/candidate/README.md for the parsed subset and the named limits. 28 29 text tsh "set -a\n. \"$1\"\nset +a\nshift\nexec \"$@\"\n" 30 text tm "usage: \n \nFAIL: \nOK: \nmanifest lacks commits.aien-sovereign-core or commits.omega\nsovereign-core omega.lock -> commits.omega\n: not pinned in the manifest\n = \n: manifest pins \n, the code consumes \ncannot read omega.lock at aien-sovereign-core \nsovereign-core Cargo.lock \n -> \n: git revision \ncannot read Cargo.lock at aien-sovereign-core \nomega aienos.lock -> commits.aienos\ncannot read aienos.lock at omega \nomega physics.lock -> commits.physics\ncannot read physics.lock at omega \nSKIP: consumed_pins.\n (not read by this script)\nconsumed_pins.\n: its lock file could not be read\nPINS AGREE: \nPINS DISAGREE: \nnone\nseveral:\ncheck_pins: input over capacity\n = in-tree (a path package with no git source, built from aien-sovereign-core \n)\n = in-tree, but Cargo.lock has a git source for it at \n = in-tree, but Cargo.lock has no path package named \n = \"\n\": the only accepted value is \"in-tree\"\n (Cargo.lock has a path package \n: the crate is built in-tree, which this manifest does not state with \n = \"in-tree\")\n" 31 text tk "commits.aien-sovereign-core\ncommits.omega\ncommits.aienos\ncommits.physics\ncommits.aien-protocols\ncontracts.crumb-spec\ncontracts.spark-crumbs\naien-protocols\ncrumb-spec\nspark-crumbs\nomega.lock\nCargo.lock\nphysics.lock\naienos.lock\nargus.lock\naien-sovereign-core\nomega\nconsumed_pins.\nsovereign-core-omega-lock\nsovereign-core-cargo-lock-aien-protocols\nomega-physics-lock\nomega-aienos-lock\nomega-argus-lock\nCAND_FILE_AT\n/bin/sh\n-c\nsh\n/proc/self/fd/\ngh\napi\n-H\nAccept: application/vnd.github.raw\nrepos/aien-dev/\n/contents/\n?ref=\nenvfile\nsource = \"git+https://github.com/aien-dev/\n.git\n-mv\ncontracts.crumb-spec-consumed\ncontracts.spark-crumbs-consumed\nin-tree\n[[package]]\nname = \nsource = \n" 32 33 const CAP ulong 999000 34 const MASK ulong `4294967295` 35 36 global src uchar 999128 37 global srcn ulong 1 38 global pool uchar `1998000` 39 global pooln ulong 1 40 global poolm ulong 1 41 global kof ulong 8192 42 global kln ulong 8192 43 global vof ulong 8192 44 global vln ulong 8192 45 global khs ulong 8192 46 global knx ulong 8192 47 global kbk ulong 8192 48 global kb2 ulong 4096 49 global nen ulong 2 50 global nbk ulong 2 51 global secb uchar 8192 52 global secl ulong 1 53 global arg uchar 8192 54 global argl ulong 1 55 global obuf uchar `1100000` 56 global obl ulong 1 57 global fpath uchar 4096 58 global fpl ulong 1 59 global a0 uchar 4096 60 global a0l ulong 1 61 global stb uchar 128 62 global failf ulong 1 63 global pk uchar 4096 64 global pkn ulong 1 65 global pkc ulong 1 66 global ebuf uchar 65600 67 global ewb uchar 131200 68 global ev uchar 65600 69 global evl ulong 1 70 global efd long 1 71 global epath uchar 32 72 global epl ulong 1 73 global status uchar 4 74 global rmode ulong 1 75 global nbuf uchar 24 76 global pfd uchar 8 77 global cap uchar 999000 78 global capn ulong 1 79 global lab uchar 8192 80 global labl ulong 1 81 global lk uchar 240 82 global lkl ulong 6 83 global revs uchar 10240 84 global revn ulong 1 85 global sevl ulong 1 86 global fla ulong 1 87 88 note ---- text tables ---- 89 90 fn om i ulong to void 91 s = ulong 0 92 k = ulong 0 93 while lt k i bound 8192 94 if eq get tm s 10 95 k = add k 1 96 end 97 s = add s 1 98 end 99 n = get obl 0 100 while ne get tm s 10 bound 8191 101 put obuf n get tm s 102 n = add n 1 103 s = add s 1 104 end 105 put obl 0 n 106 end 107 108 fn kp i ulong to void 109 s = ulong 0 110 k = ulong 0 111 while lt k i bound 8192 112 if eq get tk s 10 113 k = add k 1 114 end 115 s = add s 1 116 end 117 n = ulong 0 118 while ne get tk add s n 10 bound 8191 119 put arg n get tk add s n 120 n = add n 1 121 end 122 put argl 0 n 123 end 124 125 fn over to void 126 put obl 0 0 127 om 27 128 oc 10 129 oflush 2 130 exit 70 131 end 132 133 note ---- output line ---- 134 135 fn oc c uchar to void 136 n = get obl 0 137 put obuf n c 138 put obl 0 add n 1 139 end 140 141 fn oflush fd int to void 142 r = write fd obuf 0 get obl 0 143 put obl 0 0 144 end 145 146 fn opool o ulong n ulong to void 147 b = get obl 0 148 for i ulong n 149 put obuf add b i get pool add o i 150 end 151 put obl 0 add b n 152 end 153 154 fn oarg to void 155 b = get obl 0 156 for i ulong get argl 0 157 put obuf add b i get arg i 158 end 159 put obl 0 add b get argl 0 160 end 161 162 fn ofile to void 163 b = get obl 0 164 for i ulong get fpl 0 165 put obuf add b i get fpath i 166 end 167 put obl 0 add b get fpl 0 168 end 169 170 fn okey x ulong to void 171 opool get kof x get kln x 172 end 173 174 fn oval e long to void 175 if ge e 0 176 opool get vof ulong e get vln ulong e 177 end 178 end 179 180 fn onum v ulong to void 181 d = ulong 0 182 while gt v 0 bound 24 183 put nbuf d uchar rem v 10 184 v = div v 10 185 d = add d 1 186 end 187 if eq d 0 188 put nbuf 0 0 189 d = ulong 1 190 end 191 for i ulong d 192 oc add 48 get nbuf sub sub d 1 i 193 end 194 end 195 196 fn fail0 to void 197 put obl 0 0 198 om 2 199 end 200 201 fn fail1 to void 202 oc 10 203 oflush 2 204 put failf 0 1 205 end 206 207 208 note ---- key table: bash 5.2 associative array order ---- 209 210 fn hashk to ulong 211 h = ulong `2166136261` 212 for j ulong get argl 0 213 h = and mul h `16777619` MASK 214 h = xor h ulong get arg j 215 end 216 ret h 217 end 218 219 fn treset t ulong to void 220 put nbk t 1024 221 put nen t 0 222 for b ulong 1024 223 put kbk add mul t 4096 b 0 224 end 225 end 226 227 fn keyeq x ulong to bool 228 n = get argl 0 229 if ne get kln x n 230 ret false 231 end 232 o = get kof x 233 for i ulong n 234 if ne get pool add o i get arg i 235 ret false 236 end 237 end 238 ret true 239 end 240 241 fn tfind t ulong to long 242 h = hashk 243 b = and h sub get nbk t 1 244 e = get kbk add mul t 4096 b 245 while ne e 0 bound 8192 246 e = sub e 1 247 if eq get khs e h 248 if keyeq e 249 ret long e 250 end 251 end 252 e = get knx e 253 end 254 ret -1 255 end 256 257 fn pcopy o ulong n ulong to void 258 p = get pooln 0 259 if gt add p n len pool 260 over 261 end 262 for i ulong n 263 put pool add p i get src add o i 264 end 265 put pooln 0 add p n 266 end 267 268 fn acopy to void 269 p = get pooln 0 270 n = get argl 0 271 if gt add p n len pool 272 over 273 end 274 for i ulong n 275 put pool add p i get arg i 276 end 277 put pooln 0 add p n 278 end 279 280 fn tlink t ulong x ulong h ulong to void 281 b = add mul t 4096 and h sub get nbk t 1 282 put knx x get kbk b 283 put kbk b add x 1 284 end 285 286 fn rehash t ulong j ulong to void 287 e = get kb2 j 288 while ne e 0 bound 8192 289 x = sub e 1 290 n = get knx x 291 tlink t x get khs x 292 e = n 293 end 294 end 295 296 fn tgrow t ulong to void 297 nb = get nbk t 298 if gt mul nb 4 4096 299 over 300 end 301 tb = mul t 4096 302 for b ulong nb 303 put kb2 b get kbk add tb b 304 put kbk add tb b 0 305 end 306 put nbk t mul nb 4 307 for j ulong nb 308 rehash t j 309 end 310 end 311 312 fn tset t ulong vs ulong vn ulong to void 313 e = tfind t 314 if ge e 0 315 x = ulong e 316 put vof x get pooln 0 317 put vln x vn 318 pcopy vs vn 319 ret 320 end 321 if ge get nen t mul get nbk t 2 322 tgrow t 323 end 324 n = get nen t 325 if ge n 4096 326 over 327 end 328 x = add mul t 4096 n 329 put kof x get pooln 0 330 put kln x get argl 0 331 acopy 332 put vof x get pooln 0 333 put vln x vn 334 pcopy vs vn 335 h = hashk 336 put khs x h 337 tlink t x h 338 put nen t add n 1 339 end 340 341 note ---- the line parser: key = "value" [# comment], [section] [# comment], the rest ignored ---- 342 343 fn isws c uchar to bool 344 ret or eq c 32 and ge c 9 le c 13 345 end 346 347 fn iskc c uchar to bool 348 d = or and ge c 48 le c 57 and ge c 65 le c 90 349 d = or d and ge c 97 le c 122 350 ret or d or eq c 95 or eq c 46 eq c 45 351 end 352 353 fn skipws i ulong e ulong to ulong 354 while lt i e bound 999999 355 if not isws get src i 356 ret i 357 end 358 i = add i 1 359 end 360 ret i 361 end 362 363 fn skipkc i ulong e ulong to ulong 364 while lt i e bound 999999 365 if not iskc get src i 366 ret i 367 end 368 i = add i 1 369 end 370 ret i 371 end 372 373 fn notq i ulong e ulong to bool 374 ret and lt i e ne get src i 34 375 end 376 377 fn skipnq i ulong e ulong to ulong 378 while notq i e bound 999999 379 i = add i 1 380 end 381 ret i 382 end 383 384 fn mkkey ks ulong kn ulong to void 385 n = get secl 0 386 if gt add n kn 8191 387 over 388 end 389 for i ulong n 390 put arg i get secb i 391 end 392 for i ulong kn 393 put arg add n i get src add ks i 394 end 395 put argl 0 add n kn 396 end 397 398 fn kvline t ulong ls ulong z ulong to bool 399 i = skipws ls z 400 ks = i 401 i = skipkc i z 402 kn = sub i ks 403 if eq kn 0 404 ret false 405 end 406 i = skipws i z 407 if ge i z 408 ret false 409 end 410 if ne get src i 61 411 ret false 412 end 413 i = skipws add i 1 z 414 if ge i z 415 ret false 416 end 417 if ne get src i 34 418 ret false 419 end 420 vs = add i 1 421 i = skipnq vs z 422 if ge i z 423 ret false 424 end 425 vn = sub i vs 426 i = skipws add i 1 z 427 if lt i z 428 if ne get src i 35 429 ret false 430 end 431 end 432 mkkey ks kn 433 tset t vs vn 434 ret true 435 end 436 437 fn setsec s ulong j ulong to void 438 n = sub j s 439 if gt n 8191 440 over 441 end 442 for i ulong n 443 put secb i get src add s add 1 i 444 end 445 put secb sub n 1 46 446 put secl 0 n 447 end 448 449 fn secline ls ulong z ulong to void 450 s = skipws ls z 451 if ge s z 452 ret 453 end 454 if eq get src s 35 455 ret 456 end 457 e = z 458 while gt e s bound 999999 459 if not isws get src sub e 1 460 break 461 end 462 e = sub e 1 463 end 464 if ne get src s 91 465 ret 466 end 467 j = skipkc add s 1 e 468 if eq j add s 1 469 ret 470 end 471 if ge j e 472 ret 473 end 474 if ne get src j 93 475 ret 476 end 477 i = skipws add j 1 e 478 if lt i e 479 if ne get src i 35 480 ret 481 end 482 end 483 setsec s j 484 end 485 486 fn parse t ulong to void 487 put secl 0 0 488 ls = ulong 0 489 n = get srcn 0 490 while lt ls n bound 999999 491 z = ls 492 while and lt z n ne get src z 10 bound 999999 493 z = add z 1 494 end 495 if ge z n 496 break 497 end 498 if not kvline t ls z 499 secline ls z 500 end 501 ls = add z 1 502 end 503 end 504 505 note ---- files ---- 506 507 fn slurpf fd int to void 508 t = ulong 0 509 while true bound 999999 510 room = sub CAP t 511 if eq room 0 512 over 513 end 514 r = read fd src t room 515 if lt r 0 516 break 517 end 518 if eq r 0 519 break 520 end 521 t = add t ulong r 522 end 523 put srcn 0 t 524 end 525 526 fn dropnul to void 527 n = get srcn 0 528 w = ulong 0 529 for i ulong n 530 c = get src i 531 if ne c 0 532 put src w c 533 w = add w 1 534 end 535 end 536 put srcn 0 w 537 end 538 539 fn loadm to void 540 put srcn 0 0 541 fd = fopen fpath 0 get fpl 0 0 0 542 if lt fd 0 543 ret 544 end 545 slurpf int fd 546 r = fclose int fd 547 dropnul 548 end 549 550 fn isregf to bool 551 r = stat fpath 0 get fpl 0 stb 0 128 552 if lt r 0 553 ret false 554 end 555 m = ulong get stb 16 556 m = or m shl ulong get stb 17 8 557 ret eq and m 61440 32768 558 end 559 560 note ---- children: /bin/sh replays the environment from a memfd, then exec "$@" ---- 561 562 fn pk0 to void 563 put pkn 0 2 564 put pkc 0 0 565 end 566 567 fn pka to void 568 n = get pkn 0 569 m = get argl 0 570 if gt add n add 2 m 4096 571 over 572 end 573 put pk n uchar rem m 256 574 put pk add n 1 uchar div m 256 575 for i ulong m 576 put pk add n add 2 i get arg i 577 end 578 put pkn 0 add n add 2 m 579 c = add get pkc 0 1 580 put pkc 0 c 581 put pk 0 uchar rem c 256 582 put pk 1 uchar div c 256 583 end 584 585 fn pkt i ulong to void 586 kp i 587 pka 588 end 589 590 fn pksh to void 591 pk0 592 pkt 24 593 pkt 25 594 for i ulong len tsh 595 put arg i get tsh i 596 end 597 put argl 0 len tsh 598 pka 599 pkt 26 600 for i ulong get epl 0 601 put arg i get epath i 602 end 603 put argl 0 get epl 0 604 pka 605 end 606 607 fn envname l ulong to bool 608 if eq l 0 609 ret false 610 end 611 for i ulong l 612 c = get ebuf i 613 ok = or and ge c 65 le c 90 and ge c 97 le c 122 614 ok = or ok eq c 95 615 if gt i 0 616 ok = or ok and ge c 48 le c 57 617 end 618 if not ok 619 ret false 620 end 621 end 622 ret true 623 end 624 625 fn envone l ulong to void 626 e = ulong 0 627 while and lt e l ne get ebuf e 61 bound 65536 628 e = add e 1 629 end 630 if eq e l 631 ret 632 end 633 if not envname e 634 ret 635 end 636 for i ulong e 637 put ewb i get ebuf i 638 end 639 n = e 640 put ewb n 61 641 put ewb add n 1 39 642 n = add n 2 643 i = add e 1 644 while lt i l bound 65536 645 c = get ebuf i 646 if eq c 39 647 put ewb n 39 648 put ewb add n 1 92 649 put ewb add n 2 39 650 put ewb add n 3 39 651 n = add n 4 652 else 653 put ewb n c 654 n = add n 1 655 end 656 i = add i 1 657 end 658 put ewb n 39 659 put ewb add n 1 10 660 n = add n 2 661 r = write int get efd 0 ewb 0 n 662 end 663 664 fn envinit to void 665 kp 35 666 f = memfd arg 0 get argl 0 0 667 if lt f 0 668 over 669 end 670 put efd 0 f 671 for i ulong ulong envcnt 672 l = envread i ebuf 0 65536 673 if gt l 0 674 envone ulong l 675 end 676 end 677 kp 27 678 n = get argl 0 679 for i ulong n 680 put epath i get arg i 681 end 682 v = ulong f 683 d = ulong 0 684 while gt v 0 bound 24 685 put nbuf d uchar rem v 10 686 v = div v 10 687 d = add d 1 688 end 689 if eq d 0 690 put nbuf 0 0 691 d = ulong 1 692 end 693 for i ulong d 694 put epath add n i add 48 get nbuf sub sub d 1 i 695 end 696 put epl 0 add n d 697 end 698 699 note the value of the environment variable named by arg, into ev; -1 when unset 700 fn getenv to long 701 n = get argl 0 702 for i ulong ulong envcnt 703 l = envread i ebuf 0 65536 704 if gt l long n 705 if envpre n 706 ret envtake n ulong l 707 end 708 end 709 end 710 ret -1 711 end 712 713 fn envtake n ulong l ulong to long 714 m = sub l add n 1 715 o = add n 1 716 for j ulong m 717 put ev j get ebuf add o j 718 end 719 put evl 0 m 720 ret long m 721 end 722 723 fn envpre n ulong to bool 724 for i ulong n 725 if ne get ebuf i get arg i 726 ret false 727 end 728 end 729 ret eq get ebuf n 61 730 end 731 732 note split ev on space, tab and newline, one packet record per word 733 fn pkwords to void 734 i = ulong 0 735 n = get evl 0 736 while lt i n bound 65536 737 c = get ev i 738 if or eq c 32 or eq c 9 eq c 10 739 i = add i 1 740 else 741 w = ulong 0 742 while and lt i n wordc get ev i bound 65536 743 put arg w get ev i 744 w = add w 1 745 i = add i 1 746 end 747 put argl 0 w 748 pka 749 end 750 end 751 end 752 753 fn wordc c uchar to bool 754 ret not or eq c 32 or eq c 9 eq c 10 755 end 756 757 fn child to void 758 w = int get pfd 4 759 w = or w shl int get pfd 5 8 760 r = dupfd w 1 0 761 r = fclose w 762 r = fclose int get pfd 0 763 r = execprog pk 0 get pkn 0 764 exit 127 765 end 766 767 note read the child's stdout into cap; trailing newlines and NUL bytes dropped as $(...) does 768 fn slurpc fd int to void 769 t = ulong 0 770 while true bound 999999 771 room = sub CAP t 772 if eq room 0 773 over 774 end 775 r = read fd cap t room 776 if le r 0 777 break 778 end 779 t = add t ulong r 780 end 781 w = ulong 0 782 for i ulong t 783 c = get cap i 784 if ne c 0 785 put cap w c 786 w = add w 1 787 end 788 end 789 while gt w 0 bound 999999 790 if ne get cap sub w 1 10 791 break 792 end 793 w = sub w 1 794 end 795 put capn 0 w 796 end 797 798 fn run to long 799 r = pipefds pfd 0 8 0 800 if lt r 0 801 ret -1 802 end 803 pid = fork 804 if lt pid 0 805 ret -1 806 end 807 if eq pid 0 808 child 809 end 810 w = int get pfd 4 811 w = or w shl int get pfd 5 8 812 r = fclose w 813 rd = int get pfd 0 814 slurpc rd 815 r = fclose rd 816 r = waitpid int pid status 0 4 0 817 if ne r pid 818 ret -1 819 end 820 s = long get status 0 821 s = or s shl long get status 1 8 822 if eq and s 127 0 823 ret shr s 8 824 end 825 ret add 128 and s 127 826 end 827 828 829 note ---- value and key helpers ---- 830 831 fn kfind t ulong i ulong to long 832 kp i 833 ret tfind t 834 end 835 836 fn vlen e long to ulong 837 if lt e 0 838 ret 0 839 end 840 ret get vln ulong e 841 end 842 843 fn kpapp i ulong to void 844 s = ulong 0 845 k = ulong 0 846 while lt k i bound 8192 847 if eq get tk s 10 848 k = add k 1 849 end 850 s = add s 1 851 end 852 n = get argl 0 853 while ne get tk s 10 bound 8191 854 put arg n get tk s 855 n = add n 1 856 s = add s 1 857 end 858 put argl 0 n 859 end 860 861 fn avapp e long to void 862 x = ulong e 863 o = get vof x 864 n = get vln x 865 b = get argl 0 866 if gt add b n 8191 867 over 868 end 869 for j ulong n 870 put arg add b j get pool add o j 871 end 872 put argl 0 add b n 873 end 874 875 fn pkval e long to void 876 put argl 0 0 877 avapp e 878 pka 879 end 880 881 note does the key of entry x start with key-table entry i 882 fn haspre x ulong i ulong to bool 883 kp i 884 n = get argl 0 885 if lt get kln x n 886 ret false 887 end 888 o = get kof x 889 for j ulong n 890 if ne get pool add o j get arg j 891 ret false 892 end 893 end 894 ret true 895 end 896 897 note does the key of entry x, after its first 14 bytes (consumed_pins.), equal key-table entry i 898 fn keytail x ulong i ulong to bool 899 kp i 900 n = get argl 0 901 if ne get kln x add n 14 902 ret false 903 end 904 o = add get kof x 14 905 for j ulong n 906 if ne get pool add o j get arg j 907 ret false 908 end 909 end 910 ret true 911 end 912 913 fn oname x ulong to void 914 opool add get kof x 14 sub get kln x 14 915 end 916 917 note ---- the label of a comparison ---- 918 919 fn lab0 to void 920 put labl 0 0 921 end 922 923 fn labm i ulong to void 924 b = get obl 0 925 om i 926 n = get obl 0 927 l = get labl 0 928 for j ulong sub n b 929 put lab add l j get obuf add b j 930 end 931 put labl 0 add l sub n b 932 put obl 0 b 933 end 934 935 fn labk i ulong to void 936 kp i 937 l = get labl 0 938 for j ulong get argl 0 939 put lab add l j get arg j 940 end 941 put labl 0 add l get argl 0 942 end 943 944 fn labx x ulong to void 945 l = get labl 0 946 o = get kof x 947 n = sub get kln x 14 948 for j ulong n 949 put lab add l j get pool add o add 14 j 950 end 951 put labl 0 add l n 952 end 953 954 fn olab to void 955 b = get obl 0 956 for j ulong get labl 0 957 put obuf add b j get lab j 958 end 959 put obl 0 add b get labl 0 960 end 961 962 note ---- lock slots: 0 sovereign omega.lock, 1 Cargo.lock aien-protocols, 2 omega physics.lock, 963 note 3 omega aienos.lock, 4 omega argus.lock, 5 the last Cargo.lock revision ---- 964 965 fn slotok s ulong to bool 966 ret eq get lkl s 40 967 end 968 969 fn oslot s ulong to void 970 b = get obl 0 971 for j ulong 40 972 put obuf add b j get lk add mul s 40 j 973 end 974 put obl 0 add b 40 975 end 976 977 fn vslot e long s ulong to bool 978 if ne vlen e 40 979 ret false 980 end 981 o = get vof ulong e 982 for j ulong 40 983 if ne get pool add o j get lk add mul s 40 j 984 ret false 985 end 986 end 987 ret true 988 end 989 990 fn slotcp a ulong b ulong to void 991 for j ulong 40 992 put lk add mul b 40 j get lk add mul a 40 j 993 end 994 put lkl b get lkl a 995 end 996 997 note same