diff --git a/research/selected-rank-control/GENERAL-CONTROL-PROOF.md b/research/selected-rank-control/GENERAL-CONTROL-PROOF.md new file mode 100644 index 0000000000..a2cfd54a94 --- /dev/null +++ b/research/selected-rank-control/GENERAL-CONTROL-PROOF.md @@ -0,0 +1,171 @@ +# Online rank-dependent recursion on three fixed tapes + +Prepared for @CubeJerry with substantial OpenAI assistance; Apache-2.0. +Written all-width theorem with finite executable corroboration. No kernel proof. + +## 1. Domain and theorem + +Fix integers m>=2 and a nonempty ordered paid list (r_0,...,r_(s-1)), with +1<=r_i=m. After k symbols, CHILD has floor(rk/m) symbols and c=rk mod m. +Induction on k proves this Euclidean-division invariant. At scan completion, +n=floor(rf/m), and both heads rewind. For internal f>=m and 1<=r=1 and s>=1, summing proves +the stated 100(s+1)*sum_v f_v. Each sibling repeats its own generation and +park/return bill; no sibling-independent time constant is asserted. + +## 6. Retained backing and shape inflation + +WIDTH and CHILD remain between their fixed marker and an endpoint at most f +cells away, including historical prefixes left blank by smaller later uses. +At an active path f_0=f,f_1,...,f_D, one has f_j<=rho^j*f. STACK holds one +unary parent and one tag per descent. All its visits lie between h-1 and +h+sum_(j=1 its logical bit volume satisfies +V_v>=2^D>=D>=f_v. The producer overhead is consequently at most +100(s+1)*sum_v V_v, a fixed node-volume fee. This is a conditional implication; +it does not prove that an actual selected dispatcher has made those grants or +that its exact rank-rounding rule equals this floor recurrence. + +Different cutoffs, remainder jobs, multiple backend types and different rank +rounding must be bound to actual source before substitution. This producer does +not emit #6719's H/A/R grants, route payloads, execute native maps or provide +binary-to-unary input conversion. Stock, numerical precision, ownership of +payloads and analytic recovery remain separate. All five selected assumptions +and selected kappa are unchanged. + +## 8. Novelty and credit + +JoyboyBrian's #5158 already gives physical fixed-bank dyadic complete-row +recursion. Thu-nmrc's #6719 already gives a richer delayed-cover root, recursive +grant and payload program from binary inputs and supplied unary depth. ToikY's +#6722 reviews a specific producer/router join. Their results retain credit; +this does not claim the first fixed-tape recursion or geometric backing proof. + +The delta is the rank-dependent termination and heterogeneous-child shape +producer with no supplied depth/tree, arbitrary fixed paid branching, an exact +small transition census and a sibling-independent retained-space bound. +Finite remainder machines, depth-first stacks and geometric sums are standard. +This is one enabling interface theorem, with payload integration and external +descriptor preparation open; no new exponent, assumption discharge, complete +multiplier, independent human verification or proof-kernel acceptance is claimed. diff --git a/research/selected-rank-control/PR-DESCRIPTION.md b/research/selected-rank-control/PR-DESCRIPTION.md new file mode 100644 index 0000000000..6e47867030 --- /dev/null +++ b/research/selected-rank-control/PR-DESCRIPTION.md @@ -0,0 +1,104 @@ +## What changed and why + +The physical caller work already supports fixed-bank recursion. Binding that +work to the selected finite compiler still requires exact runtime child +widths, stopping control and paid remainder handling. This package supplies a +literal control producer for the final rank-one law, backed by a general +rank-profile lemma and source-pinned cutoff/remainder analysis. + +The raw mixed-rank BIT law is r_i floor(e/m), not floor(r_i e/m). The selected +finite-precompilation source instead makes every final paid leaf rank one, so +all P child calls have width floor(e/N). The source binding makes this +distinction explicit and retains the supplied root cutoff L. + +## Exact result + +For fixed N >= 2 and P >= 1, a four-tape finite controller stops below +max(N,L), generates the ordered rank-one calls and emits pre/post hooks for +e mod N. It restores unary descriptors, the cutoff tape and arbitrary +suspended ancestors. Every return, head rewind and hook dispatch is paid. + +- Instruction count: 30N+42+P(69+3N), independent of e and L. +- Complete control time: at most 200(P+1) sum_v e_v. +- Retained backing: at most K0+(4+N/(N-1))e_root+8; K0 includes the entire + supplied cutoff and preexisting historical backing. +- Cutoff comparison: at most 11 min(e,L)+10, including both head returns. +- Each remainder scan: 6e+7; both scans: 12e+14. B0/A0 explicitly skip + remainder payload actions, with finite dispatch still paid. + +The reusable three-tape lemma supports arbitrary fixed 1 <= r_i < m and +children floor(r_i f/m), with complete time 100(s+1) sum_v f_v and retained +backing K0+(3+1/(1-rho))f_root+6. It requires no supplied tree or depth. + +The all-width results are proved by explicit loop and stack invariants. +The conditional node-volume corollary additionally assumes complete-root +factors/row stock and paid payload consumers. It does not establish those +interfaces. + +## Novelty and predecessors + +#5134 and #5158 already provide literal complete-row parking and dyadic +fixed-bank recursion. #6719 provides the richer supplied-depth delayed-cover +binary-root/grant/payload program; #6722 reviews a particular join. They +retain credit. The present delta is online rank-dependent shape control and +its exact final rank-one cutoff/remainder connection, with no raw mixed-floor +substitution. Classical finite remainder transducers and depth-first stacks +are standard techniques. + +Pending #7150 and #7151 cover primitive microcontrol and stratified retained +backing. Their inspected heads are pinned as complementary work, not merged +dependencies. The scientific base is +`e54523517d0f03e58352e647c403a5af3e525a57`; `SOURCES.json` pins the actual +batched-row notes, finite-precompilation source, #7000 review and predecessor +proofs by commit/blob/hash. + +## Reproduction and checks + +```sh +python3 -B research/selected-rank-control/verify_all.py +``` + +Expected: `PASS_SELECTED_RANK_CONTROL_PACKAGE`. This runs each bounded suite +normally and under `-O`, requiring byte-identical receipts. + +- General: 896 cases, 13,540 nodes, 3,469,732 transitions, nine separate dense + CPU cases and ten negative controls. +- Selected: 2,400 cases, 10,878 nodes, 3,443,893 transitions, eight separate + dense CPU cases and eight controls. +- Checks observe actual unary widths as well as labels; they cover cutoff + equality, restored heads/cells, ancestor locality, historical backing, + remainder identity/omission, wrong return tags and undercharged execution. + +Proofs, finite receipts and validation metadata are included. Finite checks +corroborate universal written proofs; neither interpreter is a formal kernel. +Normal execution and optimized execution are regression checks, not separate +mathematical proofs. + + +A separate reviewer read both proofs and executed a code-disjoint dense CPU +against an explicit address-tree oracle. It passed 125 cases, 837 nodes, +3,654 events and 488,423 transitions, checking actual widths, full ancestor +stacks, hostile exterior cells and 556 exact remainder-scan charges. Three +semantic mutants were rejected. From this directory run +`python3 -I -W error -B independent_check.py .`; see REVIEW.md and +evidence/independent.json for the complete independent receipt. + +## Limitations and kappa status + +**No new kappa. All five selected foundational assumptions remain.** The +accepted conditional kappa stays 0.00363005817. This is a control/interface +lemma, not a complete multiplication implementation or unconditional theorem. + +The actual selected final word and its owner manifest are not emitted. The +external width/cutoff adapter, row grants, chronological scalar/frame segments, +both BIT remainder consumers and complete native endpoint contracts remain +open. Generating L=ceil(d^beta) is not free. Consumers must preserve descriptor +tapes and pay their work; complex remainder completion and BIT ungathering are +not supplied by the event producer. + +## Attribution + +Prepared for @CubeJerry with substantial OpenAI assistance. Credit JoyboyBrian, +thu-nmrc, ToikY, commdata2338, Ali Romman, David Arias and all retained native, +physical and compiler contributors. New material is Apache-2.0. Independent +human review and formal-kernel acceptance are not claimed. diff --git a/research/selected-rank-control/PR-TITLE.txt b/research/selected-rank-control/PR-TITLE.txt new file mode 100644 index 0000000000..92d819b9ba --- /dev/null +++ b/research/selected-rank-control/PR-TITLE.txt @@ -0,0 +1 @@ +Generate the selected rank-one recursion on fixed tapes with paid cutoff comparison and two-sided remainder hooks diff --git a/research/selected-rank-control/README.md b/research/selected-rank-control/README.md new file mode 100644 index 0000000000..dbd25b5f78 --- /dev/null +++ b/research/selected-rank-control/README.md @@ -0,0 +1,131 @@ +# Produce the selected rank-one call control with paid cutoff and remainder hooks + +This package supplies a fixed-tape control producer for a fixed compiled +rank-N word with P rank-one paid sites. It generates children of width +floor(e/N), applies a supplied root cutoff L, emits both pre- and post-remainder +hooks for e mod N, and restores every descriptor head and suspended ancestor. +The source-law connection is to the retained finite-precompilation and +batched-row notes at main +`e54523517d0f03e58352e647c403a5af3e525a57`. + +The universal control bound is **200(P+1) sum_v e_v** literal transitions, +including all returns, rewinds and zero-remainder dispatches. Additional +historical backing is linear in the root width; the supplied cutoff and any +older backing are explicitly included in entry K0. The actual final selected +word, cutoff producer, row grants and payload consumers remain obligations. +**No new kappa and no discharge of a full framework assumption.** + +## Two proved layers + +| Layer | Exact control law | Tapes and complete control time | +| --- | --- | --- | +| General rank profile | Fixed m >= 2, ordered 1 <= r_i < m; child floor(r_i f/m); stop below m | Three; at most 100(s+1) sum_v f_v | +| Source-compatible final template | Fixed N >= 2 and P paid sites; child floor(e/N); stop below max(N,L); hooks B_r and A_r for r=e mod N | Four; at most 200(P+1) sum_v e_v | + +[GENERAL-CONTROL-PROOF.md](GENERAL-CONTROL-PROOF.md) proves the finite remainder +transducer, parent-width stack, completed-call restoration and retained-space +bounds. Its historical filename `controller.py` refers to the byte-identical +`controller_reference.py` supplied here. The general example m=3, ranks (1,2,2) +has 281 instruction locations and seven symbols. No depth or call tree is +supplied. Time depends on the fixed paid-list length; backing is reused across +completed siblings. + +[SOURCE-BINDING.md](SOURCE-BINDING.md) proves the exact rank-one specialization, +the cutoff comparator, remainder hooks and conditional node-volume invoice. +The N=3,P=2 program has 288 instruction locations, six symbols and four tapes. +The cutoff comparison costs at most 11 min(e,L)+10 and preserves L. A remainder +scan costs 6e+7; both scans cost 12e+14. Zero-remainder hooks remain explicit, +and consumers skip their remainder payload action. Nonzero remainder consumer +work is charged separately. Ordinary scalar/frame segments between paid calls +attach to the initial hook and return hooks in their source order. + +The distinction between the two layers matters. The raw BIT note has child +width r_i floor(e/m), which generally differs from floor(r_i e/m). The final +precompiled word instead has rank-one paid leaves, where the laws agree. This +package does not substitute the general law into the raw mixed-rank circuit. + +## Reproduction and evidence + +Python 3.10+ and standard library only. From the repository root: + +```sh +python3 -B research/selected-rank-control/verify_all.py +``` + +Expected status: `PASS_SELECTED_RANK_CONTROL_PACKAGE`. The wrapper executes +both suites normally and under `-O`, requiring byte-identical receipts. To run +each separately: + +```sh +python3 -B research/selected-rank-control/verify_general.py +python3 -O -B research/selected-rank-control/verify_general.py +python3 -B research/selected-rank-control/verify_selected.py +python3 -O -B research/selected-rank-control/verify_selected.py +``` + +The bounded general suite covers 896 cases, 13,540 nodes and 3,469,732 +transitions; nine translated cases use a separately implemented dense CPU and +ten controls target invalid profiles, wrong floors, wrong returns, leaked +scratch and false time bounds. The selected suite covers 2,400 cases, 10,878 +nodes and 3,443,893 transitions; eight dense-CPU cases and eight controls check +cutoff equality, restored unary widths, both remainder hooks, cutoff motion +and the raw mixed-floor mismatch. Event logs are verifier observations, not +machine storage. Finite executions corroborate the written all-width proofs; +no formal proof-kernel acceptance is claimed. Receipts and exact artifact +hashes appear in `evidence/` and `VALIDATION.json`. + +## Prior work and dependency boundary + +[#5134](https://github.com/CrocSwap/integer-mult-bounds/pull/5134) supplies the +literal complete-row parking caller, and +[#5158](https://github.com/CrocSwap/integer-mult-bounds/pull/5158) already proves +fixed-bank dyadic complete-row recursion. +[#6719](https://github.com/CrocSwap/integer-mult-bounds/pull/6719) gives a richer +delayed-cover binary-root/grant/payload program from a supplied unary depth; +[#6722](https://github.com/CrocSwap/integer-mult-bounds/pull/6722) reviews a +particular producer/router join. This package claims the rank-dependent +online producer and exact final rank-one cutoff/remainder control connection, +not priority for fixed-tape recursion. + +Pending [#7150](https://github.com/CrocSwap/integer-mult-bounds/pull/7150) +addresses primitive microcontrol; pending +[#7151](https://github.com/CrocSwap/integer-mult-bounds/pull/7151) addresses +stratified retained backing. Their inspected heads are recorded in +`SOURCES.json`. They are complementary references, not assumed merged +dependencies or substitutes for this package's missing payload integration. +The selected construction/review in +[#7000](https://github.com/CrocSwap/integer-mult-bounds/pull/7000) and +[#7001](https://github.com/CrocSwap/integer-mult-bounds/pull/7001) retains its +conditional kappa=0.00363005817. + +Under an admitted complete-root-factor/row-stock interface, each width e_v is +at most complete node volume V_v, so control work fits the existing summed +node-volume bill. The premise does not produce the grants, execute remainder +kernels or prove frame/ownership contracts. Supplying L=ceil(d^beta) and the +root width from the actual external input is unpaid until a separate adapter +is provided. All five assumptions—native_all_columns, owned_erasure, compiler, +precision_tape and analytic_recovery—remain retained. + +## Credit and next obligations + +Prepared for @CubeJerry with substantial OpenAI assistance. Credit JoyboyBrian, +thu-nmrc, ToikY, commdata2338, Ali Romman, David Arias and the retained native, +physical and compiler contributors. New code and proof text are Apache-2.0. +The finite remainder transducer, depth-first stack and geometric bounds use +standard techniques; no broad algorithmic priority claim is made. + +Next work is to implement paid external width/cutoff production, instantiate +the actual selected final paid-site list, and join chronological payload and +remainder consumers with exact complete-row, tape-frame and return contracts. +Those tasks remain necessary before treating this control lemma as an +implementation of the full selected dispatcher. + +## Independent review + +A separate reviewer read both proofs and executed a code-disjoint dense CPU +against an explicit address-tree oracle. It passed 125 cases, 837 nodes, +3,654 events and 488,423 transitions, checking actual widths, full ancestor +stacks, hostile exterior cells and 556 exact remainder-scan charges. Three +semantic mutants were rejected. From this directory run +`python3 -I -W error -B independent_check.py .`; see REVIEW.md and +evidence/independent.json for the complete independent receipt. diff --git a/research/selected-rank-control/REVIEW.md b/research/selected-rank-control/REVIEW.md new file mode 100644 index 0000000000..85ae8b8d41 --- /dev/null +++ b/research/selected-rank-control/REVIEW.md @@ -0,0 +1,121 @@ +# Independent review of the selected four-tape controller + +**Outcome: PASS for the stated literal control interface.** The independent +interpreter found no correctness, restoration, transition-envelope or +historical-interval defect in the tested cases. The code and written loop/ +stack invariants support the universal control claim; finite execution is +corroboration, not a replacement for that proof. No new kappa or complete +foundational-assumption discharge follows. + +Prepared for Jerry Chen / @CubeJerry by the compiler/source-index worker, +independently of the controller author, with substantial OpenAI assistance. +Canonical source base: `e54523517d0f03e58352e647c403a5af3e525a57`. + +## Exact reviewed source + +Read `SOURCE-BINDING.md`, `GENERAL-CONTROL-PROOF.md`, all of +`selected_control.py`, and the Builder/instruction definitions in +`controller_reference.py`. Reviewed SHA256 values: + +- `selected_control.py`: + `1c977e9f4864d338f874aa4943d9f3422d964c3ab0cc2f877d9bc4c2d9e20237`. +- `controller_reference.py`: + `e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73`. +- `SOURCE-BINDING.md`: + `48ba45eb71df262db7384aa7a8003d9cd2801348c486948cab431528363bf6e5`. + +No author file was edited. This review checks execution against the stated +rank-one law and supplied-cutoff contract; it does not independently certify +the selected final compiler word or its payload interfaces. + +## Independent method + +The checker calls only the subject's compile-time Builder/program generator. +It translates the resulting instructions to a separate six-opcode CPU with +integer symbol codes, dense read-dispatch tables and four dense tape arrays. +The author's Machine, Tape and initial_tapes names are replaced by rejecting +functions before the subject is imported. No author verifier or input helper +is imported or called. + +The oracle first materializes the entire mathematical address tree breadth +first, using direct integer division and the predicate `e>=max(N,L)`. It then +assigns phase-order keys to each node's entry, pre-hook, child descent/return, +post-hook and exit events, and sorts those keys to obtain the contour. This +is independent of the subject's finite remainder machine and stack control. +At every emitted edge it compares the label **and the actual unary WIDTH**. +It also compares the complete active stack with the explicit ancestor list. + +Dense buffers, event lists, trees, metrics and observers belong to the +verifier. They are not used to select a CPU instruction and are not claimed +as the controller's workspace representation. + +## Results and adversarial coverage + +Reproduce from this package directory: + +```sh +python3 -I -W error -B independent_check.py . > evidence/independent.json +``` + +Observed result: **125 cases, 837 nodes, 3,654 emitted events and 488,423 +literal transitions: PASS.** Every event matched its independently computed +width and chronological address. The cases use N in {2,3,5,7}, one through +four paid sites, widths through 4,097, supplied cutoffs through 100,003, +three independently shifted sets of tape origins, and repeated equal-rank +paid sites. They include e1, +a=m-1 gives difference t_i-1. No raw mixed-rank substitution is made here. + +`research/kappa-rebuild/architecture/FINITE-PRECOMPILATION.md`, Section 6, +instead makes every paid leaf rank one in a fixed compiled rank-N word. Under +tensor multiplicity f each becomes a rank-f call and the strict ratio is 1/N. +Combining this with the integer-width law gives exactly + + e = Nq+r, 0<=r=N; small roots requiring individual processing +remain the source's fixed finite fallback. Generating L, or evaluating its +rational-power predicate from the actual binary root inputs, is not free and +is not implemented here. + +## 2. Literal four-tape extension + +`selected_control.py` uses the frozen earlier Builder and interpreter from +`controller_reference.py`, plus a read-only CUTOFF tape. N and P are compile-time +parameters. There are exactly + + 30N+42+P(69+3N) + +instruction locations, P+4 symbols and four fixed tapes, independent of e or L. +The N=3,P=2 example has 288 locations. No input-sized program or alphabet is +constructed at run time. + +The old finite probe first detects e=L, +including equality; if CUTOFF is nonblank and WIDTH is blank, e=N, the exact number of descents is zero for e=L iff e>=L*N^j. Earlier stopping never requires more row stock than +the source's cutoff-N depth bound. This does not itself generate that stock. + +## 4. Remainders and conditional node-volume composition + +The complex note's Integer axis counts processes the r=2^D>=D>=e_v. The full controller +bill is then at most 200(P+1)*sum_v V_v. Combining it with admitted remainder, +frame and scalar fees gives the conditional node recurrence + + T(V,e) <= P*T(V/W, floor(e/N)) + C_template*V + +above the supplied cutoff, and the existing separately paid leaf routine below. +C_template includes controller and both consumer constants; it is not an old +numeric cap. Each child receives V/W only if the actual complete-row/stock +interface supplies that volume. This controller does not prove the grants, +remainder operators, compiler, native endpoints or numerical/analytic bounds. + +For the complex stopping source, if d^beta>=2N, every nonroot stopping leaf +arises from a parent e>=d^beta and has width floor(e/N)>=d^beta/(2N). +The bounded r controller_reference in one import; filename adapted" + } + ], + "external_executable_dependencies": [], + "source_boundary": "Controller and source-law/cutoff/remainder specialization only. Selected actual final template and payload consumers are not materialized." +} diff --git a/research/selected-rank-control/VALIDATION.json b/research/selected-rank-control/VALIDATION.json new file mode 100644 index 0000000000..25a4cb3e5a --- /dev/null +++ b/research/selected-rank-control/VALIDATION.json @@ -0,0 +1,86 @@ +{ + "status": "Author normal/optimized replay, root proof/integration review and separate dense CPU/address-tree review passed; final package replay passed", + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "python": "3.12.14", + "command": "python3 -B research/selected-rank-control/verify_all.py", + "normal_optimized_byte_equal": true, + "general_coverage": { + "m": "2..4", + "sites": "1..3", + "ordered_profiles": "all positive ranks below m", + "root_width": "1..16", + "cases": 896, + "nodes": 13540, + "transitions": 3469732, + "dense_cpu_cases": 9, + "negative_controls": 10 + }, + "selected_coverage": { + "N": "2..5", + "P": "1..3", + "root_width": "1..20", + "supplied_cutoff": "1..10", + "cases": 2400, + "nodes": 10878, + "transitions": 3443893, + "dense_cpu_cases": 8, + "negative_controls": 8 + }, + "sampling": "exhaustive Cartesian domains above; no random seed; fixed finite stopping rule", + "independent_proof_review": { + "reviewer": "orchestrator /root, separate agent", + "general": "passed loop, stack, time and backing proof", + "selected": "passed source law, cutoff, hooks, depth and leaf lower bound; exact remainder count corrected to 6e+7 / 12e+14", + "limitations": "Independent AI review and execution; no human or formal-kernel acceptance" + }, + "freeze": "All scientific code/proofs are byte-identical to reviewed originals; generic verifier only adapts one import to controller_reference.", + "frozen_artifacts_checked": 6, + "kappa": "No new kappa; selected conditional 0.00363005817 unchanged", + "remaining_assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "limitations": [ + "supplied unary root width/cutoff; no binary input adapter", + "no selected final word or owner manifest emitted", + "payload, grants and remainder consumers not implemented", + "no formal-kernel proof or complete native implementation" + ], + "sha256": { + "GENERAL-CONTROL-PROOF.md": "f9b9d781d313b1cba46cfa3cc39be149c063863b2c6f5e4b17f085b07b4ec4f8", + "PR-DESCRIPTION.md": "e236433dbb04e7e31891e793c27538bb4669f3b695716eb4ffcc7fa165d958fc", + "PR-TITLE.txt": "df1bc823594023bcdc95cd95137cdb904e90ba024a0fb49dcc99ff20584c50eb", + "README.md": "b98a5f8a2b8efbacd94156b21d488be528b838394db3f593cd648c9bfaa84122", + "REVIEW.md": "fd1a3fd6e036d38a90bcfc57cbcb33aa2b4a0a2625b277cd771e2b27aea81942", + "SOURCE-BINDING.md": "48ba45eb71df262db7384aa7a8003d9cd2801348c486948cab431528363bf6e5", + "SOURCES.json": "9f57460dcb1a85499efdb2ec34e8cd9a3d909c10d56adc8f556d868c266a3e71", + "controller_reference.py": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "evidence/combined.json": "c10fbeda2dc5ccb23d1a4ec34278b41d5a4ab11d8ce6fe06a7e876d8f7664e78", + "evidence/general_normal.json": "37bbfb6bf338f122a0d16366579b995ab2d91faa01ec9d122799d575cc8e85c1", + "evidence/general_optimized.json": "37bbfb6bf338f122a0d16366579b995ab2d91faa01ec9d122799d575cc8e85c1", + "evidence/independent.json": "cbb8036301b8b0f29a30c0431777ebf972f811f96669584dd2f7627d795f885e", + "evidence/root-replay.json": "c10fbeda2dc5ccb23d1a4ec34278b41d5a4ab11d8ce6fe06a7e876d8f7664e78", + "evidence/selected_normal.json": "931ea5c21ad379465b45b79976e53ed3d464aa9eec93f2f489bf047eabff4e86", + "evidence/selected_optimized.json": "931ea5c21ad379465b45b79976e53ed3d464aa9eec93f2f489bf047eabff4e86", + "independent_check.py": "442d53b89c59eea574ef65c6df7da91b08727ae2d7296581710ef90c85a5650a", + "selected_control.py": "1c977e9f4864d338f874aa4943d9f3422d964c3ab0cc2f877d9bc4c2d9e20237", + "verify_all.py": "5a8f1e3e0e26ac773583bee216a0f78fa3abf2f6596ea0eb5a14d6f35da7edf6", + "verify_general.py": "b7a290ab51cc83a2344a205d2a2f63af89ed1acc5a521def65a000acb36198e3", + "verify_selected.py": "e2adab4be25b357578993f10e8952c26ea9ee1a9f66fb6f26a1b341709d4e2b0" + }, + "independent_executable_review": { + "reviewer": "separate compiler/source-index worker", + "checker": "independent_check.py", + "receipt": "evidence/independent.json", + "cases": 125, + "nodes": 837, + "transitions": 488423, + "exact_remainder_scans": 556, + "negative_controls": 3, + "root_replayed": true + }, + "root_replay": "evidence/root-replay.json; byte-content parsed equal to author combined receipt" +} diff --git a/research/selected-rank-control/controller_reference.py b/research/selected-rank-control/controller_reference.py new file mode 100644 index 0000000000..3ab6d0361f --- /dev/null +++ b/research/selected-rank-control/controller_reference.py @@ -0,0 +1,112 @@ +"""Finite three-tape online rank-recursion control; Apache-2.0. +Only PC and local symbols affect execution. Metrics/event logs are observers. +""" +from dataclasses import dataclass, field +BLANK, ONE, MARK = '_', '1', '|' +WIDTH, CHILD, STACK = range(3) + +class Builder: + def __init__(self): self.code, self.labels, self.serial = [], {}, 0 + def mark(self,n): + if n in self.labels: raise ValueError('duplicate label') + self.labels[n]=len(self.code) + def op(self,*x): self.code.append(x) + def rewind(self,t,symbols): + self.serial+=1; loop=f'rw{self.serial}'; done=loop+'done' + self.op('move',t,-1); self.mark(loop) + self.op('read',t,{s:loop+'step' for s in symbols}|{MARK:done}) + self.mark(loop+'step'); self.op('move',t,-1); self.op('goto',loop) + self.mark(done); self.op('move',t,1) + def finish(self,alphabet): + result=[] + for op,*a in self.code: + if op=='goto': a[0]=self.labels[a[0]] + elif op=='read': a[1]={s:self.labels[n] for s,n in a[1].items()} + result.append((op,*a)) + return tuple(result),tuple(alphabet) + +def compile_controller(m,ranks): + """Parameters are compile-time constants, absent from run-time state.""" + if type(m) is not int or m<2 or not ranks: raise ValueError('bad fixed profile') + if any(type(r) is not int or not 1<=r=budget: raise ValueError('finite verifier budget') + self.step() + return self + +def initial_tapes(width,origins=(0,0,0),ancestor=('0','1','t0','_','|','0')): + if width<1: raise ValueError('positive width') + u,c,p=origins + return [Tape({u-1:MARK,**{u+i:ONE for i in range(width)}},u),Tape({c-1:MARK},c), + Tape({p-1:MARK,**{p-2-i:s for i,s in enumerate(ancestor) if s!=BLANK}},p)] diff --git a/research/selected-rank-control/evidence/combined.json b/research/selected-rank-control/evidence/combined.json new file mode 100644 index 0000000000..9608e62246 --- /dev/null +++ b/research/selected-rank-control/evidence/combined.json @@ -0,0 +1,148 @@ +{ + "normal_optimized_byte_equal": true, + "receipts": { + "general_normal": { + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 + }, + "general_optimized": { + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 + }, + "selected_normal": { + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 + }, + "selected_optimized": { + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 + } + }, + "status": "PASS_SELECTED_RANK_CONTROL_PACKAGE" +} diff --git a/research/selected-rank-control/evidence/general_normal.json b/research/selected-rank-control/evidence/general_normal.json new file mode 100644 index 0000000000..e109949708 --- /dev/null +++ b/research/selected-rank-control/evidence/general_normal.json @@ -0,0 +1,59 @@ +{ + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 +} diff --git a/research/selected-rank-control/evidence/general_optimized.json b/research/selected-rank-control/evidence/general_optimized.json new file mode 100644 index 0000000000..e109949708 --- /dev/null +++ b/research/selected-rank-control/evidence/general_optimized.json @@ -0,0 +1,59 @@ +{ + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 +} diff --git a/research/selected-rank-control/evidence/independent.json b/research/selected-rank-control/evidence/independent.json new file mode 100644 index 0000000000..605794cc21 --- /dev/null +++ b/research/selected-rank-control/evidence/independent.json @@ -0,0 +1,3021 @@ +{ + "status": "PASS", + "method": "separate dense CPU and materialized address-tree contour", + "cases": 125, + "nodes": 837, + "events": 3654, + "transitions": 488423, + "exact_remainder_scans": 556, + "negative_controls": [ + "post remainder label changed", + "doubled quotient output", + "cutoff equality treated as leaf" + ], + "pins": { + "selected_control.py": "1c977e9f4864d338f874aa4943d9f3422d964c3ab0cc2f877d9bc4c2d9e20237", + "controller_reference.py": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "SOURCE-BINDING.md": "48ba45eb71df262db7384aa7a8003d9cd2801348c486948cab431528363bf6e5" + }, + "rows": [ + { + "base": 2, + "sites": 1, + "width": 1, + "cutoff": 1, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 400, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 1, + "width": 1, + "cutoff": 2, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 400, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 4, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 1, + "width": 2, + "cutoff": 2, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 214, + "budget": 1200, + "width_volume": 3, + "depth": 1, + "visited_cells": 16, + "visited_bound": "19", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 1, + "width": 3, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 261, + "budget": 1600, + "width_volume": 4, + "depth": 1, + "visited_cells": 19, + "visited_bound": "24", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 1, + "width": 3, + "cutoff": 4, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 64, + "budget": 1200, + "width_volume": 3, + "depth": 0, + "visited_cells": 13, + "visited_bound": "23", + "cutoff_visited": 5, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 1, + "width": 3, + "cutoff": 2, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 250, + "budget": 1600, + "width_volume": 4, + "depth": 1, + "visited_cells": 18, + "visited_bound": "23", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 1, + "width": 4, + "cutoff": 2, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 506, + "budget": 2800, + "width_volume": 7, + "depth": 2, + "visited_cells": 24, + "visited_bound": "28", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 2, + "exact_remainder_scans": 4 + }, + { + "base": 2, + "sites": 1, + "width": 5, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 2, + "events": 8, + "steps": 392, + "budget": 2800, + "width_volume": 7, + "depth": 1, + "visited_cells": 24, + "visited_bound": "32", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 2, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 1, + "width": 9, + "cutoff": 100003, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 130, + "budget": 3600, + "width_volume": 9, + "depth": 0, + "visited_cells": 25, + "visited_bound": "53", + "cutoff_visited": 11, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 1, + "width": 8, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 851, + "budget": 5600, + "width_volume": 14, + "depth": 2, + "visited_cells": 37, + "visited_bound": "45", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 3, + "exact_remainder_scans": 4 + }, + { + "base": 2, + "sites": 2, + "width": 1, + "cutoff": 1, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 600, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 2, + "width": 1, + "cutoff": 2, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 600, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 4, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 2, + "width": 2, + "cutoff": 2, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 338, + "budget": 2400, + "width_volume": 4, + "depth": 1, + "visited_cells": 16, + "visited_bound": "19", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 2, + "width": 3, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 409, + "budget": 3000, + "width_volume": 5, + "depth": 1, + "visited_cells": 19, + "visited_bound": "24", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 2, + "width": 3, + "cutoff": 4, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 64, + "budget": 1800, + "width_volume": 3, + "depth": 0, + "visited_cells": 13, + "visited_bound": "23", + "cutoff_visited": 5, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 2, + "width": 3, + "cutoff": 2, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 398, + "budget": 3000, + "width_volume": 5, + "depth": 1, + "visited_cells": 18, + "visited_bound": "23", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 2, + "width": 4, + "cutoff": 2, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 1146, + "budget": 7200, + "width_volume": 12, + "depth": 2, + "visited_cells": 24, + "visited_bound": "28", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 3, + "exact_remainder_scans": 6 + }, + { + "base": 2, + "sites": 2, + "width": 5, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 3, + "events": 12, + "steps": 647, + "budget": 5400, + "width_volume": 9, + "depth": 1, + "visited_cells": 24, + "visited_bound": "32", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 3, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 2, + "width": 9, + "cutoff": 100003, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 130, + "budget": 5400, + "width_volume": 9, + "depth": 0, + "visited_cells": 25, + "visited_bound": "53", + "cutoff_visited": 11, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 2, + "width": 8, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 1991, + "budget": 14400, + "width_volume": 24, + "depth": 2, + "visited_cells": 37, + "visited_bound": "45", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 7, + "exact_remainder_scans": 6 + }, + { + "base": 2, + "sites": 3, + "width": 1, + "cutoff": 1, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 800, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 3, + "width": 1, + "cutoff": 2, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 800, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "13", + "cutoff_visited": 1, + "cutoff_input_cells": 4, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 3, + "width": 2, + "cutoff": 2, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 462, + "budget": 4000, + "width_volume": 5, + "depth": 1, + "visited_cells": 16, + "visited_bound": "19", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 3, + "width": 3, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 557, + "budget": 4800, + "width_volume": 6, + "depth": 1, + "visited_cells": 19, + "visited_bound": "24", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 3, + "width": 3, + "cutoff": 4, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 64, + "budget": 2400, + "width_volume": 3, + "depth": 0, + "visited_cells": 13, + "visited_bound": "23", + "cutoff_visited": 5, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 3, + "width": 3, + "cutoff": 2, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 546, + "budget": 4800, + "width_volume": 6, + "depth": 1, + "visited_cells": 18, + "visited_bound": "23", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 3, + "width": 4, + "cutoff": 2, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 2034, + "budget": 15200, + "width_volume": 19, + "depth": 2, + "visited_cells": 24, + "visited_bound": "28", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 4, + "exact_remainder_scans": 8 + }, + { + "base": 2, + "sites": 3, + "width": 5, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 4, + "events": 16, + "steps": 902, + "budget": 8800, + "width_volume": 11, + "depth": 1, + "visited_cells": 24, + "visited_bound": "32", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 4, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 3, + "width": 9, + "cutoff": 100003, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 130, + "budget": 7200, + "width_volume": 9, + "depth": 0, + "visited_cells": 25, + "visited_bound": "53", + "cutoff_visited": 11, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 2, + "sites": 3, + "width": 8, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 3593, + "budget": 30400, + "width_volume": 38, + "depth": 2, + "visited_cells": 37, + "visited_bound": "45", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 13, + "exact_remainder_scans": 8 + }, + { + "base": 3, + "sites": 1, + "width": 1, + "cutoff": 1, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 400, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "25/2", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 1, + "width": 2, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 24, + "budget": 800, + "width_volume": 2, + "depth": 0, + "visited_cells": 8, + "visited_bound": "17", + "cutoff_visited": 1, + "cutoff_input_cells": 5, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 1, + "width": 3, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 267, + "budget": 1600, + "width_volume": 4, + "depth": 1, + "visited_cells": 19, + "visited_bound": "45/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 1, + "width": 4, + "cutoff": 4, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 314, + "budget": 2000, + "width_volume": 5, + "depth": 1, + "visited_cells": 22, + "visited_bound": "27", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 1, + "width": 4, + "cutoff": 5, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 81, + "budget": 1600, + "width_volume": 4, + "depth": 0, + "visited_cells": 15, + "visited_bound": "26", + "cutoff_visited": 6, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 1, + "width": 8, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 477, + "budget": 4000, + "width_volume": 10, + "depth": 1, + "visited_cells": 30, + "visited_bound": "40", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 1, + "width": 9, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 780, + "budget": 5200, + "width_volume": 13, + "depth": 2, + "visited_cells": 37, + "visited_bound": "89/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 2, + "exact_remainder_scans": 4 + }, + { + "base": 3, + "sites": 1, + "width": 10, + "cutoff": 4, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 2, + "events": 8, + "steps": 630, + "budget": 5200, + "width_volume": 13, + "depth": 1, + "visited_cells": 36, + "visited_bound": "48", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 2, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 1, + "width": 14, + "cutoff": 100003, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 191, + "budget": 5600, + "width_volume": 14, + "depth": 0, + "visited_cells": 35, + "visited_bound": "71", + "cutoff_visited": 16, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 1, + "width": 12, + "cutoff": 4, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 970, + "budget": 6800, + "width_volume": 17, + "depth": 2, + "visited_cells": 46, + "visited_bound": "56", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 2, + "exact_remainder_scans": 4 + }, + { + "base": 3, + "sites": 2, + "width": 1, + "cutoff": 1, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 600, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "25/2", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 2, + "width": 2, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 24, + "budget": 1200, + "width_volume": 2, + "depth": 0, + "visited_cells": 8, + "visited_bound": "17", + "cutoff_visited": 1, + "cutoff_input_cells": 5, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 2, + "width": 3, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 415, + "budget": 3000, + "width_volume": 5, + "depth": 1, + "visited_cells": 19, + "visited_bound": "45/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 2, + "width": 4, + "cutoff": 4, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 486, + "budget": 3600, + "width_volume": 6, + "depth": 1, + "visited_cells": 22, + "visited_bound": "27", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 2, + "width": 4, + "cutoff": 5, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 81, + "budget": 2400, + "width_volume": 4, + "depth": 0, + "visited_cells": 15, + "visited_bound": "26", + "cutoff_visited": 6, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 2, + "width": 8, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 775, + "budget": 7200, + "width_volume": 12, + "depth": 1, + "visited_cells": 30, + "visited_bound": "40", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 2, + "width": 9, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 1665, + "budget": 11400, + "width_volume": 19, + "depth": 2, + "visited_cells": 37, + "visited_bound": "89/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 3, + "exact_remainder_scans": 6 + }, + { + "base": 3, + "sites": 2, + "width": 10, + "cutoff": 4, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 3, + "events": 12, + "steps": 1046, + "budget": 9600, + "width_volume": 16, + "depth": 1, + "visited_cells": 36, + "visited_bound": "48", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 3, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 2, + "width": 14, + "cutoff": 100003, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 191, + "budget": 8400, + "width_volume": 14, + "depth": 0, + "visited_cells": 35, + "visited_bound": "71", + "cutoff_visited": 16, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 2, + "width": 12, + "cutoff": 4, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 2046, + "budget": 14400, + "width_volume": 24, + "depth": 2, + "visited_cells": 46, + "visited_bound": "56", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 3, + "exact_remainder_scans": 6 + }, + { + "base": 3, + "sites": 3, + "width": 1, + "cutoff": 1, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 800, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "25/2", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 3, + "width": 2, + "cutoff": 3, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 24, + "budget": 1600, + "width_volume": 2, + "depth": 0, + "visited_cells": 8, + "visited_bound": "17", + "cutoff_visited": 1, + "cutoff_input_cells": 5, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 3, + "width": 3, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 563, + "budget": 4800, + "width_volume": 6, + "depth": 1, + "visited_cells": 19, + "visited_bound": "45/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 3, + "width": 4, + "cutoff": 4, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 658, + "budget": 5600, + "width_volume": 7, + "depth": 1, + "visited_cells": 22, + "visited_bound": "27", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 3, + "width": 4, + "cutoff": 5, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 81, + "budget": 3200, + "width_volume": 4, + "depth": 0, + "visited_cells": 15, + "visited_bound": "26", + "cutoff_visited": 6, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 3, + "width": 8, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 1073, + "budget": 11200, + "width_volume": 14, + "depth": 1, + "visited_cells": 30, + "visited_bound": "40", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 3, + "width": 9, + "cutoff": 3, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 2846, + "budget": 21600, + "width_volume": 27, + "depth": 2, + "visited_cells": 37, + "visited_bound": "89/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 4, + "exact_remainder_scans": 8 + }, + { + "base": 3, + "sites": 3, + "width": 10, + "cutoff": 4, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 4, + "events": 16, + "steps": 1462, + "budget": 15200, + "width_volume": 19, + "depth": 1, + "visited_cells": 36, + "visited_bound": "48", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 4, + "exact_remainder_scans": 2 + }, + { + "base": 3, + "sites": 3, + "width": 14, + "cutoff": 100003, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 191, + "budget": 11200, + "width_volume": 14, + "depth": 0, + "visited_cells": 35, + "visited_bound": "71", + "cutoff_visited": 16, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 3, + "sites": 3, + "width": 12, + "cutoff": 4, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 3466, + "budget": 26400, + "width_volume": 33, + "depth": 2, + "visited_cells": 46, + "visited_bound": "56", + "cutoff_visited": 6, + "cutoff_input_cells": 6, + "comparisons": 4, + "exact_remainder_scans": 8 + }, + { + "base": 5, + "sites": 1, + "width": 1, + "cutoff": 1, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 400, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "49/4", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 1, + "width": 4, + "cutoff": 5, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 36, + "budget": 1600, + "width_volume": 4, + "depth": 0, + "visited_cells": 10, + "visited_bound": "25", + "cutoff_visited": 1, + "cutoff_input_cells": 7, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 1, + "width": 5, + "cutoff": 5, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 373, + "budget": 2400, + "width_volume": 6, + "depth": 1, + "visited_cells": 25, + "visited_bound": "121/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 1, + "width": 6, + "cutoff": 6, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 420, + "budget": 2800, + "width_volume": 7, + "depth": 1, + "visited_cells": 28, + "visited_bound": "69/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 1, + "width": 6, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 115, + "budget": 2400, + "width_volume": 6, + "depth": 0, + "visited_cells": 19, + "visited_bound": "67/2", + "cutoff_visited": 8, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 1, + "width": 24, + "cutoff": 5, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 1147, + "budget": 11200, + "width_volume": 28, + "depth": 1, + "visited_cells": 66, + "visited_bound": "92", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 1, + "width": 25, + "cutoff": 5, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 1544, + "budget": 12400, + "width_volume": 31, + "depth": 2, + "visited_cells": 75, + "visited_bound": "385/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 2, + "exact_remainder_scans": 4 + }, + { + "base": 5, + "sites": 1, + "width": 26, + "cutoff": 6, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 2, + "events": 8, + "steps": 1322, + "budget": 12400, + "width_volume": 31, + "depth": 1, + "visited_cells": 72, + "visited_bound": "199/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 2, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 1, + "width": 24, + "cutoff": 100003, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 313, + "budget": 9600, + "width_volume": 24, + "depth": 0, + "visited_cells": 55, + "visited_bound": "110", + "cutoff_visited": 26, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 1, + "width": 20, + "cutoff": 6, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 1014, + "budget": 9600, + "width_volume": 24, + "depth": 1, + "visited_cells": 59, + "visited_bound": "80", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 2, + "width": 1, + "cutoff": 1, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 600, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "49/4", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 2, + "width": 4, + "cutoff": 5, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 36, + "budget": 2400, + "width_volume": 4, + "depth": 0, + "visited_cells": 10, + "visited_bound": "25", + "cutoff_visited": 1, + "cutoff_input_cells": 7, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 2, + "width": 5, + "cutoff": 5, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 569, + "budget": 4200, + "width_volume": 7, + "depth": 1, + "visited_cells": 25, + "visited_bound": "121/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 2, + "width": 6, + "cutoff": 6, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 640, + "budget": 4800, + "width_volume": 8, + "depth": 1, + "visited_cells": 28, + "visited_bound": "69/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 2, + "width": 6, + "cutoff": 7, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 115, + "budget": 3600, + "width_volume": 6, + "depth": 0, + "visited_cells": 19, + "visited_bound": "67/2", + "cutoff_visited": 8, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 2, + "width": 24, + "cutoff": 5, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 1889, + "budget": 19200, + "width_volume": 32, + "depth": 1, + "visited_cells": 66, + "visited_bound": "92", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 2, + "width": 25, + "cutoff": 5, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 3063, + "budget": 23400, + "width_volume": 39, + "depth": 2, + "visited_cells": 75, + "visited_bound": "385/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 3, + "exact_remainder_scans": 6 + }, + { + "base": 5, + "sites": 2, + "width": 26, + "cutoff": 6, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 3, + "events": 12, + "steps": 2204, + "budget": 21600, + "width_volume": 36, + "depth": 1, + "visited_cells": 72, + "visited_bound": "199/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 3, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 2, + "width": 24, + "cutoff": 100003, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 313, + "budget": 14400, + "width_volume": 24, + "depth": 0, + "visited_cells": 55, + "visited_bound": "110", + "cutoff_visited": 26, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 2, + "width": 20, + "cutoff": 6, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 1660, + "budget": 16800, + "width_volume": 28, + "depth": 1, + "visited_cells": 59, + "visited_bound": "80", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 3, + "width": 1, + "cutoff": 1, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 800, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "49/4", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 3, + "width": 4, + "cutoff": 5, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 36, + "budget": 3200, + "width_volume": 4, + "depth": 0, + "visited_cells": 10, + "visited_bound": "25", + "cutoff_visited": 1, + "cutoff_input_cells": 7, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 3, + "width": 5, + "cutoff": 5, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 765, + "budget": 6400, + "width_volume": 8, + "depth": 1, + "visited_cells": 25, + "visited_bound": "121/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 3, + "width": 6, + "cutoff": 6, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 860, + "budget": 7200, + "width_volume": 9, + "depth": 1, + "visited_cells": 28, + "visited_bound": "69/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 3, + "width": 6, + "cutoff": 7, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 115, + "budget": 4800, + "width_volume": 6, + "depth": 0, + "visited_cells": 19, + "visited_bound": "67/2", + "cutoff_visited": 8, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 3, + "width": 24, + "cutoff": 5, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 2631, + "budget": 28800, + "width_volume": 36, + "depth": 1, + "visited_cells": 66, + "visited_bound": "92", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 3, + "width": 25, + "cutoff": 5, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 4974, + "budget": 39200, + "width_volume": 49, + "depth": 2, + "visited_cells": 75, + "visited_bound": "385/4", + "cutoff_visited": 7, + "cutoff_input_cells": 7, + "comparisons": 4, + "exact_remainder_scans": 8 + }, + { + "base": 5, + "sites": 3, + "width": 26, + "cutoff": 6, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 4, + "events": 16, + "steps": 3086, + "budget": 32800, + "width_volume": 41, + "depth": 1, + "visited_cells": 72, + "visited_bound": "199/2", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 4, + "exact_remainder_scans": 2 + }, + { + "base": 5, + "sites": 3, + "width": 24, + "cutoff": 100003, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 313, + "budget": 19200, + "width_volume": 24, + "depth": 0, + "visited_cells": 55, + "visited_bound": "110", + "cutoff_visited": 26, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 3, + "width": 20, + "cutoff": 6, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 2306, + "budget": 25600, + "width_volume": 32, + "depth": 1, + "visited_cells": 59, + "visited_bound": "80", + "cutoff_visited": 8, + "cutoff_input_cells": 8, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 1, + "width": 1, + "cutoff": 1, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 400, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "73/6", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 1, + "width": 6, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 48, + "budget": 2400, + "width_volume": 6, + "depth": 0, + "visited_cells": 12, + "visited_bound": "33", + "cutoff_visited": 1, + "cutoff_input_cells": 9, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 1, + "width": 7, + "cutoff": 7, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 479, + "budget": 3200, + "width_volume": 8, + "depth": 1, + "visited_cells": 31, + "visited_bound": "229/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 1, + "width": 8, + "cutoff": 8, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 526, + "budget": 3600, + "width_volume": 9, + "depth": 1, + "visited_cells": 34, + "visited_bound": "127/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 1, + "width": 8, + "cutoff": 9, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 149, + "budget": 3200, + "width_volume": 8, + "depth": 0, + "visited_cells": 23, + "visited_bound": "124/3", + "cutoff_visited": 10, + "cutoff_input_cells": 11, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 1, + "width": 48, + "cutoff": 7, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 2, + "events": 8, + "steps": 2105, + "budget": 21600, + "width_volume": 54, + "depth": 1, + "visited_cells": 118, + "visited_bound": "168", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 1, + "width": 49, + "cutoff": 7, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 14, + "steps": 2596, + "budget": 22800, + "width_volume": 57, + "depth": 2, + "visited_cells": 129, + "visited_bound": "1033/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 2, + "exact_remainder_scans": 4 + }, + { + "base": 7, + "sites": 1, + "width": 50, + "cutoff": 8, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 2, + "events": 8, + "steps": 2302, + "budget": 22800, + "width_volume": 57, + "depth": 1, + "visited_cells": 124, + "visited_bound": "526/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 2, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 1, + "width": 34, + "cutoff": 100003, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 435, + "budget": 13600, + "width_volume": 34, + "depth": 0, + "visited_cells": 75, + "visited_bound": "449/3", + "cutoff_visited": 36, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 1, + "width": 28, + "cutoff": 8, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 2, + "events": 8, + "steps": 1336, + "budget": 12800, + "width_volume": 32, + "depth": 1, + "visited_cells": 77, + "visited_bound": "317/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 2, + "width": 1, + "cutoff": 1, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 600, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "73/6", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 2, + "width": 6, + "cutoff": 7, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 48, + "budget": 3600, + "width_volume": 6, + "depth": 0, + "visited_cells": 12, + "visited_bound": "33", + "cutoff_visited": 1, + "cutoff_input_cells": 9, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 2, + "width": 7, + "cutoff": 7, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 723, + "budget": 5400, + "width_volume": 9, + "depth": 1, + "visited_cells": 31, + "visited_bound": "229/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 2, + "width": 8, + "cutoff": 8, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 794, + "budget": 6000, + "width_volume": 10, + "depth": 1, + "visited_cells": 34, + "visited_bound": "127/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 2, + "width": 8, + "cutoff": 9, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 149, + "budget": 4800, + "width_volume": 8, + "depth": 0, + "visited_cells": 23, + "visited_bound": "124/3", + "cutoff_visited": 10, + "cutoff_input_cells": 11, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 2, + "width": 48, + "cutoff": 7, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 3, + "events": 12, + "steps": 3483, + "budget": 36000, + "width_volume": 60, + "depth": 1, + "visited_cells": 118, + "visited_bound": "168", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 2, + "width": 49, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 7, + "events": 32, + "steps": 4941, + "budget": 40200, + "width_volume": 67, + "depth": 2, + "visited_cells": 129, + "visited_bound": "1033/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 3, + "exact_remainder_scans": 6 + }, + { + "base": 7, + "sites": 2, + "width": 50, + "cutoff": 8, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 3, + "events": 12, + "steps": 3842, + "budget": 38400, + "width_volume": 64, + "depth": 1, + "visited_cells": 124, + "visited_bound": "526/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 3, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 2, + "width": 34, + "cutoff": 100003, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 435, + "budget": 20400, + "width_volume": 34, + "depth": 0, + "visited_cells": 75, + "visited_bound": "449/3", + "cutoff_visited": 36, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 2, + "width": 28, + "cutoff": 8, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 3, + "events": 12, + "steps": 2174, + "budget": 21600, + "width_volume": 36, + "depth": 1, + "visited_cells": 77, + "visited_bound": "317/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 3, + "width": 1, + "cutoff": 1, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 18, + "budget": 800, + "width_volume": 1, + "depth": 0, + "visited_cells": 7, + "visited_bound": "73/6", + "cutoff_visited": 1, + "cutoff_input_cells": 3, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 3, + "width": 6, + "cutoff": 7, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 48, + "budget": 4800, + "width_volume": 6, + "depth": 0, + "visited_cells": 12, + "visited_bound": "33", + "cutoff_visited": 1, + "cutoff_input_cells": 9, + "comparisons": 0, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 3, + "width": 7, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 967, + "budget": 8000, + "width_volume": 10, + "depth": 1, + "visited_cells": 31, + "visited_bound": "229/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 3, + "width": 8, + "cutoff": 8, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 1062, + "budget": 8800, + "width_volume": 11, + "depth": 1, + "visited_cells": 34, + "visited_bound": "127/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 3, + "width": 8, + "cutoff": 9, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 1, + "events": 2, + "steps": 149, + "budget": 6400, + "width_volume": 8, + "depth": 0, + "visited_cells": 23, + "visited_bound": "124/3", + "cutoff_visited": 10, + "cutoff_input_cells": 11, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 3, + "width": 48, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 4, + "events": 16, + "steps": 4861, + "budget": 52800, + "width_volume": 66, + "depth": 1, + "visited_cells": 118, + "visited_bound": "168", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 3, + "width": 49, + "cutoff": 7, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 13, + "events": 58, + "steps": 7774, + "budget": 63200, + "width_volume": 79, + "depth": 2, + "visited_cells": 129, + "visited_bound": "1033/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 4, + "exact_remainder_scans": 8 + }, + { + "base": 7, + "sites": 3, + "width": 50, + "cutoff": 8, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 4, + "events": 16, + "steps": 5382, + "budget": 56800, + "width_volume": 71, + "depth": 1, + "visited_cells": 124, + "visited_bound": "526/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 4, + "exact_remainder_scans": 2 + }, + { + "base": 7, + "sites": 3, + "width": 34, + "cutoff": 100003, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 1, + "events": 2, + "steps": 435, + "budget": 27200, + "width_volume": 34, + "depth": 0, + "visited_cells": 75, + "visited_bound": "449/3", + "cutoff_visited": 36, + "cutoff_input_cells": 100005, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 7, + "sites": 3, + "width": 28, + "cutoff": 8, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 4, + "events": 16, + "steps": 3012, + "budget": 32000, + "width_volume": 40, + "depth": 1, + "visited_cells": 77, + "visited_bound": "317/3", + "cutoff_visited": 10, + "cutoff_input_cells": 10, + "comparisons": 1, + "exact_remainder_scans": 2 + }, + { + "base": 2, + "sites": 3, + "width": 63, + "cutoff": 2, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 364, + "events": 1696, + "steps": 107106, + "budget": 772800, + "width_volume": 966, + "depth": 5, + "visited_cells": 228, + "visited_bound": "267", + "cutoff_visited": 4, + "cutoff_input_cells": 4, + "comparisons": 121, + "exact_remainder_scans": 242 + }, + { + "base": 3, + "sites": 2, + "width": 257, + "cutoff": 3, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 63, + "events": 312, + "steps": 55213, + "budget": 414600, + "width_volume": 691, + "depth": 5, + "visited_cells": 740, + "visited_bound": "1831/2", + "cutoff_visited": 5, + "cutoff_input_cells": 5, + "comparisons": 31, + "exact_remainder_scans": 62 + }, + { + "base": 7, + "sites": 1, + "width": 4097, + "cutoff": 100001, + "origins": [ + 0, + 0, + 0, + 0 + ], + "nodes": 1, + "events": 2, + "steps": 45128, + "budget": 1638800, + "width_volume": 4097, + "depth": 0, + "visited_cells": 8201, + "visited_bound": "102473/6", + "cutoff_visited": 4099, + "cutoff_input_cells": 100003, + "comparisons": 1, + "exact_remainder_scans": 0 + }, + { + "base": 5, + "sites": 3, + "width": 500, + "cutoff": 17, + "origins": [ + -17, + 4, + 29, + -9 + ], + "nodes": 40, + "events": 184, + "steps": 101967, + "budget": 870400, + "width_volume": 1088, + "depth": 3, + "visited_cells": 1248, + "visited_bound": "1653", + "cutoff_visited": 19, + "cutoff_input_cells": 19, + "comparisons": 13, + "exact_remainder_scans": 26 + }, + { + "base": 7, + "sites": 4, + "width": 301, + "cutoff": 7, + "origins": [ + 8, + -25, + -3, + 42 + ], + "nodes": 21, + "events": 92, + "steps": 59719, + "budget": 569000, + "width_volume": 569, + "depth": 2, + "visited_cells": 705, + "visited_bound": "5821/6", + "cutoff_visited": 9, + "cutoff_input_cells": 9, + "comparisons": 5, + "exact_remainder_scans": 10 + } + ] +} diff --git a/research/selected-rank-control/evidence/root-replay.json b/research/selected-rank-control/evidence/root-replay.json new file mode 100644 index 0000000000..9608e62246 --- /dev/null +++ b/research/selected-rank-control/evidence/root-replay.json @@ -0,0 +1,148 @@ +{ + "normal_optimized_byte_equal": true, + "receipts": { + "general_normal": { + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 + }, + "general_optimized": { + "finite_cases": 896, + "formal_kernel": "not_run", + "independent_dense_cases": 9, + "kappa": "unchanged", + "maximum_observed_steps_over_splus1_mass": "2509/96", + "negative_controls": 10, + "nodes": 13540, + "selected_payload_implementation": "not_claimed", + "shape_blowup": [ + { + "depth": 0, + "nodes": 1, + "width": 1 + }, + { + "depth": 1, + "nodes": 4, + "width": 2 + }, + { + "depth": 2, + "nodes": 13, + "width": 4 + }, + { + "depth": 3, + "nodes": 40, + "width": 8 + }, + { + "depth": 4, + "nodes": 121, + "width": 16 + }, + { + "depth": 5, + "nodes": 364, + "width": 32 + }, + { + "depth": 6, + "nodes": 1093, + "width": 64 + }, + { + "depth": 7, + "nodes": 3280, + "width": 128 + }, + { + "depth": 8, + "nodes": 9841, + "width": 256 + } + ], + "status": "PASS_ONLINE_RANK_CONTROL", + "transitions": 3469732 + }, + "selected_normal": { + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 + }, + "selected_optimized": { + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 + } + }, + "status": "PASS_SELECTED_RANK_CONTROL_PACKAGE" +} diff --git a/research/selected-rank-control/evidence/selected_normal.json b/research/selected-rank-control/evidence/selected_normal.json new file mode 100644 index 0000000000..c88d26c8cc --- /dev/null +++ b/research/selected-rank-control/evidence/selected_normal.json @@ -0,0 +1,12 @@ +{ + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 +} diff --git a/research/selected-rank-control/evidence/selected_optimized.json b/research/selected-rank-control/evidence/selected_optimized.json new file mode 100644 index 0000000000..c88d26c8cc --- /dev/null +++ b/research/selected-rank-control/evidence/selected_optimized.json @@ -0,0 +1,12 @@ +{ + "cases": 2400, + "controls": 8, + "cutoff": "supplied input; production not claimed", + "independent_dense_cases": 8, + "kappa": "unchanged", + "m3_sites2_instructions": 288, + "nodes": 10878, + "remainder_zero": "explicit B0/A0 hooks; consumer must skip payload work", + "status": "PASS_SELECTED_UNIFORM_CONTROL", + "transitions": 3443893 +} diff --git a/research/selected-rank-control/independent_check.py b/research/selected-rank-control/independent_check.py new file mode 100644 index 0000000000..4980c13206 --- /dev/null +++ b/research/selected-rank-control/independent_check.py @@ -0,0 +1,313 @@ +"""Independent dense CPU and materialized address-tree oracle for selected control. + +No author Machine, Tape, input constructor or verifier is called. Compile-time +Builder output is the program under test. Prepared for CubeJerry with substantial +OpenAI assistance. Apache-2.0. +""" +from fractions import Fraction +from hashlib import sha256 +from importlib.util import module_from_spec, spec_from_file_location +from pathlib import Path +from types import ModuleType +import json +import sys + +PKG = Path(sys.argv[1]).resolve() if len(sys.argv)>1 else Path(__file__).resolve().parent +BLANK, ONE, MARK = '_', '1', '|' + + +def need(test, message): + if not test: + raise AssertionError(message) + + +def load(name, path): + spec = spec_from_file_location(name, path) + module = module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +reference = load('controller_reference', PKG/'controller_reference.py') + + +def forbidden(*args, **kwargs): + raise AssertionError('author runtime/helper invoked') + + +reference.Machine = reference.Tape = reference.initial_tapes = forbidden +subject = load('selected_control', PKG/'selected_control.py') + + +def materialized_tree(width, cutoff, base, sites): + """Breadth-first materialization, then independently sorted contour events.""" + nodes = [((), width, (), ())] + cursor = 0 + while cursor < len(nodes): + path, size, sort_prefix, ancestors = nodes[cursor] + cursor += 1 + if size >= max(base, cutoff): + for site in range(sites): + nodes.append((path+(site,), size//base, sort_prefix+(3+3*site,), + ancestors+((size,site),))) + events = [] + for path, size, prefix, ancestors in nodes: + if size < max(base,cutoff): + events.extend([(prefix+(0,), 'L',size,path,ancestors), + (prefix+(1,), 'X',size,path,ancestors)]) + else: + events.extend([(prefix+(0,), 'E',size,path,ancestors), + (prefix+(1,), 'B'+str(size%base),size,path,ancestors)]) + for site in range(sites): + events.extend([ + (prefix+(2+3*site,), 'D'+str(site),size//base,path+(site,), + ancestors+((size,site),)), + (prefix+(4+3*site,), 'U'+str(site),size,path,ancestors)]) + events.extend([(prefix+(2+3*sites,), 'A'+str(size%base),size,path,ancestors), + (prefix+(3+3*sites,), 'X',size,path,ancestors)]) + events.sort(key=lambda event:event[0]) + return nodes,events + + +def dense_program(code, alphabet): + symbols = {symbol:i for i,symbol in enumerate(alphabet)} + result = [] + for instruction in code: + op,*args = instruction + if op=='read': + tape,arms = args + result.append((0,tape,tuple(arms.get(symbol,-1) for symbol in alphabet))) + elif op=='write': + result.append((1,args[0],symbols[args[1]])) + elif op=='move': + need(args[1] in (-1,1),'literal unit move') + result.append((2,args[0],args[1])) + elif op=='goto': result.append((3,args[0])) + elif op=='emit': result.append((4,args[0])) + elif op=='halt': result.append((5,)) + else: raise AssertionError('unknown instruction') + return tuple(result),symbols + + +class DenseCPU: + """Independently decoded six-opcode CPU over four dense symbol arrays.""" + def __init__(self, code, alphabet, width, cutoff, origins, stack_extent): + self.program,self.symbols = dense_program(code,alphabet) + self.alphabet,self.origins = alphabet,origins + self.heads = list(origins) + self.lows,self.highs = list(origins),list(origins) + self.pc,self.steps = 0,0 + self.visited_writes = [0,0,0,0] + self.mem,self.left,self.protected = [],[],[] + active = (width,width,stack_extent,cutoff) + for tape,(origin,extent) in enumerate(zip(origins,active)): + left,right = origin-8,origin+extent+9 + cells = [self.symbols[BLANK]]*(right-left+1) + protected = [] + for delta,symbol in ((-7,'t0'),(-6,'0'),(-4,ONE),(-3,MARK),(-2,'0')): + pos = origin+delta + cells[pos-left] = self.symbols[symbol] + protected.append(pos) + cells[origin-1-left] = self.symbols[MARK] + protected.append(origin-1) + # Input words are constructed here, without author helper code. + length = width if tape==0 else cutoff if tape==3 else 0 + for offset in range(length): cells[origin+offset-left] = self.symbols[ONE] + # Hostile cells sit beyond the active window and its terminal blank. + for delta,symbol in ((extent+2,'0'),(extent+3,MARK),(extent+5,'t0')): + pos = origin+delta + cells[pos-left] = self.symbols[symbol] + protected.append(pos) + self.mem.append(cells) + self.left.append(left) + self.protected.append(tuple(protected)) + self.initial = tuple(tuple(cells) for cells in self.mem) + + def get(self,tape,position): + return self.mem[tape][position-self.left[tape]] + + def unary_width(self): + origin = self.origins[0] + size = 0 + while self.get(0,origin+size)==self.symbols[ONE]: size+=1 + need(self.get(0,origin+size)==self.symbols[BLANK], 'unary terminator') + return size + + def transition(self): + need(0<=self.pc=0,'unhandled scanned symbol') + self.pc = target + elif opcode==1: + tape,value = instruction[1:] + need(tape!=3,'cutoff write') + need(self.heads[tape] not in self.protected[tape],'protected-cell write') + self.mem[tape][self.heads[tape]-self.left[tape]] = value + self.visited_writes[tape] += 1 + elif opcode==2: + tape,direction = instruction[1:] + self.heads[tape] += direction + need(self.origins[tape]-1<=self.heads[tape], 'read below entry marker') + need(self.left[tape]<=self.heads[tape]=origin-1 for low,origin in zip(cpu.lows,origins)), + 'ancestor-prefix locality') + return dict(base=base,sites=sites,width=width,cutoff=cutoff,origins=origins, + nodes=len(nodes),events=len(expected),steps=cpu.steps,budget=budget, + width_volume=sum(node[1] for node in nodes),depth=depth, + visited_cells=visited,visited_bound=str(bound), + cutoff_visited=cpu.highs[3]-cpu.lows[3]+1, + cutoff_input_cells=cutoff+2,comparisons=comparisons, + exact_remainder_scans=remainder_scans) + + +def negative_controls(): + out=[] + + def rejects(label,operation,wanted): + try: operation() + except AssertionError as error: + need(str(error)==wanted,'unexpected rejection for '+label+': '+str(error)) + out.append(label) + else: raise AssertionError('negative control survived: '+label) + + def wrong_remainder(code): + return tuple(('emit','A0') if op==('emit','A1') else op for op in code) + rejects('post remainder label changed', + lambda:run_case(3,2,10,3,(-9,7,21,-4),mutate=wrong_remainder), + 'event oracle mismatch') + + text=(PKG/'selected_control.py').read_text() + old="if r==m-1:a.op('write',CHILD,ONE);a.op('move',CHILD,1)" + need(text.count(old)==1,'unique quotient mutation site') + new=old+";a.op('write',CHILD,ONE);a.op('move',CHILD,1)" + mutant=ModuleType('wrong_quotient') + exec(compile(text.replace(old,new),'wrong-quotient-control','exec'),mutant.__dict__) + rejects('doubled quotient output', + lambda:run_case(3,1,3,3,(4,-8,13,27),compiler=mutant.compile_selected), + 'actual emitted WIDTH mismatch') + + def wrong_stop(code): + result=list(code) + at=next(i for i,op in enumerate(code) if op[0]=='read' and op[1]==3) + width_probe=code[at][2][ONE] + wrong=code[width_probe][2][BLANK] + result[at]=('read',3,{**code[at][2],BLANK:wrong}) + return tuple(result) + rejects('cutoff equality treated as leaf', + lambda:run_case(3,2,9,9,(-17,20,4,-30),mutate=wrong_stop), + 'event oracle mismatch') + return out + + +def main(): + pins={name:sha256((PKG/name).read_bytes()).hexdigest() + for name in ('selected_control.py','controller_reference.py','SOURCE-BINDING.md')} + need(pins['selected_control.py']=='1c977e9f4864d338f874aa4943d9f3422d964c3ab0cc2f877d9bc4c2d9e20237', + 'selected source pin') + need(pins['controller_reference.py']=='e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73', + 'controller source pin') + cases=[] + origins=((-17,4,29,-9),(8,-25,-3,42),(0,0,0,0)) + for base in (2,3,5,7): + for sites in (1,2,3): + for width,cutoff in ((1,1),(base-1,base),(base,base), + (base+1,base+1),(base+1,base+2), + (base*base-1,base),(base*base,base), + (base*base+1,base+1),(5*base-1,100003), + (4*base,base+1)): + cases.append(run_case(base,sites,width,cutoff,origins[len(cases)%3])) + for base,sites,width,cutoff in ((2,3,63,2),(3,2,257,3),(7,1,4097,100001), + (5,3,500,17),(7,4,301,7)): + cases.append(run_case(base,sites,width,cutoff,origins[len(cases)%3])) + result=dict(status='PASS',method='separate dense CPU and materialized address-tree contour', + cases=len(cases),nodes=sum(row['nodes'] for row in cases), + events=sum(row['events'] for row in cases), + transitions=sum(row['steps'] for row in cases), + exact_remainder_scans=sum(row['exact_remainder_scans'] for row in cases), + negative_controls=negative_controls(),pins=pins,rows=cases) + print(json.dumps(result,indent=2)) + + +if __name__=='__main__': main() diff --git a/research/selected-rank-control/selected_control.py b/research/selected-rank-control/selected_control.py new file mode 100644 index 0000000000..b3ffa7c4ac --- /dev/null +++ b/research/selected-rank-control/selected_control.py @@ -0,0 +1,59 @@ +"""Final rank-one control with supplied cutoff and explicit remainder hooks. + +The credited frozen Builder/interpreter performs literal local tape steps. +No payload or external cutoff producer is included. Apache-2.0. +""" +from controller_reference import Builder,Machine,Tape,initial_tapes,BLANK,ONE,MARK,WIDTH,CHILD,STACK +CUTOFF=3 + +def remainder(a,m,prefix,event,next_state): + a.mark(prefix);a.op('goto',prefix+'r0') + for r in range(m): + a.mark(prefix+f'r{r}');a.op('read',WIDTH,{ONE:prefix+f'b{r}',BLANK:prefix+f'e{r}'}) + a.mark(prefix+f'b{r}');a.op('move',WIDTH,1);a.op('goto',prefix+f'r{(r+1)%m}') + a.mark(prefix+f'e{r}');a.rewind(WIDTH,(ONE,));a.op('emit',event+str(r));a.op('goto',next_state) + +def compile_selected(m,sites): + if type(m) is not int or m<2 or type(sites) is not int or sites<1:raise ValueError('invalid fixed template') + tags=tuple(f't{i}' for i in range(sites));a=Builder();a.mark('enter');a.op('read',WIDTH,{ONE:'probe0'}) + for k in range(m): + a.mark(f'probe{k}');a.op('read',WIDTH,{ONE:f'advance{k}',BLANK:f'leaf{k}'}) + a.mark(f'advance{k}');a.op('move',WIDTH,1);a.op('goto',f'probe{k+1}' if k+1=m: + for i,r in enumerate(ranks): + e,t,n,d=oracle(m,ranks,r*f//m) + ev += [f'D{i}']+e+[f'U{i}']; mass+=t; nodes+=n; depth=max(depth,d+1) + return ev+['X'],mass,nodes,depth + +def width_oracle(m,ranks,f): + result=[('L' if f=m: + for i,r in enumerate(ranks): + child=r*f//m + result += [(f'D{i}',child)]+width_oracle(m,ranks,child)+[(f'U{i}',f)] + return result+[('X',f)] + +def observed_run(code,tapes,bound): + z=Machine(code,tapes); widths=[] + while not z.halted: + need(z.steps=o-1 for t,o in zip(tapes,origins)),'ancestor visit') + span=sum(t.high-t.low+1 for t in tapes); rho=Fraction(max(ranks),m) + need(span<=2*(f+2)+Fraction(f,1-rho)+depth+2,'retained span') + return z.steps,nodes,mass,z.events + +def dense_run(code,tapes,limit): + lo=min(t.head for t in tapes)-100; hi=max(t.head for t in tapes)+20000 + a=[[BLANK]*(hi-lo+1) for _ in tapes]; h=[t.head for t in tapes] + for j,t in enumerate(tapes): + for p,s in t.cells.items(): a[j][p-lo]=s + pc=steps=0; events=[] + while steps=o-1 for x,o in zip(ts,org)),'ancestor locality') + span=sum(x.high-x.low+1 for x in ts) + need(span<=2*(e+2)+Fraction(e,1-Fraction(1,m))+d+2+min(e,L)+2,'backing') + need(ts[3].high-org[3]<=min(e,L),'cutoff prefix') + return z.steps,nodes,mass,ev + +def dense(code,ts,limit): + lo=min(x.head for x in ts)-30;hi=max(x.head for x in ts)+10000 + arr=[[BLANK]*(hi-lo+1) for _ in ts];heads=[x.head for x in ts] + for j,t in enumerate(ts): + for p,c in t.cells.items():arr[j][p-lo]=c + pc=steps=0;ev=[] + while steps