diff --git a/.gitattributes b/.gitattributes index 6825630198..04d8da277a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,3 +18,8 @@ research/coordinated-frames-and-entrance-banks/** -text -whitespace # Frozen PR210 package and round-nine evidence retain their audited bytes. research/five-stage-source527-banks/** -text -whitespace research/community-round9-audit/** -text -whitespace +# The E8 candidate binds exact third-party bytes and regenerated records. +research/e8-coupled-bit-retiming/** -text -whitespace +# These finite candidates and proof receipts likewise bind literal source bytes. +research/e8-clean-reuse-extension/** -text -whitespace +research/e8-structural-frontiers/** -text -whitespace diff --git a/.github/workflows/e8-clean-reuse-extension.yml b/.github/workflows/e8-clean-reuse-extension.yml new file mode 100644 index 0000000000..16fb0c8f62 --- /dev/null +++ b/.github/workflows/e8-clean-reuse-extension.yml @@ -0,0 +1,53 @@ +name: E8 clean helper reuse extension +on: + push: + paths: + - 'research/e8-clean-reuse-extension/**' + - 'research/e8-coupled-bit-retiming/**' + - 'research/e8-structural-frontiers/**' + - '.github/workflows/e8-clean-reuse-extension.yml' + pull_request: + paths: + - 'research/e8-clean-reuse-extension/**' + - 'research/e8-coupled-bit-retiming/**' + - 'research/e8-structural-frontiers/**' + - '.github/workflows/e8-clean-reuse-extension.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + replay: + runs-on: ubuntu-24.04 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python-version }} + - run: python -m pip install -r research/e8-clean-reuse-extension/requirements.txt + - name: Install exact arithmetic headers + run: | + if ! test -f /usr/include/boost/multiprecision/cpp_int.hpp; then + sudo apt-get update + sudo apt-get install -y libboost-dev + fi + - name: Full suppliers, changed words, invoices and outer controls + run: python -B research/e8-clean-reuse-extension/verify.py "${RUNNER_TEMP}/e8-clean-reuse" + - name: Check both pending records + run: | + python -B research/e8-coupled-bit-retiming/record.py + python -B research/e8-clean-reuse-extension/record.py + - name: Fresh exact structural obstruction proofs + run: python -B research/e8-structural-frontiers/verify.py "${RUNNER_TEMP}/e8-structural-frontiers" + - run: git diff --exit-code + - uses: actions/upload-artifact@v4 + if: always() + with: + name: e8-clean-reuse-${{ matrix.python-version }} + path: ${{ runner.temp }}/e8-clean-reuse diff --git a/.github/workflows/e8-coupled-bit-retiming.yml b/.github/workflows/e8-coupled-bit-retiming.yml new file mode 100644 index 0000000000..f91d122287 --- /dev/null +++ b/.github/workflows/e8-coupled-bit-retiming.yml @@ -0,0 +1,45 @@ +name: E8 coupled bit retiming +on: + push: + paths: + - 'research/e8-coupled-bit-retiming/**' + - '.github/workflows/e8-coupled-bit-retiming.yml' + pull_request: + paths: + - 'research/e8-coupled-bit-retiming/**' + - '.github/workflows/e8-coupled-bit-retiming.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + replay: + runs-on: ubuntu-24.04 + timeout-minutes: 25 + strategy: + fail-fast: false + matrix: + python-version: ['3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python-version }} + - run: python -m pip install -r research/e8-coupled-bit-retiming/requirements.txt + - name: Install exact arithmetic headers + run: | + if ! test -f /usr/include/boost/multiprecision/cpp_int.hpp; then + sudo apt-get update + sudo apt-get install -y libboost-dev + fi + - name: Replay both suppliers, controls, finite invoices and record + run: python -B research/e8-coupled-bit-retiming/verify.py "${RUNNER_TEMP}/e8-coupled" + - name: Check repository candidate record + run: python -B research/e8-coupled-bit-retiming/record.py + - run: git diff --exit-code + - uses: actions/upload-artifact@v4 + if: always() + with: + name: e8-coupled-${{ matrix.python-version }} + path: ${{ runner.temp }}/e8-coupled diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1638f295b3..73b65a4206 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -23,6 +23,45 @@ not import every numerical refinement from the source527 branch. Original commits, licenses and AI-assistance disclosures are preserved. Douglas Colkitt performed the maintainer review and integration with OpenAI Codex assistance. +### October 11 pending E8 extension + +ai-nanachi, with substantial OpenAI Codex assistance, adds two exact two-donor +complex helper substitutions, 55 clean-reset bit helper reuses, 54 subsequent +bit frame moves and complete changed supplier admission. The combined shared +response-space construction has conditional κ +`40750673324589432209923/40000000000000000000000000`. +The new bit component lifts the previous bit bottleneck; the combined complex +component determines the headline. Three independently derived, scoped exact +structural obstructions are included in the structural-frontiers appendix. +applecrusher supplies PR376's equal-helper aliases and frame repairs; Dugongue +supplies PR390's prefix restoration; Rohan Arun supplies PR395's signed +extension. Dugongue also supplies PR401's two-sided bank normalization and +PR404's shared-donor response spaces; applecrusher supplies the additional +target201 frame refinement. The exact selected source pins and original notices are retained +in the [extension notice](research/e8-clean-reuse-extension/NOTICE.md). +All credits of the frozen PR389 package below remain. Maintainer acceptance +and all-size proof obligations remain pending. + +### October 11 preceding PR389 candidate + +ai-nanachi, with substantial OpenAI Codex assistance, contributes connected +one-, two- and three-gate frame coalescence (98 changed bit gates), complete +pinned supplier replay and a separate exact candidate record. The conditional +κ is `998634658090834606116833/1000000000000000000000000000`. +The headline improvement applies applecrusher's #376 assembly refinement to +Zhihao Chen's #377 nine-stage complex supplier; it is not attributed to the +new bit frames. Dylan Crow supplies the #370 E8 bit word; applecrusher supplies +the #376 helper reuse; DaysSky supplies #375's full replay and #381's unsplit +degree-two layout; Rohan Arun supplies #380's common-envelope comparison. +Chafik Boukhalfa's #384 supplies the far-retimed complex unit and dated preceding +witness. Rohan Arun's #385 supplies the complete retimed-complex derivation +procedure. This package freshly checks the #384 unit's physical word, new +Clifford frames and finite invoice, and adopts #387's smaller beta backoff. +#387 is the final preceding witness. The +[package notice](research/e8-coupled-bit-retiming/NOTICE.md) records exact pins, +AI disclosures, retained licenses and the complete predecessor lineage. +Maintainer acceptance and general all-size proof obligations remain pending. + ### Historical source527 checkpoint **eumemic's [#210](https://github.com/CrocSwap/integer-mult-bounds/pull/210), diff --git a/Makefile b/Makefile index 61fc5ef410..cb5982dcd3 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,27 @@ source527-verify: source527-record-check @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-source527.XXXXXX"); \ python3 -B research/five-stage-source527-banks/verify.py --output "$$work/replay" +.PHONY: e8-coupled-record-check e8-coupled-verify +.PHONY: e8-clean-reuse-record-check e8-clean-reuse-verify +.PHONY: e8-structural-verify +e8-structural-verify: + @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-e8-structural.XXXXXX"); \ + python3 -B research/e8-structural-frontiers/verify.py "$$work/replay" + +e8-clean-reuse-record-check: + python3 -B research/e8-clean-reuse-extension/record.py + +e8-clean-reuse-verify: e8-clean-reuse-record-check + @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-e8-clean-reuse.XXXXXX"); \ + python3 -B research/e8-clean-reuse-extension/verify.py "$$work/replay" + +e8-coupled-record-check: + python3 -B research/e8-coupled-bit-retiming/record.py + +e8-coupled-verify: e8-coupled-record-check + @work=$$(mktemp -d "$${TMPDIR:-/tmp}/integer-mult-e8-coupled.XXXXXX"); \ + python3 -B research/e8-coupled-bit-retiming/verify.py "$$work/replay" + verify-community: community-audit-check community-followup-check copied-reversed-producer copied-reversed-check copied-fixed-reversed-producer copied-fixed-reversed-check $(MAKE) copied-fixed-verify $(MAKE) climbed-48-verify diff --git a/README.md b/README.md index 66bf6782f7..443f3278ee 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,86 @@ **Community research maintained by Douglas Colkitt — conditional on the original OpenAI #109 framework.** +## New conditional candidate: shared E8 response spaces and clean reuse + +The extension candidate gives **κ = 0.001018766833114735805248075**, with maintainer review +pending. It composes Dugongue's shared-donor response spaces from +[#404](https://github.com/CrocSwap/integer-mult-bounds/pull/404), the exact +two-sided dirty-bank normalization from +[#401](https://github.com/CrocSwap/integer-mult-bounds/pull/401), and +applecrusher's new frame improvement with our independent R779 substitutions. +It also composes PR409's ordered entrance promotions, PR410's enlargements +and PR412's checker-clean re-pivoting. The unchanged original gx and gxcore +checker families both pass the reconstructed word. +The combined word has 202 entrance gauges of rank mass 360 and 734 mixed +banks per stage. All 1,019 independent dirty columns, both orientations, +every old and new Gaussian child pair, physical owners and the finite +invoice are checked. The source-specific gains are recomputed together. + +The separate bit contribution reuses 55 retired helpers by cancelling their +clean content and rebuilding compensation for their actual independent dirt. +After 54 further frame moves it has 767 helpers; full local and seven-stage +column, geometry, whole-bank and finite checks are rerun. Its coarse saving +also lifts a new bit bottleneck: keeping the preceding bit supplier with this +same complex supplier gives κ = 0.001016774267814750149837485. The combined +construction is limited by the complex supplier. +The requested 0.002 research target has not been achieved. + +[Exact pending record](certificates/candidates/e8-clean-reuse-extension.json) · +[Construction and scope](research/e8-clean-reuse-extension/PROOF.md) · +[Sources](research/e8-clean-reuse-extension/NOTICE.md) · +[Research record](research/e8-clean-reuse-extension/RESEARCH.md) + +```sh +python3 -m pip install -r research/e8-clean-reuse-extension/requirements.txt +make e8-clean-reuse-verify +``` + +Both full predecessor supplier suites, the intermediate signed R779 supplier, +and the changed response-space/bit/assembly checks run from pinned source. +All-size theorem interfaces remain conditional. This candidate does not +replace the maintainer-reviewed selected result below. + +[Three exact structural obstructions](research/e8-structural-frontiers/README.md) +are included independently: the frozen center basis cannot lower copied +frame rank; any rank-eight completion still needs source span at least seven; +and the fixed first-frame family misses 0.002 for every bank count. These +results state their restrictions and leave changed centers, words, joint +endpoints and geometries open. Run `make e8-structural-verify` to reproduce. + +## Preceding PR389 candidate: coupled E8 frames and refined assembly + +The October 11 candidate gives +**κ = 998634658090834606116833 / 1000000000000000000000000000 += 0.000998634658090834606116833**, with maintainer review pending. +It improves the public [#387](https://github.com/CrocSwap/integer-mult-bounds/pull/387) +witness by approximately `9.58198606116833e-13`. + +ai-nanachi's connected frame search changes 98 scalar-gate frames after +applecrusher's [#376](https://github.com/CrocSwap/integer-mult-bounds/pull/376) +helper reuse. The composition uses DaysSky's unsplit degree-two bit geometry +from [#381](https://github.com/CrocSwap/integer-mult-bounds/pull/381) and +Zhihao Chen's complete nine-stage complex supplier from +[#377](https://github.com/CrocSwap/integer-mult-bounds/pull/377), with Chafik +Boukhalfa's far-retimed unit from #384. The new unit's physical, Clifford and +finite checks are fully rerun, following Rohan Arun's #385 derivation. The headline +κ improvement comes from applying #376's exact assembly refinement to this +new complex supplier, with #387's smaller positive beta backoff; the separate bit improvement is recorded independently +because the composition is complex-bound. Both complete supplier suites, +physical columns, mutation controls, finite invoices and the 47 assembly +inequalities are freshly replayed. General all-size interfaces remain +conditional; finite replay is not a formal proof of the complete theorem. + +[Candidate record](certificates/candidates/e8-coupled-bit-retiming.json) · +[Proof and scope](research/e8-coupled-bit-retiming/PROOF.md) · +[Sources and attribution](research/e8-coupled-bit-retiming/NOTICE.md) · +[25-trial exploration](research/e8-coupled-bit-retiming/campaign/REPORT.md) + +```sh +python3 -m pip install -r research/e8-coupled-bit-retiming/requirements.txt +make e8-coupled-verify +``` + ## Current reviewed result: gen4 circuits and common-delivery frames The composition of **DreamingOfClouds' [#276](https://github.com/CrocSwap/integer-mult-bounds/pull/276)** diff --git a/certificates/candidates/e8-clean-reuse-extension.json b/certificates/candidates/e8-clean-reuse-extension.json new file mode 100644 index 0000000000..c86f277892 --- /dev/null +++ b/certificates/candidates/e8-clean-reuse-extension.json @@ -0,0 +1,95 @@ +{ + "absolute_gain": "10066087511950599565621/500000000000000000000000000", + "assistance": "Substantial OpenAI Codex assistance", + "bit_R": 767, + "bit_coarse": "104575879789097/100000000000000000", + "bit_component_gain": "13974823961493/500000000000000000", + "bit_finite_coefficient": 55762535482200, + "bit_global_columns": 1487, + "bit_live": 10409, + "bit_local_columns": 1007, + "bit_profile": { + "1": 115983, + "14": 1680, + "2": 42875, + "20": 1680, + "28": 1680, + "3": 23275, + "34": 1680, + "4": 15729, + "5": 8036, + "6": 1680, + "7": 4046, + "8": 882 + }, + "bit_reuse_kappa_gain": "199256529998565541059/100000000000000000000000000", + "complex_R": 779, + "complex_all_fresh_phase_pairs": 6482, + "complex_bank_boundary_adapters": 29088, + "complex_banks_per_stage": 734, + "complex_chronological_entrance_shears": 551, + "complex_coarse": "254951444354246755323/250000000000000000000000", + "complex_entrance_rankmass": 360, + "complex_finite_invoice": { + "C0_exponent": 210000, + "E_exponent": 100000, + "G_exponent": 30000, + "adapter_groups": 303184, + "compiler": 25934336, + "explicit_bank_boundary_adapters": 29088, + "group_bits": 2628, + "halving_degree": 2, + "induction_gap_multiple_B": 49, + "literal_bits": 35284, + "live": 14286, + "local_bound": 7862875808976, + "logical_bits": 2677, + "outside_groups": 2412664, + "pervertex": 628697897898302, + "physical": 15075, + "physical_stock_bits": 2642, + "real_primitives_all_calls": 5799984, + "retained_row": 20161, + "router_bits": 7984, + "row": 15445 + }, + "complex_gauges": 202, + "complex_live": 14286, + "complex_local_columns": 1019, + "complex_physical": 15075, + "complex_profile": { + "1": 178830, + "16": 3840, + "2": 47520, + "3": 30960, + "32": 3840, + "4": 8568, + "48": 3840, + "5": 15768, + "6": 15840, + "7": 4536, + "8": 7488, + "9": 576 + }, + "complex_unchanged_original_checkers": [ + "gx.check1", + "gxcore.mirror" + ], + "conditional": true, + "contributor": "ai-nanachi", + "date": "2026-10-11", + "fair_old_bit_kappa": "203354853562950029967497/200000000000000000000000000", + "format": "conditional-candidate-record/1", + "kappa": "40750673324589432209923/40000000000000000000000000", + "kappa_decimal": "0.001018766833114735805248075", + "manifest_sha256": "197f02bb6ee45a2ca338611fbe5357af86e54ebebbff2f71f03c6be16e6f8e82", + "package": "research/e8-clean-reuse-extension", + "prior_pr389": "998634658090834606116833/1000000000000000000000000000", + "prior_pr389_commit": "b3c45822ca847aec8c0c019bb04db30881fc2966", + "review_status": "Pending maintainer review", + "scope": "Finite conditional witness. Full theorem, all-size compiler, recursive supplier, compressed Clifford windows, dirty banking/cover, restored-row, routing, fixed tape, precision/recovery and analytic interfaces remain assumed.", + "source_pins_sha256": "18ace817f2f9af22511bb303e99656ed114e534b87f3dd95a65ca4ca670baf2f", + "status": "PASS_FRESH_E8_SHARED_RESPONSE_AND_CLEAN_REUSE_COMPOSITION", + "upstream_main": "12a4934d15006e8c10f9b2264f13f8f341be802b", + "verification": "make e8-clean-reuse-verify" +} diff --git a/certificates/candidates/e8-coupled-bit-retiming.json b/certificates/candidates/e8-coupled-bit-retiming.json new file mode 100644 index 0000000000..c6138ba5a5 --- /dev/null +++ b/certificates/candidates/e8-coupled-bit-retiming.json @@ -0,0 +1,40 @@ +{ + "absolute_gain": "958198606116833/1000000000000000000000000000", + "assistance": "Substantial OpenAI Codex assistance", + "baseline_bit_coarse": "8128527708459/8000000000000000", + "baseline_composed_kappa": "998634658090834606116833/1000000000000000000000000000", + "bit_coarse": "63613071872999/62500000000000000", + "bit_component_gain": "1743186410609/1000000000000000000", + "changed_gates": 98, + "complex_coarse": "999632926176283/1000000000000000000", + "complex_unit": "PR384 far retiming, full derived physical replay", + "conditional": true, + "contributor": "ai-nanachi", + "date": "2026-10-11", + "finite_coefficient": 56346946940397, + "format": "conditional-candidate-record/1", + "global_columns": 1542, + "kappa": "998634658090834606116833/1000000000000000000000000000", + "kappa_decimal": "0.000998634658090834606116833", + "local_columns": 1062, + "local_histogram": { + "1": 2227, + "2": 874, + "3": 477, + "4": 291, + "5": 302, + "6": 1, + "7": 14, + "8": 18 + }, + "manifest_sha256": "389ac12de894730bd534f9a00d604866dd400175e32bd1204920dd98eafb8888", + "package": "research/e8-coupled-bit-retiming", + "prior_pr387": "249658664283159/250000000000000000", + "retiming_kappa_gain": "0", + "review_status": "Pending maintainer review", + "scope": "Finite conditional witness; upstream all-size compiler, recursive suppliers, compressed Clifford windows, banking, routing, restored-row, Gaussian recovery and analytic interfaces remain assumed. Not a formal proof of the complete theorem.", + "source_pins_sha256": "528a2912ce81f7e9ce0a1c575322b82cf209606cfaf7d3e8c899209e766cf128", + "status": "PASS_SOURCE_BOUND_E8_BIT_RETIMING_AND_ASSEMBLY", + "upstream_main": "12a4934d15006e8c10f9b2264f13f8f341be802b", + "verification": "make e8-coupled-verify" +} diff --git a/certificates/joint-dual-kappa.json b/certificates/joint-dual-kappa.json index b7f7b89bc2..27559e1d25 100644 --- a/certificates/joint-dual-kappa.json +++ b/certificates/joint-dual-kappa.json @@ -842,7 +842,7 @@ "scripts/experiments/pin_joint_dual_sources.py": "4d31cc0e38b7902709ca5f8f714cba109760d2592346dd7f8dc0b900a2d9fe00", "scripts/experiments/verify_joint_dual.py": "7a31bba1e9c0ded32ae285df2ca9bc91ef20c330f6789fdba361876f3c7a1985" }, - "source_manifest_sha256": "4f3c15b82a2d97335d4fe95fb8bcb96bd2a921087da289d9da16c68213a17f17", + "source_manifest_sha256": "463b65b1748af756dbd695d3cddd24636b1a30fca94b3af5ce2b9546a4bbc867", "sources": [ { "files": { diff --git a/certificates/joint-dual-validation.json b/certificates/joint-dual-validation.json index 194861d3c3..08a96f50cc 100644 --- a/certificates/joint-dual-validation.json +++ b/certificates/joint-dual-validation.json @@ -226,7 +226,7 @@ } }, "bit_saving": "2382370177/50000000000000", - "certificate_sha256": "9801147b1502cf1e43d5fa39aa37f5291f03b48c30c4dd4f272e0877894a1c24", + "certificate_sha256": "ef9354b813422e2de5d9dc4f4a05426f6438e09b1179e0fe2dff4c6390044742", "kappa": "4764513337/100000000000000", "margins": 7, "producer_words_regenerated_and_matched": true, diff --git a/docs/research/contribution-review.md b/docs/research/contribution-review.md index 6f96062a95..e96596a23f 100644 --- a/docs/research/contribution-review.md +++ b/docs/research/contribution-review.md @@ -1,5 +1,30 @@ # Contribution review: release update and historical triage +The [clean-reuse extension](../../research/e8-clean-reuse-extension/README.md) +and its [exact pending record](../../certificates/candidates/e8-clean-reuse-extension.json) +give conditional κ `40750673324589432209923/40000000000000000000000000`. +It retains PR389's complete frozen source package, adds two complex two-donor +substitutions and 55 bit clean-reset reuses, and composes the pinned PR376 and +PR390/395 refinements with PR401/404's shared response-space construction, +PR409/410's ordered promotions/enlargements and PR412's checker-clean +re-pivoting. Both unchanged original gx and gxcore checkers pass. +Both full predecessor supplier suites and the changed +physical/phase/bank/finite/outer checks are rerun. The complex supplier binds; +the bit contribution is measured against the exact unchanged-bit control. +The [structural appendix](../../research/e8-structural-frontiers/README.md) +adds three scoped, independently reproduced obstruction proofs. +Maintainer acceptance and +the inherited all-size theorem interfaces remain pending. + +The October 11 [coupled E8 candidate](../../research/e8-coupled-bit-retiming/README.md) +and [exact pending record](../../certificates/candidates/e8-coupled-bit-retiming.json) +preserve the complete #375/#377 supplier replays, the new physical word, +finite invoices and assembly controls. Its conditional κ is +`998634658090834606116833/1000000000000000000000000000`. This is a submitted +candidate with maintainer review pending, separate from the reviewed selected +result. The notice credits all pinned predecessors and distinguishes assembly +gain from the new bit component's gain. + For the current checkpoint, see the [round-eight review](community-round8-review.md), [selected record](../../certificates/selected-result.json) and [contributor ledger](../../CONTRIBUTORS.md). The entries below are historical; diff --git a/research/e8-clean-reuse-extension/LICENSE b/research/e8-clean-reuse-extension/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-clean-reuse-extension/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/e8-clean-reuse-extension/MANIFEST.json b/research/e8-clean-reuse-extension/MANIFEST.json new file mode 100644 index 0000000000..88a86b2880 --- /dev/null +++ b/research/e8-clean-reuse-extension/MANIFEST.json @@ -0,0 +1,191 @@ +{ + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "NOTICE.md": "6a5593d0f284a2f0865037f5c5fa9e5f76f9e12cf50ec5284486d3b8137c89da", + "PROOF.md": "5787738ceb6faf14d3d96e8452592860a6c6a469733a9bcf196e8d1562ba1ffb", + "README.md": "a6d86cb74665efb454730f5de7c6480602cf965e429230dd36ef73dec00cda2d", + "RESEARCH.md": "8ee1e577762130194a4e826aa6708d2d0b3ff92cd030c363a185c83306b8d385", + "SOURCE-PINS.json": "18ace817f2f9af22511bb303e99656ed114e534b87f3dd95a65ca4ca670baf2f", + "assembly.py": "893275fb78da527a312c483f9ad90c10a63507340466eacdacf5838053ccdece", + "bit_native.py": "952de0bf31c71c61c6f92df0a0fc8d5fd710c5b6a61af6d4d13ef4cbdeffcb32", + "bit_reuse.py": "b5994c8914bade3e89de1d72af23b13335abe6953c09dfdb25aa221912a481d3", + "complex_native.py": "2512fcbb8d0d58bffc6151f7d33dde2899d0be57e2d27a58eecbb6cd8d377dc7", + "construct.py": "3e8d4b1ca04c2595f07123b2a6e4cf9925bb39b27d8254b56323b8019988e607", + "data/BASELINE-EXPECTED.json": "ad30f5526f87a9d8216429bd3a86e2400f965c2a71851e8f9d997fffadae58f1", + "data/EXPECTED.json": "048c0fdfb0b6949266072b93464650d4b75da2c9ba74615bb4f4e9d8a2630e1a", + "data/bank-patterns.json": "7aefb8d012d04b93f4b0c013b150a65f0f0c899e5ada1abcef947185fce5d476", + "data/bit-candidate.json.gz": "bd3b84244528767b85d8d7fe423b155630b5c659e21e51563674b1dcb6305ad7", + "data/complex-candidate.json.gz": "0e3a9ceb4ab14a126a8e9e0d056322f9d2234ccda4f7472a8ad2849bd7a54131", + "data/extra-bit-rounds.json": "12e7d775ab8085f98f7ff5fee39d77727c81eabf44f7875c1e6260b392862e5c", + "data/gauge-signed-base.json.gz": "f2db51db18f1314b6ff357f668d66b8b967aa9065fff7feff15d9a138891f28c", + "data/gauged-candidate.json.gz": "3306b04345879ff079f74bc69e4e8ade052c38c3f3af26af166592994c9fd214", + "data/kernel-base.json.gz": "785a6160912b8bf8535ccd438c7d13c0730f874d6a5d07ef530e50279e7cf7d8", + "data/retime-selection.json": "05259453ababe566eb5fb7113d5394b84d6bf3e5fe29e90b3e45450acfd29d48", + "data/reuse-selection.json": "0923d61a3bc35bbf58e6fdd7899015ea9703030489298739af839a7b07e994c1", + "data/signed-selection.json": "a4cc9ecf8e59eb15b42e74f51cc5b7ffef5749104181caede34aca103d9f6ed0", + "exact.py": "d83bc8ea536afd57594e8bc2680d6f64b52183e0ea70fc477026318b778632bf", + "gauge_native.py": "04b85e68520dc65f6279877cf117f06d704c09d89fc7bf56d207f218603d255e", + "gauges.py": "a32310ddb3db3d8da01b68c4331bccfef58efdca793b38d16a722f05fdda77e8", + "inline.py": "41ce50628d3cd1c4cdc3629d47b24b816c42e9a72fbe8bff2b27a7882233a8f4", + "record.py": "f454285c83038579290c2d10bb2301fa2226c46f128f9367f3addc4c73fa77e5", + "requirements.txt": "20e60438dd4cb1d6c2cdcd039be6889ffab200b8fd316208326983abc7a74302", + "vendor/source376/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source376/NOTICE.md": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "vendor/source376/candidate_frames.py": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "vendor/source376/candidate_from378.py": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "vendor/source376/transport.py": "264f6fc385532a25ae7f99774c2cb33e6ff6943fdbca546cfa000fb9e551fafb", + "vendor/source376/two_alias.py": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "vendor/source395/construct.py": "2b49d8b1f24f6e642d3cc81142a3ad8dfacead60280dc0df0a1326daa97acc0b", + "vendor/source401/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source401/MANIFEST.json": "5ff08a6c7b051d227fcd516542b56718ae65bca93615acfe09cb8785d8e3f43c", + "vendor/source401/NOTICE.md": "8e2a5c0d6a1a582f52bdfc421d7412eb3e84aef5460835c647ce55f5b8d2896d", + "vendor/source401/PROOF.md": "94a8244d3211ef091d570735cee4521995691ecba7fd18ed05647745d58d24da", + "vendor/source401/README.md": "912d7aec76f958142cacd2f647e9224e22f2909feb0430295ad5584f86451c67", + "vendor/source401/RESULT.json": "466cb1aeb6ffde5fcebb019e5dd8e5549c1b24e25e74e5d32b82c56691b56c6e", + "vendor/source401/VALIDATION.json": "316f09393038630b772e82669fb00963a14c8218a831d9b35c0f256543a4eb7e", + "vendor/source401/VALIDATION.md": "e3bdad62dc0f4ef7c90b9fd650d3647d5b3eeef69473aa4caf4dc3cfba72dfa4", + "vendor/source401/architecture/SUFFICIENT.md": "1c9b41de1015196b608dbbe17fdcab692ac78249b585f4579dfe13676b8faa5f", + "vendor/source401/architecture/audit.py": "c69bd2ac387a944ffa33bb9660f7ee407ca75648ec937217851780333df28f22", + "vendor/source401/architecture/banks.py": "7a8d81894dd7c35f05122bca19c5fc30f04ddf0dc4f2c8d73e334cdd3b64e396", + "vendor/source401/architecture/bridge.py": "92456fe1df26f51233fa5f8b96c1f8dd6118df3f3b385654c26de8c205db6bb0", + "vendor/source401/architecture/deps/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/source401/architecture/inputs/BANK-PATTERNS.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "vendor/source401/architecture/inputs/DATA-PHASES.json": "47225c2ce696432aa9df6f422ae784aaa91bef651757f4266d0ea4edbff74694", + "vendor/source401/architecture/inputs/GLOBAL-TEMPLATE.json.gz": "19185edd2837894f97dd962e8cebdcb12e46ec85b8f0146405840ee8eddd79f5", + "vendor/source401/architecture/phase-replay.cpp": "b3f44ae97d191df8f11024cef3bd0fd1a92f543f45183557db546c43cc6d4674", + "vendor/source401/architecture/phase.py": "be98c242c194674b35ece6b2254605ba0a04d51a0d13933ff86c84240b3f957a", + "vendor/source401/code/bit-compose-replay.py": "553f29567694069526dd317f2c42ef4a235efbcec2d639c1692dcae50647ce04", + "vendor/source401/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/source401/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/source401/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/source401/code/outer.py": "1db8744f85e87cfaa5e2b3696d7f89a2972c668365318a7cb1b6695c537467ee", + "vendor/source401/frames/PROOF.md": "01e721550cbee2d58681bcd2b561b1f8d5e2e422dc7a630cb99d62505166beb8", + "vendor/source401/frames/README.md": "6592f3191538dff5233c7b4613848f750e3e645ab0956a20ca93b9f6d0775a4f", + "vendor/source401/frames/reconstruct.py": "726b3404aacf86b2515027622102d1a3075e82e1fbeb477f9d6aa438bb9baee3", + "vendor/source401/frames/selection.json": "17b7959402af929e2b24d2d1b285f84d6cf51a90cd077eb0fca9b4f5f7bf1d76", + "vendor/source401/inherited/BASE-MANIFEST.json": "01663bf06edadded13027713c49b5764fb0db8161bdf0b38320328e0fc428359", + "vendor/source401/inherited/BASE-REPLAY.json": "7c323c0abfad726178ac36c69604b6825049c194715d1ea621f1b86a99a72e1d", + "vendor/source401/inherited/BASE-VALIDATION.json": "dea88d4f6e201abec078505ded8d08a85fd6492d8c60874feb9113589f887157", + "vendor/source401/inherited/BIT-COMPOSITION-RECEIPT.json": "453cb782369596c1086d98eab7931ff4a48046e71005a749d48e693431a50bbe", + "vendor/source401/inherited/BIT-REUSE.json": "17dfc693af28f4ba639eb1145610f6f88b799efae49cc3a6a0fba886a3e0e35c", + "vendor/source401/inherited/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source401/inherited/NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "vendor/source401/inherited/complex-reserve-notice.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "vendor/source401/inherited/e8-notice.txt": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "vendor/source401/inherited/helper-notice.md": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "vendor/source401/inherited/outer-notice.md": "eb15ca83343fadc44f184513680aaaca34d447e04f5929c30054afb205732ddc", + "vendor/source401/inherited/pr352-notice.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "vendor/source401/inherited/sussman-notice.txt": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "vendor/source401/inputs/bank-patterns.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "vendor/source401/inputs/candidate781.json": "a4e42aa1663f5ad0da48cee6fe8514b205e43cf6e791b80674dbc7506a098a32", + "vendor/source401/inputs/helper781.json": "3df4c637c69840d53a0137eadbe16e25add617984bbe4da099d059f026192f1e", + "vendor/source401/local/ANCESTRY-NOTICE.md": "66997993ef97c9c185b2b96b9bc0f67ee297f01cc79da6f4b7e7077b3a601e6a", + "vendor/source401/local/MANIFEST.json": "3244b88da8f5b1582a777319d9a92b7bf317c41ae76215f9a191fb39b2a9e218", + "vendor/source401/local/README.md": "fb34710058552124798406167c0e3f2525cb665f9aa8d297329b3a4d1e295051", + "vendor/source401/local/UPSTREAM-NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "vendor/source401/local/deps/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "vendor/source401/local/deps/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "vendor/source401/local/deps/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "vendor/source401/local/deps/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "vendor/source401/local/deps/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "vendor/source401/local/deps/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "vendor/source401/local/local_admit.py": "bb6e0f228e841bb0dfa61accae6478e3ddf153e414bc353f2f48ca4e9c7cc9b3", + "vendor/source401/local/prior-phase/CLIFFORD-RECIPES.json": "356211a16d179c8b4d37d0bc5d038b55b4d0397242b119f7b83a583b7f766e1a", + "vendor/source401/local/prior-phase/CLIFFORD-REVIEW.json": "0adf36a157af511c6b96a1a5c3c319061a7c9585b865f1289668c0f915fff641", + "vendor/source401/local/prior-phase/SOURCE-REUSE.json": "e5e7b8c8dc2f6df47ab2b21e58299d4316d104bbf426146d948f16ba92ecd88c", + "vendor/source401/requirements.txt": "f201db884fc05bd8fb9478402ec8394b7c71a6ae189e4e953c6f00a2b793ffa7", + "vendor/source401/research-notes/AUXILIARY-PREWHITENING.md": "58024afc83867a99441c513c6852df7305c2423ae5601c73c2e22854e261ce43", + "vendor/source401/research-notes/SEARCH.md": "ef66c6962ec287562d06cecb94d918d82279ec56a7112ecd578406f865084c27", + "vendor/source401/research-notes/bank-patterns.cpp": "b7c16637602a6682b79f75dc7b0f069284b0cc21ba43b6b3c36f7fa9606f28ce", + "vendor/source401/research-notes/bank-review.md": "23914f4771dc882f71683809b4d84dda7ae8b60bbb9c64ac8ec17816d71a3a24", + "vendor/source401/research-notes/frames-NOTES.md": "e4bec2dab0e059df74d35870c1ca3435d4cd5fd021961b56253aea7f429d796b", + "vendor/source401/research-notes/frames-gl3.cpp": "5ed6b2c0a654393c54552d26bd4c1c9cc07addb0d6c8ddd8e969e1ab9681dee5", + "vendor/source401/research-notes/frames-response-search.cpp": "fa56a09e7b98465e0173a2bdd8e331dd8831dead7f5397e2509586c386bcc321", + "vendor/source401/research-notes/outer-and-dual-proof.md": "0312475a1c2426df57b4e4b655b0f29f13cb21ba8e7aab3d7a800ace37303a3a", + "vendor/source401/research-notes/readout-SUMMARY.md": "974f59c965f1ae0fd89e2f87d1d6108f41a731535caa93638fe513daefa02165", + "vendor/source401/vendor/bit/code/bit/checkers/certify_bit_g.py": "c9a31508126f34e7ac95d802c39e8919a872cd705314de5bf3538de1636ce8ce", + "vendor/source401/vendor/bit/code/bit/checkers/certify_bit_k.py": "e68a81ef7981a90d613752003cd5cab5351e260f909b094f1668d8a4dfe480df", + "vendor/source401/vendor/bit/code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "vendor/source401/vendor/bit/code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "vendor/source401/vendor/bit/code/bit/checkers/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/source401/vendor/bit/code/bit/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "vendor/source401/vendor/bit/code/bit/checkers/finite_g.py": "a591d8caa9ab50a4c7ec6934c71c93fc18fd14680180b43071e8d9d704f7ac9a", + "vendor/source401/vendor/bit/code/bit/checkers/finite_k.py": "7e67dc75e63a11e38ac6d6615656c7cf6982e5a33dd404d04b967bf474cad02e", + "vendor/source401/vendor/bit/code/bit/checkers/geometry_g.py": "b9fa3cd05f36f5fcebfdebfb4a86fb90e92ed3c1d9157c52918ee8c5b563b54f", + "vendor/source401/vendor/bit/code/bit/checkers/geometry_k.py": "646b7e8773d9c99376cb00627f109a97319e6d72b439ff513c39035c28c3f70f", + "vendor/source401/vendor/bit/code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "vendor/source401/vendor/bit/code/bit/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/source401/vendor/bit/code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "vendor/source401/vendor/bit/code/bit/checkers/tile_g.py": "8140eec180e42202f2c6a9f11f5c92885e60861c38a7611dd805c524e3438138", + "vendor/source401/vendor/bit/code/bit/checkers/tile_k.py": "64255088821f601ede2c3006f08cb97c39a4fa10dbbeb93a8a71fcfa0e1d8d77", + "vendor/source401/vendor/bit/code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "vendor/source401/vendor/bit/code/bit/independent/centres_sat.py": "f69379968367544807db2f0cf14359977e56299383b3edcc4469ddea7c7ecb40", + "vendor/source401/vendor/bit/code/bit/independent/checkword.py": "11bf9620ca9db16d52d9fe806b814fc9ec9a89c4d7645354d1861d96f6e805ad", + "vendor/source401/vendor/bit/code/bit/independent/mutate.py": "0ff65aace5da4b57d96235bf830f8f11969322e75134d498aeb70e9753ec6b0d", + "vendor/source401/vendor/bit/code/bit/mutate_records.py": "b0e75d6550412a7be4017695e6b237392b611bb852ad8ff309d6682c9f166a4e", + "vendor/source401/vendor/bit/code/bit/producer/compile.py": "60fea6a9d6617a3f87376d3fda040642e9cb70e7c179015e03ede8d289f30357", + "vendor/source401/vendor/bit/code/bit/producer/compile2.py": "0e23d4282ceb75768e82631da016aaff9818aec53c7d75a6b2a28ee1b1160dc3", + "vendor/source401/vendor/bit/code/bit/producer/e8lib.py": "4f8a6843e83bc4f7055d7337f33dbe12ce499051f46bee1b81bbf6b34c652574", + "vendor/source401/vendor/bit/code/bit/producer/frames.py": "ba71f77dd3e3c1c54f361c066cebe9faadbc78db46376046e7af625bf1de8c24", + "vendor/source401/vendor/bit/code/bit/producer/fullword.py": "0daf87599e9e48646b985ad87351c56c1b73cfc99cdf9eca081483846ddbfa90", + "vendor/source401/vendor/bit/code/bit/producer/ham1.py": "359040fb432fd392472af6b8f5dca0234dd6c2be744a791df27ba62bc5da5175", + "vendor/source401/vendor/bit/code/bit/producer/ham2.py": "fdf0af785ce697bd7f80b4e75f7163735f3b599d9dc42f652f0ffdbdf18ea8bf", + "vendor/source401/vendor/bit/code/bit/producer/params-r865.json": "1256c54debe0a551da8e24896ab73ef0bd4a5233ff8e6fedf21a9e6301d6e6f3", + "vendor/source401/vendor/bit/code/bit/producer/price.py": "46c858e60ba0a117bf8227b864abf55e85ebee2d56a0dce64472b706499ac405", + "vendor/source401/vendor/bit/code/bit/producer/search2.py": "4999c5d6bac9757e4236c45435201631eae21f644dc9543d8c0b6e3cc8360daf", + "vendor/source401/vendor/bit/code/bit/receipts_e8.py": "935ea65d9c6739e868ccf1aa439bd3c246657dfc887e4a0222a8f0901a5b41a5", + "vendor/source401/vendor/bit/code/bit/receipts_k.py": "67f714e10a846e9cc62996342f825cd715055031e0b12591abdafd225717e195", + "vendor/source401/vendor/bit/code/bit/regression/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "vendor/source401/vendor/bit/code/bit/regression/columns_h_pr346.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "vendor/source401/vendor/bit/code/bit/regression/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/source401/vendor/bit/code/bit/regression/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/source401/vendor/bit/code/bit/regression/legality_h_pr346.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "vendor/source401/vendor/bit/code/bit/regression/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "vendor/source401/vendor/bit/code/bit/regression/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/source401/vendor/bit/code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "vendor/source401/vendor/bit/code/bit/regression/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "vendor/source401/vendor/bit/code/complex/code/bridged.py": "5fe7174cd3a6580a74e4c1bf8fa7b426e8673f1c285603bf3076d4e758d70731", + "vendor/source401/vendor/bit/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/source401/vendor/bit/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/source401/vendor/bit/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/source401/vendor/bit/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/source401/vendor/bit/data/bit/bitE8-r865.json.gz": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "vendor/source401/vendor/cx/work/odd-stages/RECIPE-9.json": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "vendor/source401/vendor/cx/work/odd-stages/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "vendor/source401/vendor/cx/work/odd-stages/data_phases.py": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "vendor/source401/vendor/cx/work/odd-stages/global_nine.py": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "vendor/source401/vendor/cx/work/pr361/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/source401/vendor/cx/work/pr361/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/source401/vendor/cx/work/pr361/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/source401/vendor/helper/candidate_frames.py": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "vendor/source401/vendor/helper/candidate_from378.py": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "vendor/source401/vendor/helper/two_alias.py": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "vendor/source401/vendor/reuse/frame-selection.json": "a83d4880579fb1f8cffb701d1d685c157b7fa14ef9d6642e42ff1e4f5a1b8c5c", + "vendor/source401/vendor/reuse/frame_replay.py": "6dc74f24323c717d9eff7c12f27c67a0531899e61a8ee340c98162b1e34f9531", + "vendor/source401/vendor/reuse/reuse-selection.json": "0b300bab47cf0d69cbc7965bf01c2a27c96b97677ee651334470d8c968b603f1", + "vendor/source401/vendor/reuse/reuse_replay.py": "e83251e3d49267fb5b53eda53c1be80118b7df0cc671c38cad1f300883cd1316", + "vendor/source401/verify.py": "9a573069ef44ffa092ab638bbfa817cc2922c5a2827c7de0e71138b6cf9c13ff", + "vendor/source404/NOTICE.md": "175492d6648fbd5de1a45aa3b6ac99268551299786781a4b14d1bab3c5a1a19b", + "vendor/source404/PROOF.md": "5ab68880c7a72d909ced76074650908d3a9bd1e19bd9df0f8b7b9e924e1cc899", + "vendor/source404/README.md": "2beb4568b319804ac7790ef5803cb442c529a8a02692e8b8c5eca60c95a2b5e0", + "vendor/source404/selection194.json": "7b8d5701b6ac524070fab509bf21fadef557d1eb396d28eb0136ca4ab18728e5", + "vendor/source412/IMPORTED-SUBSET.md": "f72ad725daae07e84f57700460376882834c7b828d267bb77a7a1496150dd745", + "vendor/source412/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source412/LICENSE-pr409": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source412/LICENSE-pr410": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "vendor/source412/NOTICE-repivot.md": "8c7f4785def2bc39334aac618184bb4e3c6b11ee6f1c8b51edc89d7b8fddc2c0", + "vendor/source412/NOTICE.md": "ab9c3c082f2e00c5636603978d044127bd7b7fda6cdf955456154a36e222bc7a", + "vendor/source412/pr409/SELECTION.json": "55ed27fc7d202aac06b5c62e5822764b24283f2637b70c2ffa9b3ee3dc7f2a48", + "vendor/source412/pr410/enlarged205.json": "46b28ee2fd1768317fae7983043964b28f0f9c6e32a50f6a8b8b9b90e38920cc", + "vendor/source412/repivot-e8.json": "58fd4e9f2712ba5b33f78d792d99de612e2dfd888cdb83d0718028e6d6633c85", + "vendor/source412/repivot-e8seq.json": "e1e0dfe35c4ccbd572e6ecdd5be855e2a2e73a34a05c4437e94b97ab22d8f7d2", + "vendor/source412/repivot.py": "7dfe60b7ace9f8ba4674e0ead24e6933f48b0e0497038d1cf64ef2d4bffd142c", + "vendor/source412/seqenlarge.py": "8cdaabaa1923677e9bbbccc1291e414b13fc8ae19ea33202c4ae50fd8b03b6e0", + "verify.py": "f228d56dc72d1917cd96a9f2953f555f0e8c75527e6212263b80d66a8017e5c5" +} diff --git a/research/e8-clean-reuse-extension/NOTICE.md b/research/e8-clean-reuse-extension/NOTICE.md new file mode 100644 index 0000000000..2a7a8c0c6b --- /dev/null +++ b/research/e8-clean-reuse-extension/NOTICE.md @@ -0,0 +1,53 @@ +# Sources and attribution + +This extension preserves the full frozen PR389 package at b3c45822ca847aec8c0c019bb04db30881fc2966. +All notices and licenses in that package continue to apply, including Jacob +Sussman's original gx/E8 construction and Dylan Crow's bit word. + +applecrusher PR376 supplies the two exact equal-helper aliases, frame repairs, +two subsequent rank-six to rank-five moves, and deterministic transport. +Dugongue PR390 supplies target-prefix difference restoration and its sufficient +main-only Y-to-Y compiler extension. Rohan Arun PR395 supplies the signed +extension; its original source file and exact function bytes are retained. +The fixed signed selection here is reconstructed on the R779 word, rather than +claiming another contributor's selected witness as new discovery. + +ai-nanachi, with substantial OpenAI Codex assistance, supplies two further +two-donor clean substitutions, 55 clean-reset bit helper reuses, 54 subsequent +bit frame moves, changed complete supplier replays and exact composition. +The first contribution's frame search and exact record are preserved separately. +The headline gain comes from the changed complex supplier. The bit gain is +reported separately because it does not change the binding complex ceiling. +No worldwide priority or global optimality is claimed. + +Source byte identities and original commit paths are in SOURCE-PINS.json. +New contributions are Apache-2.0; original source-specific notices and licenses +are retained in the frozen parent and vendor directories. + +Dugongue [PR401](https://github.com/CrocSwap/integer-mult-bounds/pull/401) +at 7844f72c6051a4408284c3092490687061675c1a supplies arbitrary entrance +subspaces, exact even/degenerate two-sided normalization, mixed banks and +independent readback. Dugongue +[PR404](https://github.com/CrocSwap/integer-mult-bounds/pull/404) +at 12f488264cdd74a3b60d0fb534f4955792384f5c supplies the expanded shared-donor +selection and sufficient nested-donor construction. Our private nested-flag +experiments ran independently around this public update; no priority over +PR404 is claimed. applecrusher's PR376 at +7aa9d9f0247bb60c0519704bbca18990011e2a37 supplies the additional rank-eight +to rank-seven frame change, frozen through PR404's composition source. +Our contribution is the explicitly mapped R779 composition, all-pair fresh +phase replay, full changed supplier/bit checks, and independent clean-reset +bit mechanism. PR404's incompatible overlapping target recovery is excluded. +No source-specific numerical gains are added to the headline. + +Chafik Boukhalfa, with Anthropic Claude assistance, supplies the checker-clean +re-pivoting from [PR412](https://github.com/CrocSwap/integer-mult-bounds/pull/412) +at 616d9d678c00d79693b869934464003ba5b8d1b1. The four ordered groups originate +in Rohan Arun's [PR409](https://github.com/CrocSwap/integer-mult-bounds/pull/409); +the eight enlargements originate in eumemic's +[PR410](https://github.com/CrocSwap/integer-mult-bounds/pull/410). +Exact selected source bytes, commit paths and licenses are retained through +the frozen PR412 composition in vendor/source412. This submission maps these +relations onto R779, checks both unchanged original checker families, +recomputes every chronological omission, and freshly admits every phase pair. +No independently reported numerical savings are added together. diff --git a/research/e8-clean-reuse-extension/PROOF.md b/research/e8-clean-reuse-extension/PROOF.md new file mode 100644 index 0000000000..e589cfbf50 --- /dev/null +++ b/research/e8-clean-reuse-extension/PROOF.md @@ -0,0 +1,108 @@ +# Construction, dependencies and sufficient argument + +The fixed complex witness starts from Chafik Boukhalfa's far-retimed E8 word +and applecrusher's two equal-helper substitutions and two frame refinements. +It additionally replaces helper 556 by -2 times helpers 354 and 461, then +helper 576 by -2 times helpers 402 and 478 after compaction. Exact clean +linear forms agree at every substituted read. The backward upper-frame and +forward nested repairs retain copied-total pins and final address caps. +R is 779. The actual new dirty response and cleanup are regenerated: equality +on clean values alone is not the arbitrary-dirt proof. + +The signed prefix restoration is the PR390/395 bracket. For 25 disjoint +targets, subtract lambda times the donor before the prefix, emit the exact +source/write-version/frame difference, and restore lambda times that donor +at the common recovery frame. Lambda is +1 or -1. The full rational main +operator and all retained totals agree with the explicit same-width R779 +baseline on all 1,019 independent columns. Source/helper subwords agree +exactly, so the new baseline's explicit dirty response and cleanup remain +valid. The changed compiler permits a main Y read only when its target is Y; +helper-to-X remains forbidden. Both signed orientations and private lifetimes +are freshly admitted, with all actual Clifford phases and physical incidences. + +The shared entrance construction follows PR401/404. Each pivot p satisfies +K_p + sum_d a_pd K_d = 0 in the explicit baseline response. Four re-pivots +from PR412 replace the basis of these same relations, including the +half-valued donor that otherwise fails the original sixths-denominator +condition. PR410 enlarges eight entrance subspaces. Removed original helpers +556 and 577 are mapped explicitly onto our R779 word. The shared layer has +192 pivots, rank mass 350, and 496 literal unit shears. Its pivots and donors +are disjoint, so this layer alone has (S-I)^2=0. + +PR409's four ordered groups, with PR412's two additional re-pivots, prepend +55 more shears and admit ten further pivots. The combined word has 202 +gauges of rank mass 360 and 551 entrance shears. The complete chronological +prefix need not have (S-I)^2=0. We check its actual product M S, all retained +totals, and that every gauged target-response column is zero. Every entrance +source is read before any earlier entrance operation writes it. + +Every one of the 551 omission controls is recomputed from the suffix +response. If shear t += q s is removed, its suffix response is multiplied +by -q times the original independent s column: earlier operations leave s +unchanged by the read-before-write condition. A nonzero response is required +for each omission; the entire changed scalar schedule is also replayed for +sampled omissions. No global donor/pivot disjointness is assumed here. Both +unchanged original gx.check1 and gxcore.mirror checkers pass, including the +native denominator conditions. Every actual nested transition is charged. + +PR376's additional target201/helper491 frame change from rank eight to seven +is checked for full operator equality and nested paid paths before gauging. +PR404's target125/124 overlapping-prefix recovery requires a different +chronological input and is not imported. Its numerical gain is not included. + +Each entrance chart is normalized explicitly. Even and degenerate E_p use +the full two-sided exact Clifford factorization of F T_E inverse. The right +inverse adapter precedes the entire old-response invocation; the left inverse +adapter follows all main and helper cleanup. Both orientations retain every +unitary address operator in the inverse-adjoint chronology. Rank-zero adapters +are costed. All old/new/reflected Gaussian child pairs are recomputed, +including Pauli signs and global phase. Newly assigned mixed-bank coordinate +permutations and inverse owners are emitted and independently decoded. +Padding is an exact fixed integer witness, not a claim of solver optimality. + +The new bit operation differs from the preceding all-dirt reset: a retired +helper only needs its clean X-content zeroed before a new logical helper is +placed in the same slot. An arbitrary residual helper value is allowed. The +new helper basis determines a newly computed initial D compensation. C is +the reversed helper subword, restoring every physical helper, including its +original independent dirt. Each reset is checked exactly before reuse; the +retired slot has no later original use, the new helper has no earlier use, +and copied totals are protected. The combined word is checked over every +independent binary column. It uses 55 fewer helpers (822 to 767). The initial 27 reuses and 26 frame +moves are followed by two fixed rounds of 14 reuses and 14 frame moves. +The later resets use exact two- or three-parent clean forms; every parent +and all rebuilt dirty compensation are charged and independently checked. Integer signed-prefix bounds, lifting, +copied-center controls, routes and whole-bank packing are recomputed rather +than inferred from the clean calculation. + +The complex assembly has dimension 73, 14,286 live and +15,075 physical families, 734 banks per stage, deficit 2,496, +maximum child rank 48 and halving degree two. The bit assembly has dimension +56, 10,409 live families, deficit 1,512 and halving degree two. Actual row +coefficients fit the common 20,161 reserve. Both finite invoices and both +exact rational moment engines retain the positive 10^-16 fallback. Adjacent +10^-24 complex coarse grid points are rejected; the unchanged bit coarse +grid remains 10^-18. The exact outer assembly uses positive eta=10^-24, +beta=10^-18, eight finite bootstrap continuations and a 10^-27 grid; it +checks 47 strict constraints and invalid eta/beta/adjacent-point controls. + +The complex coefficient is 254951444354246755323/250000000000000000000000. The bit coefficient is +104575879789097/100000000000000000. The resulting conditional kappa is 40750673324589432209923/40000000000000000000000000. +Using the preceding unchanged bit supplier with this same complex coefficient +gives 203354853562950029967497/200000000000000000000000000, where the bit side +binds. The new clean-reuse bit supplier removes that bottleneck. Its exact +additional kappa contribution is recorded as the difference from this fair +control; the combined witness is limited by the new complex coefficient. + +All original files are manifest-bound and immutable. A copied supplier tree +is changed only through asserted literal edits. DERIVATION.json records every +old/new digest, changed pin and textual difference. Both full predecessor +supplier suites run before the changed admission. Expected records are checked +after recomputation, rather than used to obtain a PASS. + +This is a sufficient finite conditional construction. The inherited all-size +recursive suppliers, canonical/rank-zero compiler, compressed Clifford windows, +dirty banking/cover, routing, restored-row, fixed tape, common-grid, Gaussian +precision/recovery and analytic interfaces remain assumptions. No new full +Lean theorem or unconditional integer-multiplication exponent is asserted. +The target kappa > 0.002 is not attained by this witness. diff --git a/research/e8-clean-reuse-extension/README.md b/research/e8-clean-reuse-extension/README.md new file mode 100644 index 0000000000..8e21e6ab94 --- /dev/null +++ b/research/e8-clean-reuse-extension/README.md @@ -0,0 +1,27 @@ +# Shared E8 response spaces and clean helper reuse + +Conditional candidate **kappa = 40750673324589432209923/40000000000000000000000000 = 0.001018766833114735805248075**. +The complex supplier binds; the new R767 bit supplier improves its coarse +saving independently. The target of 0.002 has not been achieved. + +From a checkout of this PR with Python, C++17 and Boost headers: + +```sh +python -m pip install -r research/e8-clean-reuse-extension/requirements.txt +python -B research/e8-clean-reuse-extension/verify.py /fresh/output +``` + +The complete frozen predecessor stays adjacent. New dependencies are bundled +and pinned, with their original bytes unchanged. No network or discovery +solver is required by reproduction. Every changed local Gaussian pair is +recomputed, including the old pairs; cached phase PASS files do not admit the +changed word. Full replay includes both predecessor suppliers, the signed +R779 intermediate, the combined response-space word, bit R767, mixed-bank +owner readback, finite invoices, mathematical omission/parameter controls, +two rational moment engines and 47 outer inequalities. + +See PROOF.md, NOTICE.md and RESEARCH.md for the construction and precise scope. +This finite conditional witness is not a formal proof of the full multiplication +theorem. Inherited all-size compiler, recursive, dirty-bank/cover, routing, +restored-row, precision, recovery and analytic interfaces remain assumptions. +Prepared with substantial OpenAI Codex assistance; Apache-2.0. diff --git a/research/e8-clean-reuse-extension/RESEARCH.md b/research/e8-clean-reuse-extension/RESEARCH.md new file mode 100644 index 0000000000..8a387d14fc --- /dev/null +++ b/research/e8-clean-reuse-extension/RESEARCH.md @@ -0,0 +1,62 @@ +# Extension research record + +The requested target is conditional kappa > 0.002. The original design deadline +was 21:00 JST and PR completion deadline 22:00 JST on 2026-10-11; the requester +subsequently extended research through 24:00 JST, with a validated interim PR +permitted earlier. Effort is split equally +between integrating existing results and independent structural experiments. +The validated value in EXPECTED.json is below that target. + +Integration work pins PR376's R781 supplier and frame repairs, PR390's +prefix identity and PR395's signed extension, then replays the changed full +physical supplier. In parallel, the new stream investigates helper elimination, +clean-reset reuse, shared prefix donors, altered frame directions, center +readouts and use of retired intermediate aggregates. A screen is not an +admitted supplier and is not counted as an achieved exponent. + +The successful new mechanisms are the two complex two-donor substitutions +and 55 bit clean-reset reuses. Their fixed witnesses and mathematical controls +are reproduced by construct.py; the full admission follows in verify.py. + +Bounded private screens at the frozen R779 baseline found: + +| Screen | Outcome and limit | +|---|---| +| Shared signed prefix donors, coefficients +/-1 and +/-2 | 532 legal trials, 49 positive edges; 32 deterministic selections returned 25 distinct donors, with no extra gain over the signed selection. | +| Complex adaptive clean readouts with one or two donors | 13,482 pair screens yielded no additional helper removable under the unchanged frame guards. | +| Early clean-zero restoration | Six rank-eight sinks from 62,490 pair screens; no arbitrary-dirt, bank or phase admission, so no gain included. | +| Recycle totals from retired phase-A aggregates | 39 available donors of rank 34 represented none of the eight missing center increments; no candidate admitted. | +| Generalized B_K pair count | Numerical profiles for K=2 through 30, with whole-bank padding charged, did not improve the selected complex K=4. Changed profiles have no physical admission. | + +These are bounded discovery observations, not global impossibility or priority +claims. The implementation submitted here contains the successful construction +and its complete verification. Further structural ideas remain research work. +Original author credit is preserved in NOTICE.md and SOURCE-PINS.json. + + +Further bounded structural screens found: 48 temporary input-carrier plans +failed the existing paid-frame guards; 67 wider two-donor substitutions +failed those guards; 63,222 cut/readout pair screens produced four legal +proposals and no gain. These scopes do not exclude changed frame chronologies. +Independent nested-flag forest experiments from the PR401-mapped word reached +178 gauges and rank mass 325; their numerical pricing was superseded by the +fully admitted mapped PR404 selection. Shared-donor novelty is credited to +the concurrent PR404 source. Fixed-center support tests and exact hypothetical +budgets motivate further structural work, without admitting extra gains. + +The selected response-space construction uses 202 gauges and rank mass 360. +All existing and new local phase pairs are freshly computed. The integer +packing has 734 banks per stage; discovery used a time-limited solver only +to nominate a feasible fixed witness. Reproduction checks exact inventories +and does not run that solver or assert global packing optimality. + +The historical joint-dual witness includes README/Makefile in its source +closure. Their metadata hashes and derived arithmetic/validation records are +regenerated after the new top-level entry and verification target; the old +mathematical producer and physical witness are unchanged. + +The final two reuse rounds found 14 exact two-parent resets and 14 exact +three-parent resets, each followed by 14 legal frame moves. A further round +under the same bounded search found no profitable proposal. These are fixed +discovery results, not a proof of global minimality. The R767 supplier is +admitted on all 1,007 local and 1,487 global independent columns. diff --git a/research/e8-clean-reuse-extension/SOURCE-PINS.json b/research/e8-clean-reuse-extension/SOURCE-PINS.json new file mode 100644 index 0000000000..24a25d4342 --- /dev/null +++ b/research/e8-clean-reuse-extension/SOURCE-PINS.json @@ -0,0 +1,1116 @@ +{ + "files": [ + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/two_alias.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "source_path": "research/e8-far-helper-composition/two_alias.py" + }, + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/candidate_from378.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "source_path": "research/e8-far-helper-composition/candidate_from378.py" + }, + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/candidate_frames.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "source_path": "research/e8-far-helper-composition/candidate_frames.py" + }, + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/transport.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "264f6fc385532a25ae7f99774c2cb33e6ff6943fdbca546cfa000fb9e551fafb", + "source_path": "research/e8-far-helper-composition/transport.py" + }, + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/LICENSE", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "research/e8-far-helper-composition/LICENSE" + }, + { + "commit": "b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9", + "path": "vendor/source376/NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "source_path": "research/e8-far-helper-composition/NOTICE.md" + }, + { + "commit": "dcebad83e4d7e6a5643ba8edfb432b0ba0dd1826", + "path": "vendor/source395/construct.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2b49d8b1f24f6e642d3cc81142a3ad8dfacead60280dc0df0a1326daa97acc0b", + "source_path": "research/e8-signed-prefix/construct.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/audit.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c69bd2ac387a944ffa33bb9660f7ee407ca75648ec937217851780333df28f22", + "source_path": "research/e8-response-subspaces/architecture/audit.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/banks.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7a8d81894dd7c35f05122bca19c5fc30f04ddf0dc4f2c8d73e334cdd3b64e396", + "source_path": "research/e8-response-subspaces/architecture/banks.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/bridge.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "92456fe1df26f51233fa5f8b96c1f8dd6118df3f3b385654c26de8c205db6bb0", + "source_path": "research/e8-response-subspaces/architecture/bridge.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/deps/json.hpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "source_path": "research/e8-response-subspaces/architecture/deps/json.hpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/inputs/BANK-PATTERNS.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "source_path": "research/e8-response-subspaces/architecture/inputs/BANK-PATTERNS.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/inputs/DATA-PHASES.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "47225c2ce696432aa9df6f422ae784aaa91bef651757f4266d0ea4edbff74694", + "source_path": "research/e8-response-subspaces/architecture/inputs/DATA-PHASES.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/inputs/GLOBAL-TEMPLATE.json.gz", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "19185edd2837894f97dd962e8cebdcb12e46ec85b8f0146405840ee8eddd79f5", + "source_path": "research/e8-response-subspaces/architecture/inputs/GLOBAL-TEMPLATE.json.gz" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/phase-replay.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b3f44ae97d191df8f11024cef3bd0fd1a92f543f45183557db546c43cc6d4674", + "source_path": "research/e8-response-subspaces/architecture/phase-replay.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/phase.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "be98c242c194674b35ece6b2254605ba0a04d51a0d13933ff86c84240b3f957a", + "source_path": "research/e8-response-subspaces/architecture/phase.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/architecture/SUFFICIENT.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "1c9b41de1015196b608dbbe17fdcab692ac78249b585f4579dfe13676b8faa5f", + "source_path": "research/e8-response-subspaces/architecture/SUFFICIENT.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/code/bit-compose-replay.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "553f29567694069526dd317f2c42ef4a235efbcec2d639c1692dcae50647ce04", + "source_path": "research/e8-response-subspaces/code/bit-compose-replay.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/code/engines/base_two_moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source_path": "research/e8-response-subspaces/code/engines/base_two_moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/code/engines/moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source_path": "research/e8-response-subspaces/code/engines/moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/code/engines/outer.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source_path": "research/e8-response-subspaces/code/engines/outer.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/code/outer.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "1db8744f85e87cfaa5e2b3696d7f89a2972c668365318a7cb1b6695c537467ee", + "source_path": "research/e8-response-subspaces/code/outer.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/frames/PROOF.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "01e721550cbee2d58681bcd2b561b1f8d5e2e422dc7a630cb99d62505166beb8", + "source_path": "research/e8-response-subspaces/frames/PROOF.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/frames/README.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "6592f3191538dff5233c7b4613848f750e3e645ab0956a20ca93b9f6d0775a4f", + "source_path": "research/e8-response-subspaces/frames/README.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/frames/reconstruct.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "726b3404aacf86b2515027622102d1a3075e82e1fbeb477f9d6aa438bb9baee3", + "source_path": "research/e8-response-subspaces/frames/reconstruct.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/frames/selection.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "17b7959402af929e2b24d2d1b285f84d6cf51a90cd077eb0fca9b4f5f7bf1d76", + "source_path": "research/e8-response-subspaces/frames/selection.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/BASE-MANIFEST.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "01663bf06edadded13027713c49b5764fb0db8161bdf0b38320328e0fc428359", + "source_path": "research/e8-response-subspaces/inherited/BASE-MANIFEST.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/BASE-REPLAY.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7c323c0abfad726178ac36c69604b6825049c194715d1ea621f1b86a99a72e1d", + "source_path": "research/e8-response-subspaces/inherited/BASE-REPLAY.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/BASE-VALIDATION.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "dea88d4f6e201abec078505ded8d08a85fd6492d8c60874feb9113589f887157", + "source_path": "research/e8-response-subspaces/inherited/BASE-VALIDATION.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/BIT-COMPOSITION-RECEIPT.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "453cb782369596c1086d98eab7931ff4a48046e71005a749d48e693431a50bbe", + "source_path": "research/e8-response-subspaces/inherited/BIT-COMPOSITION-RECEIPT.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/BIT-REUSE.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "17dfc693af28f4ba639eb1145610f6f88b799efae49cc3a6a0fba886a3e0e35c", + "source_path": "research/e8-response-subspaces/inherited/BIT-REUSE.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/complex-reserve-notice.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "source_path": "research/e8-response-subspaces/inherited/complex-reserve-notice.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/e8-notice.txt", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "source_path": "research/e8-response-subspaces/inherited/e8-notice.txt" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/helper-notice.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "source_path": "research/e8-response-subspaces/inherited/helper-notice.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/LICENSE", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "research/e8-response-subspaces/inherited/LICENSE" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "source_path": "research/e8-response-subspaces/inherited/NOTICE.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/outer-notice.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "eb15ca83343fadc44f184513680aaaca34d447e04f5929c30054afb205732ddc", + "source_path": "research/e8-response-subspaces/inherited/outer-notice.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/pr352-notice.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "source_path": "research/e8-response-subspaces/inherited/pr352-notice.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inherited/sussman-notice.txt", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "source_path": "research/e8-response-subspaces/inherited/sussman-notice.txt" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inputs/bank-patterns.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "source_path": "research/e8-response-subspaces/inputs/bank-patterns.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inputs/candidate781.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "a4e42aa1663f5ad0da48cee6fe8514b205e43cf6e791b80674dbc7506a098a32", + "source_path": "research/e8-response-subspaces/inputs/candidate781.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/inputs/helper781.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "3df4c637c69840d53a0137eadbe16e25add617984bbe4da099d059f026192f1e", + "source_path": "research/e8-response-subspaces/inputs/helper781.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/LICENSE", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "research/e8-response-subspaces/LICENSE" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/ANCESTRY-NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "66997993ef97c9c185b2b96b9bc0f67ee297f01cc79da6f4b7e7077b3a601e6a", + "source_path": "research/e8-response-subspaces/local/ANCESTRY-NOTICE.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/clifford_exact.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "source_path": "research/e8-response-subspaces/local/deps/clifford_exact.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/complex_labels.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "source_path": "research/e8-response-subspaces/local/deps/complex_labels.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/complex_scalars.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "source_path": "research/e8-response-subspaces/local/deps/complex_scalars.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/complex_splice.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "source_path": "research/e8-response-subspaces/local/deps/complex_splice.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/p10pins.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "source_path": "research/e8-response-subspaces/local/deps/p10pins.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/deps/scatter.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "source_path": "research/e8-response-subspaces/local/deps/scatter.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/local_admit.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "bb6e0f228e841bb0dfa61accae6478e3ddf153e414bc353f2f48ca4e9c7cc9b3", + "source_path": "research/e8-response-subspaces/local/local_admit.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/MANIFEST.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "3244b88da8f5b1582a777319d9a92b7bf317c41ae76215f9a191fb39b2a9e218", + "source_path": "research/e8-response-subspaces/local/MANIFEST.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/prior-phase/CLIFFORD-RECIPES.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "356211a16d179c8b4d37d0bc5d038b55b4d0397242b119f7b83a583b7f766e1a", + "source_path": "research/e8-response-subspaces/local/prior-phase/CLIFFORD-RECIPES.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/prior-phase/CLIFFORD-REVIEW.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0adf36a157af511c6b96a1a5c3c319061a7c9585b865f1289668c0f915fff641", + "source_path": "research/e8-response-subspaces/local/prior-phase/CLIFFORD-REVIEW.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/prior-phase/SOURCE-REUSE.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e5e7b8c8dc2f6df47ab2b21e58299d4316d104bbf426146d948f16ba92ecd88c", + "source_path": "research/e8-response-subspaces/local/prior-phase/SOURCE-REUSE.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/README.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "fb34710058552124798406167c0e3f2525cb665f9aa8d297329b3a4d1e295051", + "source_path": "research/e8-response-subspaces/local/README.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/local/UPSTREAM-NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "source_path": "research/e8-response-subspaces/local/UPSTREAM-NOTICE.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/MANIFEST.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5ff08a6c7b051d227fcd516542b56718ae65bca93615acfe09cb8785d8e3f43c", + "source_path": "research/e8-response-subspaces/MANIFEST.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "8e2a5c0d6a1a582f52bdfc421d7412eb3e84aef5460835c647ce55f5b8d2896d", + "source_path": "research/e8-response-subspaces/NOTICE.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/PROOF.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "94a8244d3211ef091d570735cee4521995691ecba7fd18ed05647745d58d24da", + "source_path": "research/e8-response-subspaces/PROOF.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/README.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "912d7aec76f958142cacd2f647e9224e22f2909feb0430295ad5584f86451c67", + "source_path": "research/e8-response-subspaces/README.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/requirements.txt", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "f201db884fc05bd8fb9478402ec8394b7c71a6ae189e4e953c6f00a2b793ffa7", + "source_path": "research/e8-response-subspaces/requirements.txt" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/AUXILIARY-PREWHITENING.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "58024afc83867a99441c513c6852df7305c2423ae5601c73c2e22854e261ce43", + "source_path": "research/e8-response-subspaces/research-notes/AUXILIARY-PREWHITENING.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/bank-patterns.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b7c16637602a6682b79f75dc7b0f069284b0cc21ba43b6b3c36f7fa9606f28ce", + "source_path": "research/e8-response-subspaces/research-notes/bank-patterns.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/bank-review.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "23914f4771dc882f71683809b4d84dda7ae8b60bbb9c64ac8ec17816d71a3a24", + "source_path": "research/e8-response-subspaces/research-notes/bank-review.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/frames-gl3.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5ed6b2c0a654393c54552d26bd4c1c9cc07addb0d6c8ddd8e969e1ab9681dee5", + "source_path": "research/e8-response-subspaces/research-notes/frames-gl3.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/frames-NOTES.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e4bec2dab0e059df74d35870c1ca3435d4cd5fd021961b56253aea7f429d796b", + "source_path": "research/e8-response-subspaces/research-notes/frames-NOTES.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/frames-response-search.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "fa56a09e7b98465e0173a2bdd8e331dd8831dead7f5397e2509586c386bcc321", + "source_path": "research/e8-response-subspaces/research-notes/frames-response-search.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/outer-and-dual-proof.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0312475a1c2426df57b4e4b655b0f29f13cb21ba8e7aab3d7a800ace37303a3a", + "source_path": "research/e8-response-subspaces/research-notes/outer-and-dual-proof.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/readout-SUMMARY.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "974f59c965f1ae0fd89e2f87d1d6108f41a731535caa93638fe513daefa02165", + "source_path": "research/e8-response-subspaces/research-notes/readout-SUMMARY.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/research-notes/SEARCH.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "ef66c6962ec287562d06cecb94d918d82279ec56a7112ecd578406f865084c27", + "source_path": "research/e8-response-subspaces/research-notes/SEARCH.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/RESULT.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "466cb1aeb6ffde5fcebb019e5dd8e5549c1b24e25e74e5d32b82c56691b56c6e", + "source_path": "research/e8-response-subspaces/RESULT.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/VALIDATION.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "316f09393038630b772e82669fb00963a14c8218a831d9b35c0f256543a4eb7e", + "source_path": "research/e8-response-subspaces/VALIDATION.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/VALIDATION.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e3bdad62dc0f4ef7c90b9fd650d3647d5b3eeef69473aa4caf4dc3cfba72dfa4", + "source_path": "research/e8-response-subspaces/VALIDATION.md" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/certify_bit_g.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c9a31508126f34e7ac95d802c39e8919a872cd705314de5bf3538de1636ce8ce", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/certify_bit_g.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/certify_bit_k.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e68a81ef7981a90d613752003cd5cab5351e260f909b094f1668d8a4dfe480df", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/certify_bit_k.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/columns_h.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/columns_h.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/columns_k.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/columns_k.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/cost.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/cost.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/exactnd_h.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/exactnd_h.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/finite_g.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "a591d8caa9ab50a4c7ec6934c71c93fc18fd14680180b43071e8d9d704f7ac9a", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/finite_g.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/finite_k.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7e67dc75e63a11e38ac6d6615656c7cf6982e5a33dd404d04b967bf474cad02e", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/finite_k.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/geometry_g.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b9fa3cd05f36f5fcebfdebfb4a86fb90e92ed3c1d9157c52918ee8c5b563b54f", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/geometry_g.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/geometry_k.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "646b7e8773d9c99376cb00627f109a97319e6d72b439ff513c39035c28c3f70f", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/geometry_k.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/gram_frames.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/gram_frames.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/json.hpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/json.hpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/legality_h.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/legality_h.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/tile_g.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "8140eec180e42202f2c6a9f11f5c92885e60861c38a7611dd805c524e3438138", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/tile_g.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/checkers/tile_k.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "64255088821f601ede2c3006f08cb97c39a4fa10dbbeb93a8a71fcfa0e1d8d77", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/checkers/tile_k.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/export_records.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/export_records.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/independent/centres_sat.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "f69379968367544807db2f0cf14359977e56299383b3edcc4469ddea7c7ecb40", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/independent/centres_sat.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/independent/checkword.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "11bf9620ca9db16d52d9fe806b814fc9ec9a89c4d7645354d1861d96f6e805ad", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/independent/checkword.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/independent/mutate.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0ff65aace5da4b57d96235bf830f8f11969322e75134d498aeb70e9753ec6b0d", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/independent/mutate.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/mutate_records.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b0e75d6550412a7be4017695e6b237392b611bb852ad8ff309d6682c9f166a4e", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/mutate_records.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/compile.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "60fea6a9d6617a3f87376d3fda040642e9cb70e7c179015e03ede8d289f30357", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/compile.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/compile2.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0e23d4282ceb75768e82631da016aaff9818aec53c7d75a6b2a28ee1b1160dc3", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/compile2.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/e8lib.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "4f8a6843e83bc4f7055d7337f33dbe12ce499051f46bee1b81bbf6b34c652574", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/e8lib.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/frames.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "ba71f77dd3e3c1c54f361c066cebe9faadbc78db46376046e7af625bf1de8c24", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/frames.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/fullword.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0daf87599e9e48646b985ad87351c56c1b73cfc99cdf9eca081483846ddbfa90", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/fullword.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/ham1.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "359040fb432fd392472af6b8f5dca0234dd6c2be744a791df27ba62bc5da5175", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/ham1.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/ham2.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "fdf0af785ce697bd7f80b4e75f7163735f3b599d9dc42f652f0ffdbdf18ea8bf", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/ham2.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/params-r865.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "1256c54debe0a551da8e24896ab73ef0bd4a5233ff8e6fedf21a9e6301d6e6f3", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/params-r865.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/price.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "46c858e60ba0a117bf8227b864abf55e85ebee2d56a0dce64472b706499ac405", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/price.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/producer/search2.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "4999c5d6bac9757e4236c45435201631eae21f644dc9543d8c0b6e3cc8360daf", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/producer/search2.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/receipts_e8.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "935ea65d9c6739e868ccf1aa439bd3c246657dfc887e4a0222a8f0901a5b41a5", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/receipts_e8.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/receipts_k.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "67f714e10a846e9cc62996342f825cd715055031e0b12591abdafd225717e195", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/receipts_k.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/certify_bit.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/certify_bit.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/columns_h_pr346.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/columns_h_pr346.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/cost.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/cost.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/json.hpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/json.hpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/legality_h_pr346.cpp", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/legality_h_pr346.cpp" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/prime_new.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/prime_new.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/prime_witnesses.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/prime_witnesses.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/stage_cohort.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/stage_cohort.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/bit/regression/tile_check.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "source_path": "research/e8-response-subspaces/vendor/bit/code/bit/regression/tile_check.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/complex/code/bridged.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5fe7174cd3a6580a74e4c1bf8fa7b426e8673f1c285603bf3076d4e758d70731", + "source_path": "research/e8-response-subspaces/vendor/bit/code/complex/code/bridged.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/pricing/base_two_moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source_path": "research/e8-response-subspaces/vendor/bit/code/pricing/base_two_moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/pricing/moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source_path": "research/e8-response-subspaces/vendor/bit/code/pricing/moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/pricing/outer.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source_path": "research/e8-response-subspaces/vendor/bit/code/pricing/outer.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/code/pricing/prime_witnesses.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "source_path": "research/e8-response-subspaces/vendor/bit/code/pricing/prime_witnesses.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/bit/data/bit/bitE8-r865.json.gz", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "source_path": "research/e8-response-subspaces/vendor/bit/data/bit/bitE8-r865.json.gz" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "source_path": "research/e8-response-subspaces/vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/odd-stages/clifford_exact.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "source_path": "research/e8-response-subspaces/vendor/cx/work/odd-stages/clifford_exact.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/odd-stages/data_phases.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "source_path": "research/e8-response-subspaces/vendor/cx/work/odd-stages/data_phases.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/odd-stages/global_nine.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "source_path": "research/e8-response-subspaces/vendor/cx/work/odd-stages/global_nine.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/odd-stages/RECIPE-9.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "source_path": "research/e8-response-subspaces/vendor/cx/work/odd-stages/RECIPE-9.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/pr361/code/engines/base_two_moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source_path": "research/e8-response-subspaces/vendor/cx/work/pr361/code/engines/base_two_moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/pr361/code/engines/moment.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source_path": "research/e8-response-subspaces/vendor/cx/work/pr361/code/engines/moment.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/cx/work/pr361/code/engines/outer.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source_path": "research/e8-response-subspaces/vendor/cx/work/pr361/code/engines/outer.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/helper/candidate_frames.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "source_path": "research/e8-response-subspaces/vendor/helper/candidate_frames.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/helper/candidate_from378.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "source_path": "research/e8-response-subspaces/vendor/helper/candidate_from378.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/helper/two_alias.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "source_path": "research/e8-response-subspaces/vendor/helper/two_alias.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/reuse/frame-selection.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "a83d4880579fb1f8cffb701d1d685c157b7fa14ef9d6642e42ff1e4f5a1b8c5c", + "source_path": "research/e8-response-subspaces/vendor/reuse/frame-selection.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/reuse/frame_replay.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "6dc74f24323c717d9eff7c12f27c67a0531899e61a8ee340c98162b1e34f9531", + "source_path": "research/e8-response-subspaces/vendor/reuse/frame_replay.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/reuse/reuse-selection.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "0b300bab47cf0d69cbc7965bf01c2a27c96b97677ee651334470d8c968b603f1", + "source_path": "research/e8-response-subspaces/vendor/reuse/reuse-selection.json" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/vendor/reuse/reuse_replay.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "e83251e3d49267fb5b53eda53c1be80118b7df0cc671c38cad1f300883cd1316", + "source_path": "research/e8-response-subspaces/vendor/reuse/reuse_replay.py" + }, + { + "commit": "7844f72c6051a4408284c3092490687061675c1a", + "path": "vendor/source401/verify.py", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "9a573069ef44ffa092ab638bbfa817cc2922c5a2827c7de0e71138b6cf9c13ff", + "source_path": "research/e8-response-subspaces/verify.py" + }, + { + "commit": "12f488264cdd74a3b60d0fb534f4955792384f5c", + "path": "vendor/source404/selection194.json", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "7b8d5701b6ac524070fab509bf21fadef557d1eb396d28eb0136ca4ab18728e5", + "source_path": "research/e8-shared-donor-chains/shared/selection194.json" + }, + { + "commit": "12f488264cdd74a3b60d0fb534f4955792384f5c", + "path": "vendor/source404/NOTICE.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "175492d6648fbd5de1a45aa3b6ac99268551299786781a4b14d1bab3c5a1a19b", + "source_path": "research/e8-shared-donor-chains/NOTICE.md" + }, + { + "commit": "12f488264cdd74a3b60d0fb534f4955792384f5c", + "path": "vendor/source404/README.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "2beb4568b319804ac7790ef5803cb442c529a8a02692e8b8c5eca60c95a2b5e0", + "source_path": "research/e8-shared-donor-chains/README.md" + }, + { + "commit": "12f488264cdd74a3b60d0fb534f4955792384f5c", + "path": "vendor/source404/PROOF.md", + "repository": "CrocSwap/integer-mult-bounds", + "sha256": "5ab68880c7a72d909ced76074650908d3a9bd1e19bd9df0f8b7b9e924e1cc899", + "source_path": "research/e8-shared-donor-chains/PROOF.md" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/repivot.py", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "7dfe60b7ace9f8ba4674e0ead24e6933f48b0e0497038d1cf64ef2d4bffd142c", + "source_path": "research/e8-repivot-fusion/code/repivot.py" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/seqenlarge.py", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "8cdaabaa1923677e9bbbccc1291e414b13fc8ae19ea33202c4ae50fd8b03b6e0", + "source_path": "research/e8-sequential-enlarged/code/seqenlarge.py" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/repivot-e8.json", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "58fd4e9f2712ba5b33f78d792d99de612e2dfd888cdb83d0718028e6d6633c85", + "source_path": "research/e8-sequential-enlarged/data/repivot-e8.json" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/repivot-e8seq.json", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "e1e0dfe35c4ccbd572e6ecdd5be855e2a2e73a34a05c4437e94b97ab22d8f7d2", + "source_path": "research/e8-sequential-enlarged/data/repivot-e8seq.json" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/pr410/enlarged205.json", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "46b28ee2fd1768317fae7983043964b28f0f9c6e32a50f6a8b8b9b90e38920cc", + "source_path": "research/e8-sequential-enlarged/data/pr410/enlarged205.json" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/pr409/SELECTION.json", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "55ed27fc7d202aac06b5c62e5822764b24283f2637b70c2ffa9b3ee3dc7f2a48", + "source_path": "research/e8-sequential-enlarged/data/pr409/SELECTION.json" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/LICENSE", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "LICENSE" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/NOTICE.md", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "ab9c3c082f2e00c5636603978d044127bd7b7fda6cdf955456154a36e222bc7a", + "source_path": "research/e8-sequential-enlarged/NOTICE.md" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/LICENSE-pr409", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "research/e8-sequential-enlarged/data/pr409/LICENSE-pr409" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/LICENSE-pr410", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source_path": "research/e8-sequential-enlarged/data/pr410/LICENSE-pr410" + }, + { + "commit": "616d9d678c00d79693b869934464003ba5b8d1b1", + "path": "vendor/source412/NOTICE-repivot.md", + "repository": "chafreaky/integer-mult-bounds", + "sha256": "8c7f4785def2bc39334aac618184bb4e3c6b11ee6f1c8b51edc89d7b8fddc2c0", + "source_path": "research/e8-repivot-fusion/NOTICE.md" + } + ], + "parent": { + "commit": "b3c45822ca847aec8c0c019bb04db30881fc2966", + "manifest_sha256": "389ac12de894730bd534f9a00d604866dd400175e32bd1204920dd98eafb8888", + "package": "research/e8-coupled-bit-retiming", + "scope": "Complete frozen source tree is retained beside this extension, without modifying any original bytes." + } +} diff --git a/research/e8-clean-reuse-extension/assembly.py b/research/e8-clean-reuse-extension/assembly.py new file mode 100644 index 0000000000..e7e2ca6a97 --- /dev/null +++ b/research/e8-clean-reuse-extension/assembly.py @@ -0,0 +1,122 @@ +"""Exact seven-bit/nine-complex assembly refinement, adapted from PR376. + +The certified complex supplier is PR384's unit in PR377; PR387 is the prior +parameter witness. Eta, eight bootstrap steps and the 10^-27 grid are PR376's; +beta=10^-18 follows PR387's smaller positive leaf backoff. + +Prepared with OpenAI Codex assistance; Apache-2.0. The finite supplier inputs +must be independently regenerated by the calling verifier. This refines the +assembly parameters; it does not strengthen the complex supplier theorem. +Usage: e8_tight_assembly.py PARENT KAPPA_JSON FINITE_JSON OUTPUT_JSON +""" +from fractions import Fraction as Q +from pathlib import Path +import importlib.util +import json +import sys + +def load(name, path): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + +def encode(x): + if isinstance(x, Q): return str(x) + if isinstance(x, dict): return {str(k): encode(v) for k,v in x.items()} + if isinstance(x, (list,tuple)): return [encode(v) for v in x] + return x + +def run(parent, priced, finite, expected_coarse=None, supplier_bridge=None): + pricing = Path(parent)/'code/pricing' + moment = load('e8_assembly_moment', pricing/'moment.py') + other = load('e8_assembly_base_two', pricing/'base_two_moment.py') + outer = load('e8_assembly_outer', pricing/'outer.py') + fk = load('e8_assembly_finite', Path(parent)/'code/bit/checkers/finite_k.py') + H = {int(k):v for k,v in priced['normalized_histogram'].items()} + m, stock = priced['m'], priced['W'] + c, b = Q(priced['bit_coarse']), Q(priced['complex_coarse']) + assert priced['K']==3 and priced['stages']==7 and m==56 and priced['T']==7 + assert priced['halving_degree']==2 and m**2>2*max(H)**2 + assert finite['row_reserve']['internal_coefficient']==2*(m*m+1)<20161 + assert sum(H.values())==finite['positive_rank_children'] + assert sum(r*n for r,n in H.items())==finite['rank_mass'] + if expected_coarse is None:expected_coarse=json.loads((Path(__file__).resolve().parent/'data/EXPECTED.json').read_text())['complex_coarse'] + assert b==Q(expected_coarse) + grid = 10**27 + eta, beta = Q(1,10**24), Q(1,10**18) + cap=(1-beta)*b + ticks=(cap-Q(1,grid))*grid + selected=min(c,Q(ticks.numerator//ticks.denominator,grid)) + assert 00 + cutoff=fk.cutoff_log2(delta,coefficient) + assert Q(cutoff)*delta**2>=36 + assert Q(cutoff)*delta>=2*(4+(coefficient-1).bit_length()) + cutoffs.append(dict(stage=index+1,gaps=gaps,minimum_gap=delta, + cutoff_log2=cutoff,charged_coefficient=coefficient)) + chain.append(new) + bridge=dict(proof='PROOF.md',representation='Exact powers with source-bound finite overcharges', + semantic=dict(G=dict(base=2,exponent=30000),E=dict(base=2,exponent=100000), + B_upper=dict(base=2,exponent=100001),C0=dict(base=2,exponent=210000), + C1=1,strict_literal_gap=1,induction_gap_lower=1), + rows=dict(coefficient=20161,degree=10**6,suffix_slope=4*10**6, + degree_gap=Q(10**6)-Q(51*20161,25))) + if supplier_bridge is not None: + supplied=json.loads(json.dumps(supplier_bridge)) + assert supplied['semantic']==bridge['semantic'] + assert supplied['rows']['coefficient']==20161 and supplied['rows']['degree']==10**6 + assert supplied['rows']['suffix_slope']==4*10**6 + supplied['rows']['degree_gap']=Q(supplied['rows']['degree_gap']) + assert supplied['rows']['degree_gap']==bridge['rows']['degree_gap'] + bridge=supplied + bit=chain[-1];q=bit*(1-2*eta);minimum=(1-eta)*q/(1+q) + ticks=minimum*grid;kappa=Q((ticks.numerator-1)//ticks.denominator,grid) + assembly=outer.assembly(bit,b,bridge,kappa,eta=eta,beta=beta) + assert len(assembly['strict_constraints'])==47 + assert min(assembly['strict_constraints'].values())>0 + try: outer.assembly(bit,b,bridge,kappa+Q(1,grid),eta=eta,beta=beta) + except AssertionError: pass + else: raise AssertionError('adjacent assembly grid point admitted') + controls=[] + for name,wrong_eta,wrong_beta in [('zero_eta',Q(0),beta),('zero_beta',eta,Q(0)),('unit_beta',eta,Q(1))]: + try:outer.assembly(bit,b,bridge,kappa,eta=wrong_eta,beta=wrong_beta) + except AssertionError:controls.append(name) + else:raise AssertionError('bad assembly parameter admitted: '+name) + if binding=='complex': + try: outer.assembly(cap,b,bridge,kappa,eta=eta,beta=beta) + except AssertionError as err: assert 'leaf_saving_above_bit' in str(err) + else: raise AssertionError('complex leaf cap admitted') + old=Q(json.loads((Path(__file__).resolve().parent/'data/EXPECTED.json').read_text())['prior_pr389']) + assert kappa>old + return encode(dict(status='PASS_EXACT_E8_ASSEMBLY_REFINEMENT',eta=eta,beta=beta, + grid_denominator=grid,bootstrap_steps=8,bit_coarse=c,complex_coarse=b, + selected_saving=selected,selected_moment_interval=interval, + independent_moment_upper=upper+Q(1,10**16)*bad,chain=chain, + finite_cutoffs=cutoffs,assembly=assembly,kappa=kappa, + prior_pr389_kappa=old,absolute_gain=kappa-old,binding=binding, + relative_gain=(kappa-old)/old, + adjacent_grid_rejected=True,parameter_controls_rejected=controls,complex_leaf_cap_rejected=(binding=='complex'))) + +if __name__=='__main__': + parent,priced,finite,out=map(Path,sys.argv[1:]) + result=run(parent,json.loads(priced.read_text()),json.loads(finite.read_text())) + out.write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') + print('PASS_EXACT_E8_ASSEMBLY_REFINEMENT',result['kappa'],float(Q(result['kappa']))) diff --git a/research/e8-clean-reuse-extension/bit_native.py b/research/e8-clean-reuse-extension/bit_native.py new file mode 100644 index 0000000000..1a83e11404 --- /dev/null +++ b/research/e8-clean-reuse-extension/bit_native.py @@ -0,0 +1,38 @@ +"""Private independent full bit replay for arbitrary changed helper count.""" +import argparse,gzip,hashlib,importlib.util,json,os,pathlib,subprocess,sys,time +ROOT=pathlib.Path(__file__).resolve().parent +P=ROOT.parent/'e8-coupled-bit-retiming' +CODE=P/'vendor/source375/code';BIT=CODE/'bit';CK=BIT/'checkers';HK=P/'vendor/source381/code/bit/checkers' +def read(p):return json.loads(pathlib.Path(p).read_text()) +def dump(p,z):pathlib.Path(p).write_text(json.dumps(z,indent=2)+'\n') +def main(word,complex_receipt,out,baseline_bin): + c=json.loads(gzip.decompress(word.read_bytes()));R=c['R'];out.mkdir(exist_ok=False);(out/'bin').mkdir();stages=[] + env=dict(os.environ,PYTHONUTF8='1',PYTHONDONTWRITEBYTECODE='1');env.pop('PYTHONOPTIMIZE',None) + def run(name,args): + print('RUN',name,flush=True);t=time.monotonic() + command=[str(x.relative_to(out).as_posix())if i and isinstance(x,pathlib.Path)and x.is_relative_to(out)else str(x)for i,x in enumerate(args)] + with(out/(name+'.log')).open('w',encoding='utf-8')as f:subprocess.run(command,cwd=out,env=env,stdout=f,stderr=subprocess.STDOUT,check=True) + stages.append({'name':name,'log_sha256':hashlib.sha256((out/(name+'.log')).read_bytes()).hexdigest()});print('PASS',name,round(time.monotonic()-t,2),flush=True) + def py(script,*args):return[sys.executable,'-B',P/'run_pinned.py',script,*args] + rec=out/'records';run('export',py(BIT/'export_records.py',word,rec)) + run('independent-word',py(BIT/'independent/checkword.py',word,CODE/'pricing')) + run('word-controls',py(BIT/'independent/mutate.py',word,CODE/'pricing')) + run('cohort',py(BIT/'regression/stage_cohort.py',rec,rec,out/'cin',out/'cout')) + cxx=os.environ.get('CXX','g++');base=pathlib.Path(baseline_bin);exe=lambda p:p.with_suffix('.exe')if sys.platform=='win32'else p + for name,source,extra in [('columns_h','columns_h.cpp',[]),('columns_k2','columns_k.cpp',['-DKPAIRS=2']),('columns_k3','columns_k.cpp',['-DKPAIRS=3'])]: + run(name+'-compile',[cxx,'-O2','-std=c++17','-DHDIM=8','-DNCOPY=9','-DVPORTS=120',f'-DRHELP={R}',*extra,'-I'+str(CK),'-o',exe(out/'bin'/name),CK/source]) + run('legality',[exe(base/'legality'),out/'cin',out/'cout',out/'legality.json']) + for name in ('columns_h','columns_k2','columns_k3'):run(name,[exe(out/'bin'/name),out/'cout/COHORT249-RECORDS.bin',out/(name+'.json')]) + col=read(out/'columns_k3.json');assert col['formal_columns_checked']==720+R and len(col['stages'])==7 + assert len(col['negative_controls'])==12 and all(z['rejected']for z in col['negative_controls']) + h,k=read(out/'columns_h.json'),read(out/'columns_k2.json');h.pop('seconds');k.pop('seconds');assert h==k + run('record-controls',py(BIT/'mutate_records.py',rec,out/'cin',out/'cout',exe(base/'legality'),exe(out/'bin/columns_k3'),exe(base/'legality_ncopy_h'))) + run('gram',py(CK/'gram_frames.py',rec,'--gram','e8ham','--h',8,'--positive')) + run('geometry',py(HK/'geometry_k.py',3,word,'unsplit'));run('banks',py(CK/'tile_k.py',rec,3,8,7)) + b=read(complex_receipt)['coarse'];run('pricing',py(HK/'certify_bit_k.py',rec,b,3,8,7,out/'priced.json','unsplit')) + run('finite-input',py(BIT/'receipts_k.py',word,rec,out/'legality.json',out/'columns_k3.json',out/'priced.json',out/'finite-input.json')) + run('finite',py(HK/'finite_k.py','e8',out/'finite-input.json',out/'finite.json')) + p,f=read(out/'priced.json'),read(out/'finite.json');assert p['W']==7*(720+R)and p['m']==56 + assert p['maxchild']<=39 and p['halving_degree']==2 and f['row_reserve']['internal_coefficient']==6274 + assert f['route']['all_ports']['ports']==120 + result={'status':'PASS_FRESH_CLEAN_REUSE_BIT_SUPPLIER','R':R,'local_columns':240+R,'global_columns':720+R,'coarse':p['bit_coarse'],'live':p['W'],'word_sha256':hashlib.sha256(word.read_bytes()).hexdigest(),'stages':stages,'scope':'Conditional finite supplier, inherited all-size interfaces retained.'};dump(out/'VERIFICATION.json',result);print(json.dumps(result),flush=True) diff --git a/research/e8-clean-reuse-extension/bit_reuse.py b/research/e8-clean-reuse-extension/bit_reuse.py new file mode 100644 index 0000000000..73f77b1c05 --- /dev/null +++ b/research/e8-clean-reuse-extension/bit_reuse.py @@ -0,0 +1,77 @@ +"""Fixed clean-reset reconstruction with all independent dirt columns. + +The calling verifier separately admits frames, banks, invoices and phases. +Apache-2.0; prepared with substantial OpenAI Codex assistance. +""" +import argparse,bisect,copy,gzip,json,math,pathlib,sys,time +from collections import Counter,defaultdict +HERE=pathlib.Path(__file__).resolve().parent +PACKAGE=HERE.parent/'e8-coupled-bit-retiming' +sys.path.insert(0,str(PACKAGE));import retime +F=retime.F +sys.path.insert(0,str(PACKAGE/'vendor/source381/code/complex/code'));import bridged +IDLE=bridged.check(3,8)['blocks_per_role_pair'] + +def audit(c): + v=c['v'];n=2*v+c['R'];cur=list(c['start']);masks=[sum(1<>r&1]]for t in range(v)if values[v+t]] + out['C']=[[1,d,list(ss)]for f,d,ss in reversed(out['A']+out['B'])if d>=240] + audit(out) + return out diff --git a/research/e8-clean-reuse-extension/complex_native.py b/research/e8-clean-reuse-extension/complex_native.py new file mode 100644 index 0000000000..162f057ad0 --- /dev/null +++ b/research/e8-clean-reuse-extension/complex_native.py @@ -0,0 +1,123 @@ +"""Private full replay of the integrated prefix + exact two-donor candidate. + +Derivation follows applecrusher PR376 and ai-nanachi PR389. The Y->Y +compiler extension follows Dugongue PR390, with an independently rerun full +raw-operator equality and frozen literal response/cleanup from the new +same-dimension base. Original source bytes stay immutable. No result claimed +until every stage, owner, phase and finite invoice passes. +""" +import argparse, copy, difflib, gzip, hashlib, importlib.util, json, os, pathlib, shutil, subprocess, sys, time +from collections import Counter +from fractions import Fraction as Q +sys.set_int_max_str_digits(0) +HERE=pathlib.Path(__file__).resolve().parent +PACKAGE=HERE.parent/'e8-coupled-bit-retiming' +SOURCE=PACKAGE/'vendor/source377' +CX='work/native358/vendor/complex-reserve/upstream/pr352/code/complex' +ODD='work/odd-stages' + +def sha(p):return hashlib.sha256(pathlib.Path(p).read_bytes()).hexdigest() +def read(p): + p=pathlib.Path(p);raw=p.read_bytes();return json.loads(gzip.decompress(raw)if p.suffix=='.gz'else raw) +def dump(p,z):pathlib.Path(p).write_text(json.dumps(z,indent=2,sort_keys=True)+'\n',encoding='utf-8',newline='\n') +def rawmap(c): + n=2*c['v']+c['R'];rows=[{i:Q(1)}for i in range(n)] + def add(t,s,q): + for k,v in list(s.items()): + z=rows[t].get(k,Q(0))+q*v + if z:rows[t][k]=z + else:rows[t].pop(k,None) + def run(gs): + for g in gs: + for r,a,b in g[3]: + t,s=(r,g[2])if g[0]=='out'else(g[2],r);add(t,rows[s],Q(a,b)) + run(c['A']);tot={k:dict(rows[r])for k,r,f in c['ret']} + for t,es in enumerate(c['scat']['table']): + for k,a,b in es:add(c['v']+t,tot[k],Q(a,b)) + run(c['B']);return rows,tot +def helperword(c): + out=[] + for g in c['A']+c['B']: + for r,a,b in g[3]: + t,s=(r,g[2])if g[0]=='out'else(g[2],r) + if not c['v']<=t<2*c['v']:out.append((t,s,Q(a,b))) + return out + +def main(candidate,base,out): + c=read(candidate);old=read(base);R=c['R'];N=240+R;LIVE=7680+9*R;PHYSICAL=LIVE+R+10 + assert rawmap(c)==rawmap(old),'ALL independent raw columns and copied totals' + assert helperword(c)==helperword(old),'EXACT source/helper subword' + for k in ['h','v','R','cst','N','ports','start','final','ext','ret','scat']:assert c[k]==old[k],k + assert c['h']==9 and c['v']==120 and R==779 + original_manifest=read(SOURCE/'MANIFEST.json')['files'] + assert {p.relative_to(SOURCE).as_posix():sha(p)for p in SOURCE.rglob('*')if p.is_file()and p!=SOURCE/'MANIFEST.json'}==original_manifest + assert not out.exists();out.mkdir();shutil.copytree(SOURCE/'work',out/'work');(out/'logs').mkdir();changes=[];stages=[] + def execute(name,script,args=(),env=None): + print('RUN',name,flush=True);start=time.monotonic() + with(out/'logs'/(name+'.log')).open('w',encoding='utf-8',newline='\n')as f: + subprocess.run([sys.executable,'-B',str(PACKAGE/'run_pinned.py'),str(script),*map(str,args)],cwd=out,env=env,stdout=f,stderr=subprocess.STDOUT,check=True) + stages.append({'name':name,'log_sha256':sha(out/'logs'/(name+'.log'))});print('PASS',name,round(time.monotonic()-start,2),flush=True) + def change(path,data,why): + p=out/path;before=p.read_bytes()if p.exists()else None;raw=data.encode()if isinstance(data,str)else data;p.parent.mkdir(parents=True,exist_ok=True);p.write_bytes(raw) + changes.append({'path':path,'before_sha256':hashlib.sha256(before).hexdigest()if before is not None else None,'after_sha256':sha(p),'reason':why,'unified_diff':''.join(difflib.unified_diff(before.decode().splitlines(True),raw.decode().splitlines(True),fromfile='original/'+path,tofile='derived/'+path))if before is not None and not path.endswith('.gz')else None}) + def edits(path,pairs,why): + text=(out/path).read_text(encoding='utf-8') + for before,after,count in pairs:assert text.count(before)==count,(path,before,text.count(before));text=text.replace(before,after) + change(path,text,why) + sys.path.insert(0,str(HERE/'vendor/source376')) + from transport import deterministic_gzip + data=json.dumps(c,sort_keys=True,separators=(',',':')).encode();z=deterministic_gzip(data) + pins=read(out/CX/'inputs/complex/source-pins.json');certpath=CX+'/'+pins['certificate']['path'];previous=copy.deepcopy(pins['certificate']) + change(certpath,z,'Integrated fixed prefix + aliases + two donor inlines, independently admitted gcert') + change('work/pr361/complex/gcert1-e8-r783.json.gz',z,'One exact candidate consumed by every geometry and phase audit') + change(CX+'/code/kernel-base.json.gz',deterministic_gzip(json.dumps(old,sort_keys=True,separators=(',',':')).encode()),'Explicit same-width frozen response and cleanup word; full raw matrix equality checked') + pins['certificate'].update(compressed_sha256=hashlib.sha256(z).hexdigest(),uncompressed_sha256=hashlib.sha256(data).hexdigest(),source_pin='derived-prefix-alias-inline',derived_from=previous) + pins['certificate'].pop('url',None);change(CX+'/inputs/complex/source-pins.json',json.dumps(pins,indent=2,sort_keys=True)+'\n','Bind actual new input, preserving immutable original attribution') + edits(CX+'/code/complex_scalars.py',[ + ('t!=s and kind(s)!="Y" and not(kind(s)=="S" and kind(t)=="X")','t!=s and (kind(s)!="Y" or kind(t)=="Y") and not(kind(s)=="S" and kind(t)=="X")',1), + (' K=list(old_positive(A,B,c))',' baseline=json.loads(gzip.decompress((Path(__file__).parent/"kernel-base.json.gz").read_bytes()))\n oldA=flat(baseline["A"]);oldB=flat(baseline["B"])\n need([(t,s,q) for t,s,q in A+B if kind(t)!="Y"]==[(t,s,q) for t,s,q in oldA+oldB if kind(t)!="Y"],"frozen source/helper cleanup mismatch")\n K=list(old_positive(oldA,oldB,baseline))',1), + ('("cleanup",cleanup(orientation,A+B))','("cleanup",cleanup(orientation,oldA+oldB))',1), + ('projection requires Y never read and no helper-to-X gate','main Y reads require a Y target; helper-to-X remains forbidden',1) + ],'Sufficient main-only Y->Y extension with explicit independently matching old response and cleanup; no guard removed') + edits(CX+'/code/complex_splice.py',[ + ("t!=s and role(s)!='Y' and (role(s),role(t))!=('S','X')","t!=s and (role(s)!='Y' or role(t)=='Y') and (role(s),role(t))!=('S','X')",1), + ("A=list(flat(c['A']));B=list(flat(c['B']));cur=c['start'].copy()","baseline=json.loads(gzip.decompress((Path(__file__).parent/'kernel-base.json.gz').read_bytes()))\n A=list(flat(baseline['A']));B=list(flat(baseline['B']));cur=c['start'].copy()",1) + ],'Literal response/cleanup use the exact new baseline; main walks the new candidate and retains every incidence and lifecycle check') + seed={'H':9,'V':120,'R':R,'cst':72,'N':c['N'],'frames':len(c['frames'])};dump(out/'seed.json',seed) + env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1',CX_PINS=str(out/'seed.json'),CX_RECORD=str(out/'recorded.json')) + env.pop('CX_SOURCE_PINS',None);env.pop('PYTHONOPTIMIZE',None) + execute('fresh-local-census',out/CX/'portable_complex.py',env=env) + fresh=seed|read(out/'recorded.json');change(CX+'/pins-e8.json',json.dumps(fresh,indent=2,sort_keys=True)+'\n','Exact new census and bill recorded once, then frozen for independent admission') + edits('work/native358/vendor/complex-reserve/finite_guard.py',[("assert (h,v,R)==(9,120,783)",f"assert (h,v,R)==(9,120,{R})",1)],'Rebind dimension to the independently reconstructed helper count') + edits(ODD+'/complex_candidate.py',[('(9,120,783,72)',f'(9,120,{R},72)',1),('banks=783','banks=R',1)],'Rebuild every finite data route and whole residual bank for new count') + edits(ODD+'/global_nine.py',[ + ('h,v,R=9,120,783;k,L,T,m=4,9,8,73;live=14727;physical=live+R+h+1',f"h,v,R=c['h'],c['v'],c['R'];assert (h,v,R)==(9,120,{R});k,L,T,m=4,9,8,73;live=2*k*v*T+L*R;physical=live+R+h+1;assert (live,physical)==({LIVE},{PHYSICAL})",1), + ("local_children=raw['label_checks']['invocation_calls'];assert local_children==3974","local_children=raw['label_checks']['invocation_calls'];assert local_children==sum(sum(block.values()) for block in c['blocks'].values())",1) + ],'New owners, live stock and exact paid events are derived from the new certificate') + path=ODD+'/audit_nine_template.py';text=(out/path).read_text();needle="c=json.load(gzip.open('work/pr361/complex/gcert1-e8-r783.json.gz'))";assert text.count(needle)==1 + text=text.replace(needle,needle+f"\nassert (c['h'],c['v'],c['R'],c['cst'])==(9,120,{R},72)\nR=c['R'];N=2*c['v']+R;LIVE=8*c['v']*8+9*R;PHYSICAL=LIVE+R+c['h']+1\nassert (N,LIVE,PHYSICAL)==({N},{LIVE},{PHYSICAL})") + for before,after,count in [('14727','LIVE',11),('15520','PHYSICAL',1),('1023','N',2),('r*783','r*R',1),('s*783','s*R',1)]: + assert text.count(before)==count,(before,text.count(before));text=text.replace(before,after) + # The independent audit's old fixed expected price is rebound after the + # separate fresh geometric producer certifies the actual new profile. + old_price='assert b==Q(999240641319551,10**18)';assert text.count(old_price)==1 + text=text.replace(old_price,"assert b==Q(json.loads(Path('EXPECTED-PRICE.json').read_text())['coarse'])") + change(path,text,'Independent read-back derives dimensions and source cardinalities; exact moment equality will bind the separately computed new price') + dump(out/'DERIVATION.json',{'source_manifest_sha256':sha(SOURCE/'MANIFEST.json'),'candidate_sha256':hashlib.sha256(data).hexdigest(),'baseline_json_sha256':sha(base),'full_raw_columns':N,'changed_files':changes}) + vendor=out/'work/native358/vendor/complex-reserve';native=out/'work/complex-nine-native' + execute('independent-local-admission',vendor/'admit.py',['--source',vendor/'upstream/pr352','--output',native/'local-admission']) + execute('finite-data-geometry-banks',out/ODD/'complex_candidate.py') + priced=read(out/ODD/'COMPLEX-NINE-CANDIDATE.json');dump(out/'EXPECTED-PRICE.json',{'coarse':priced['coarse_candidate']}) + for name,script in [('all-canonical-clifford-phases','verify_clifford_frames.py'),('data-and-cover-phases','data_phases.py'),('global-template-finite-invoice','global_nine.py'),('independent-template-two-moments','audit_nine_template.py')]:execute(name,out/ODD/script) + g=read(native/'GLOBAL-REVIEW.json');a=read(native/'INDEPENDENT-TEMPLATE-AUDIT.json');d=read(native/'local-admission/INDEPENDENT-AUDIT.json');f=read(native/'CLIFFORD-REVIEW.json') + assert all(z['independent_live_columns']==N and z['all_live_rows_correct'] and z['all_private_work_restored_zero']for z in d['scalar_words'].values()) + assert (g['m'],g['live'],g['physical'],g['deficit'])==(73,LIVE,PHYSICAL,2496) + assert g['profile']==a['paid_profile'] and a['coarse_complex']==priced['coarse_candidate'] + assert f['frames']==len(c['frames'])and f['all_child_equalities_include_global_phase'] + assert {p.relative_to(SOURCE).as_posix():sha(p)for p in SOURCE.rglob('*')if p.is_file()and p!=SOURCE/'MANIFEST.json'}==original_manifest + result={'status':'PASS_FRESH_PREFIX_ALIAS_TWO_DONOR_COMPLEX_COMPONENT','coarse':a['coarse_complex'],'local_columns':N,'R':R,'frames':len(c['frames']),'live':LIVE,'physical':PHYSICAL,'profile':g['profile'],'finite_invoice':g['finite_invoice'],'stages':stages,'scope':'Conditional finite supplier; inherited all-size and main-only target-shear interface retained. No full multiplication claim.'} + dump(out/'VERIFICATION.json',result);print(result['status'],result['coarse'],flush=True) + +if __name__=='__main__': + ap=argparse.ArgumentParser();ap.add_argument('candidate',type=pathlib.Path);ap.add_argument('base',type=pathlib.Path);ap.add_argument('output',type=pathlib.Path);a=ap.parse_args() + main(a.candidate.resolve(),a.base.resolve(),a.output.resolve()) diff --git a/research/e8-clean-reuse-extension/construct.py b/research/e8-clean-reuse-extension/construct.py new file mode 100644 index 0000000000..22ab8b0ebb --- /dev/null +++ b/research/e8-clean-reuse-extension/construct.py @@ -0,0 +1,69 @@ +"""Reconstruct the fixed complex and bit witnesses, with mathematical controls.""" +import copy,gzip,hashlib,json,pathlib,sys,types +from collections import defaultdict +from fractions import Fraction as Q +import exact,inline,bit_reuse,gauges +ROOT=pathlib.Path(__file__).resolve().parent;PARENT=ROOT.parent/'e8-coupled-bit-retiming' +sys.path.insert(0,str(ROOT/'vendor/source376'));import candidate_frames,transport +def signed(c): + source=(ROOT/'vendor/source395/construct.py').read_text(encoding='utf-8') + function=source[source.index('def transform(c,selection):'):source.index('def emit(out):')] + ns={'copy':copy,'Q':Q,'defaultdict':defaultdict,'up':types.SimpleNamespace(rehist=exact.rehist)} + exec(compile(function,'unmodified pinned PR395 transform','exec'),ns) + return ns['transform'](c,exact.read(ROOT/'data/signed-selection.json')) +def complex_build(): + c=json.loads(candidate_frames.build((PARENT/'vendor/source384/data/gcert1-e8-r783-far.json.gz').read_bytes())) + for drop,terms in [(556,{354:Q(-2),461:Q(-2)}),(576,{402:Q(-2),478:Q(-2)})]: + plans={r:t for r,t,reads in inline.proposals(c,4)};assert plans[drop]==terms + c=inline.repair(c,drop,terms) + d=signed(c);assert exact.rawmap(c)==exact.rawmap(d) + controls=[] + bad=copy.deepcopy(d);bad['B'].pop(0);assert exact.rawmap(bad)!=exact.rawmap(c);controls.append('signed setup omitted') + entry=exact.read(ROOT/'data/signed-selection.json')[0];recovery=['in',entry['recovery_frame'],entry['destination'],[[entry['donor_target'],int(entry['coefficient']),1]]] + k=next(k for k,g in enumerate(d['B'])if g==recovery);bad=copy.deepcopy(d);bad['B'].pop(k);assert exact.rawmap(bad)!=exact.rawmap(c);controls.append('signed recovery omitted') + return c,d,controls +def bit_build(): + c=exact.read(PARENT/'data/retimed.json.gz');selection=exact.read(ROOT/'data/reuse-selection.json');controls=[] + bad=copy.deepcopy(selection[0]);bad['new']=bad['old'] + try:bit_reuse.reconstruct(c,bad) + except(AssertionError,IndexError):controls.append('overlapping reuse rejected') + else:raise AssertionError('invalid overlap accepted') + bad=copy.deepcopy(selection[0]);bad['reset_sources']=[0] + try:bit_reuse.reconstruct(c,bad) + except(AssertionError,IndexError):controls.append('wrong reset rejected') + else:raise AssertionError('wrong reset accepted') + for e in selection:c=bit_reuse.reconstruct(c,e) + R=bit_reuse.retime;nodes,masks=R.nodes_of(c);bygate={(n['phase'],n['index']):i for i,n in enumerate(nodes)if not n.get('pin')} + previous,following,frame=R.links(nodes,c,masks) + for block in exact.read(ROOT/'data/retime-selection.json'): + assert block['method']=='extremes' + for move in block['changes']: + i=bygate[move['phase'],move['index']];assert nodes[i]['mask']==int(move['old']) + low,high,edges=R.interval({i},nodes,previous,following,frame);m=int(move['new']);assert bit_reuse.F.inside(low,m)and bit_reuse.F.inside(m,high);nodes[i]['mask']=m + c=R.write_nodes(c,nodes);bit_reuse.audit(c) + for block in exact.read(ROOT/'data/extra-bit-rounds.json'): + for e in block['reuses']:c=bit_reuse.reconstruct(c,e) + nodes,masks=R.nodes_of(c);bygate={(n['phase'],n['index']):i for i,n in enumerate(nodes)if not n.get('pin')} + previous,following,frame=R.links(nodes,c,masks) + for step in block['retiming']: + assert step['method']=='extremes' + for move in step['changes']: + i=bygate[move['phase'],move['index']];assert nodes[i]['mask']==int(move['old']) + low,high,edges=R.interval({i},nodes,previous,following,frame);m=int(move['new']) + assert bit_reuse.F.inside(low,m)and bit_reuse.F.inside(m,high);nodes[i]['mask']=m + c=R.write_nodes(c,nodes);bit_reuse.audit(c) + assert c['R']==767 + return c,controls +def emit(out): + out=pathlib.Path(out);out.mkdir(exist_ok=False);base,c,cc=complex_build();b,bc=bit_build() + for name,z in [('kernel-base',base),('complex-candidate',c),('bit-candidate',b)]: + raw=json.dumps(z,sort_keys=True,separators=(',',':')).encode();blob=transport.deterministic_gzip(raw);expected=(ROOT/'data'/(name+'.json.gz')).read_bytes();assert blob==expected,'changed fixed witness '+name;(out/(name+'.json.gz')).write_bytes(blob) + gauged,signed_base,gr=gauges.build(c) + for name,z in [('gauged-candidate',gauged),('gauge-signed-base',signed_base)]: + raw=json.dumps(z,sort_keys=True,separators=(',',':')).encode();blob=transport.deterministic_gzip(raw) + assert blob==(ROOT/'data'/(name+'.json.gz')).read_bytes(),'changed gauge witness '+name + (out/(name+'.json.gz')).write_bytes(blob) + # Native response-space checkers accept plain JSON and bind its bytes. + (out/'gauged-candidate.json').write_text(json.dumps(gauged,sort_keys=True,separators=(',',':')),encoding='utf-8',newline='\n') + report={'status':'PASS_FIXED_WITNESSES_AND_CONTROLS','complex_R':c['R'],'bit_R':b['R'],'all_complex_raw_columns':240+c['R'],'bit_reuses':55,'additional_bit_frame_moves':54,'negative_controls':cc+bc,'response_spaces':gr};(out/'RECONSTRUCTION.json').write_text(json.dumps(report,indent=2)+'\n');return report +if __name__=='__main__':print(emit(sys.argv[1])) diff --git a/research/e8-clean-reuse-extension/data/BASELINE-EXPECTED.json b/research/e8-clean-reuse-extension/data/BASELINE-EXPECTED.json new file mode 100644 index 0000000000..15b17b4361 --- /dev/null +++ b/research/e8-clean-reuse-extension/data/BASELINE-EXPECTED.json @@ -0,0 +1,74 @@ +{ + "absolute_gain": "2520384560482263850947/500000000000000000000000000", + "bit_R": 795, + "bit_coarse": "515099079330787/500000000000000000", + "bit_component_gain": "1238900869359/100000000000000000", + "bit_finite_coefficient": 56177025247400, + "bit_global_columns": 1515, + "bit_live": 10605, + "bit_local_columns": 1035, + "bit_profile": { + "1": 113141, + "14": 1680, + "2": 42875, + "20": 1680, + "28": 1680, + "3": 23275, + "34": 1680, + "4": 15631, + "5": 10878, + "6": 1680, + "7": 4046, + "8": 882 + }, + "bit_reuse_kappa_gain": "0", + "complex_R": 779, + "complex_coarse": "62792737728603/62500000000000000", + "complex_finite_invoice": { + "C0_exponent": 210000, + "E_exponent": 100000, + "G_exponent": 30000, + "compiler": 25934336, + "group_bits": 2628, + "halving_degree": 2, + "halving_integer_inequality": [ + 5329, + 4608 + ], + "induction_gap_multiple_B": 49, + "literal_bits": 35284, + "live_stock_bits": 2642, + "local_adapters": 271392, + "local_primitive_bound": 7038371388736, + "logical_groups_bits": 2677, + "outside_adapter_bound": 1982896, + "pervertex": 558187831953299, + "physical_row_coefficient": 15445, + "physical_stock_bits": 2642, + "required_C0_bits": 200012, + "retained_row_coefficient": 20161, + "router_bits": 7984, + "scalar_primitives_all_invocations": 5070768 + }, + "complex_live": 14691, + "complex_local_columns": 1019, + "complex_physical": 15480, + "complex_profile": { + "1": 157131, + "16": 3840, + "2": 43776, + "3": 36648, + "32": 3840, + "4": 7848, + "48": 3840, + "5": 15480, + "6": 23256, + "7": 4752, + "8": 7488, + "9": 576 + }, + "conditional": true, + "kappa": "1003675427211799133818727/1000000000000000000000000000", + "prior_pr389": "998634658090834606116833/1000000000000000000000000000", + "status": "PASS_FRESH_E8_CLEAN_REUSE_AND_SIGNED_COMPOSITION" +} diff --git a/research/e8-clean-reuse-extension/data/EXPECTED.json b/research/e8-clean-reuse-extension/data/EXPECTED.json new file mode 100644 index 0000000000..0974bc7101 --- /dev/null +++ b/research/e8-clean-reuse-extension/data/EXPECTED.json @@ -0,0 +1,82 @@ +{ + "absolute_gain": "10066087511950599565621/500000000000000000000000000", + "bit_R": 767, + "bit_coarse": "104575879789097/100000000000000000", + "bit_component_gain": "13974823961493/500000000000000000", + "bit_finite_coefficient": 55762535482200, + "bit_global_columns": 1487, + "bit_live": 10409, + "bit_local_columns": 1007, + "bit_profile": { + "1": 115983, + "14": 1680, + "2": 42875, + "20": 1680, + "28": 1680, + "3": 23275, + "34": 1680, + "4": 15729, + "5": 8036, + "6": 1680, + "7": 4046, + "8": 882 + }, + "bit_reuse_kappa_gain": "199256529998565541059/100000000000000000000000000", + "complex_R": 779, + "complex_all_fresh_phase_pairs": 6482, + "complex_bank_boundary_adapters": 29088, + "complex_banks_per_stage": 734, + "complex_chronological_entrance_shears": 551, + "complex_coarse": "254951444354246755323/250000000000000000000000", + "complex_entrance_rankmass": 360, + "complex_finite_invoice": { + "C0_exponent": 210000, + "E_exponent": 100000, + "G_exponent": 30000, + "adapter_groups": 303184, + "compiler": 25934336, + "explicit_bank_boundary_adapters": 29088, + "group_bits": 2628, + "halving_degree": 2, + "induction_gap_multiple_B": 49, + "literal_bits": 35284, + "live": 14286, + "local_bound": 7862875808976, + "logical_bits": 2677, + "outside_groups": 2412664, + "pervertex": 628697897898302, + "physical": 15075, + "physical_stock_bits": 2642, + "real_primitives_all_calls": 5799984, + "retained_row": 20161, + "router_bits": 7984, + "row": 15445 + }, + "complex_gauges": 202, + "complex_live": 14286, + "complex_local_columns": 1019, + "complex_physical": 15075, + "complex_profile": { + "1": 178830, + "16": 3840, + "2": 47520, + "3": 30960, + "32": 3840, + "4": 8568, + "48": 3840, + "5": 15768, + "6": 15840, + "7": 4536, + "8": 7488, + "9": 576 + }, + "complex_unchanged_original_checkers": [ + "gx.check1", + "gxcore.mirror" + ], + "conditional": true, + "fair_old_bit_kappa": "203354853562950029967497/200000000000000000000000000", + "kappa": "40750673324589432209923/40000000000000000000000000", + "prior_pr389": "998634658090834606116833/1000000000000000000000000000", + "status": "PASS_FRESH_E8_SHARED_RESPONSE_AND_CLEAN_REUSE_COMPOSITION" +} diff --git a/research/e8-clean-reuse-extension/data/bank-patterns.json b/research/e8-clean-reuse-extension/data/bank-patterns.json new file mode 100644 index 0000000000..be3ff7f23a --- /dev/null +++ b/research/e8-clean-reuse-extension/data/bank-patterns.json @@ -0,0 +1,36 @@ +[ + { + "count": 24, + "r9": 2, + "r8": 6, + "r7": 1, + "padding": 0 + }, + { + "count": 152, + "r9": 4, + "r8": 4, + "r5": 1, + "padding": 0 + }, + { + "count": 136, + "r9": 5, + "r8": 3, + "r4": 1, + "padding": 0 + }, + { + "count": 48, + "r9": 6, + "r8": 1, + "r7": 1, + "r4": 1, + "padding": 0 + }, + { + "count": 374, + "r9": 8, + "padding": 1 + } +] diff --git a/research/e8-clean-reuse-extension/data/bit-candidate.json.gz b/research/e8-clean-reuse-extension/data/bit-candidate.json.gz new file mode 100644 index 0000000000..807cea53eb Binary files /dev/null and b/research/e8-clean-reuse-extension/data/bit-candidate.json.gz differ diff --git a/research/e8-clean-reuse-extension/data/complex-candidate.json.gz b/research/e8-clean-reuse-extension/data/complex-candidate.json.gz new file mode 100644 index 0000000000..394fc44353 Binary files /dev/null and b/research/e8-clean-reuse-extension/data/complex-candidate.json.gz differ diff --git a/research/e8-clean-reuse-extension/data/extra-bit-rounds.json b/research/e8-clean-reuse-extension/data/extra-bit-rounds.json new file mode 100644 index 0000000000..c48df5da3d --- /dev/null +++ b/research/e8-clean-reuse-extension/data/extra-bit-rounds.json @@ -0,0 +1,485 @@ +[ + { + "retiming": [ + { + "changes": [ + { + "index": 1227, + "new": "5172014448931175958106549077934250", + "old": "5172014449894538720612832874856618", + "phase": "A" + }, + { + "index": 1230, + "new": "71776119061217382", + "old": "71776995247915110", + "phase": "A" + }, + { + "index": 1239, + "new": "308276084001730439550074970", + "old": "1059228559449380920221952420855414874", + "phase": "A" + }, + { + "index": 1242, + "new": "65430", + "old": "225030516572054", + "phase": "A" + }, + { + "index": 1263, + "new": "1204203453131759529492633", + "old": "4137611560349144219617385338896537", + "phase": "A" + }, + { + "index": 1266, + "new": "16711765", + "old": "57421281812742229", + "phase": "A" + }, + { + "index": 1293, + "new": "1324035698926381045275276563951124585", + "old": "1325759703742691437261312083078676585", + "phase": "A" + }, + { + "index": 1304, + "new": "280375465083045", + "old": "24205751757045925", + "phase": "A" + }, + { + "index": 1321, + "new": "78918677504442992524819169484", + "old": "78918918345133618876728410316", + "phase": "A" + }, + { + "index": 1329, + "new": "20203181441137406086353707335740", + "old": "882710669132361834256270729685893180", + "phase": "A" + }, + { + "index": 1357, + "new": "4703919738795935662095", + "old": "123315137520430971762376719", + "phase": "A" + }, + { + "index": 1370, + "new": "1095216660531", + "old": "182514635285811", + "phase": "A" + }, + { + "index": 1379, + "new": "4278190275", + "old": "55102029504184515", + "phase": "A" + }, + { + "index": 1392, + "new": "18374686479671623920", + "old": "77884452878093268299886969288130800", + "phase": "A" + } + ], + "method": "extremes" + } + ], + "reuses": [ + { + "at": 1227, + "frame": 500, + "new": 932, + "old": 682, + "reset_sources": [ + 489, + 677 + ] + }, + { + "at": 1230, + "frame": 501, + "new": 932, + "old": 654, + "reset_sources": [ + 376, + 645 + ] + }, + { + "at": 1239, + "frame": 504, + "new": 932, + "old": 666, + "reset_sources": [ + 441, + 661 + ] + }, + { + "at": 1242, + "frame": 505, + "new": 932, + "old": 634, + "reset_sources": [ + 297, + 629 + ] + }, + { + "at": 1263, + "frame": 512, + "new": 932, + "old": 606, + "reset_sources": [ + 424, + 597 + ] + }, + { + "at": 1266, + "frame": 513, + "new": 932, + "old": 574, + "reset_sources": [ + 312, + 565 + ] + }, + { + "at": 1293, + "frame": 526, + "new": 940, + "old": 622, + "reset_sources": [ + 504, + 613 + ] + }, + { + "at": 1304, + "frame": 531, + "new": 944, + "old": 586, + "reset_sources": [ + 361, + 581 + ] + }, + { + "at": 1328, + "frame": 543, + "new": 948, + "old": 698, + "reset_sources": [ + 473, + 693 + ] + }, + { + "at": 1356, + "frame": 555, + "new": 952, + "old": 522, + "reset_sources": [ + 409, + 517 + ] + }, + { + "at": 1377, + "frame": 565, + "new": 961, + "old": 558, + "reset_sources": [ + 328, + 549 + ] + }, + { + "at": 1390, + "frame": 572, + "new": 965, + "old": 730, + "reset_sources": [ + 393, + 725 + ] + }, + { + "at": 1321, + "frame": 540, + "new": 946, + "old": 709, + "reset_sources": [ + 457, + 714 + ] + }, + { + "at": 1370, + "frame": 561, + "new": 956, + "old": 542, + "reset_sources": [ + 344, + 533 + ] + } + ] + }, + { + "retiming": [ + { + "changes": [ + { + "index": 1277, + "new": "5172014448931175958106549077934250", + "old": "446517247424391524383198737917280426", + "phase": "A" + }, + { + "index": 1280, + "new": "65430", + "old": "861274006", + "phase": "A" + }, + { + "index": 1287, + "new": "308276084001730439550074970", + "old": "308677485152774360819302490", + "phase": "A" + }, + { + "index": 1290, + "new": "71776119061217382", + "old": "71869578975641702", + "phase": "A" + }, + { + "index": 1300, + "new": "16711765", + "old": "2784974165", + "phase": "A" + }, + { + "index": 1303, + "new": "1324035698926381045275276563951124585", + "old": "1327483708559001829247347598179696745", + "phase": "A" + }, + { + "index": 1308, + "new": "1204203453131759529492633", + "old": "103962898120375242651074713", + "phase": "A" + }, + { + "index": 1316, + "new": "280375465083045", + "old": "48131122512527525", + "phase": "A" + }, + { + "index": 1332, + "new": "78918677504442992524819169484", + "old": "78919640867205497932456132812", + "phase": "A" + }, + { + "index": 1373, + "new": "20203181441137406086353707335740", + "old": "20203181842538557223732038860860", + "phase": "A" + }, + { + "index": 1385, + "new": "1095216660531", + "old": "100051263183411", + "phase": "A" + }, + { + "index": 1395, + "new": "4278190275", + "old": "16954473578496195", + "phase": "A" + }, + { + "index": 1399, + "new": "4703919738795935662095", + "old": "3103208669363409494770950661472271", + "phase": "A" + }, + { + "index": 1408, + "new": "18374686479671623920", + "old": "1246151246049492017177894313535734000", + "phase": "A" + } + ], + "method": "extremes" + } + ], + "reuses": [ + { + "at": 1324, + "frame": 541, + "new": 946, + "old": 718, + "reset_sources": [ + 706, + 714 + ] + }, + { + "at": 1277, + "frame": 518, + "new": 932, + "old": 686, + "reset_sources": [ + 489, + 674, + 677 + ] + }, + { + "at": 1280, + "frame": 519, + "new": 932, + "old": 638, + "reset_sources": [ + 297, + 626, + 629 + ] + }, + { + "at": 1287, + "frame": 522, + "new": 934, + "old": 670, + "reset_sources": [ + 441, + 658, + 661 + ] + }, + { + "at": 1290, + "frame": 523, + "new": 934, + "old": 650, + "reset_sources": [ + 376, + 642, + 645 + ] + }, + { + "at": 1300, + "frame": 527, + "new": 936, + "old": 570, + "reset_sources": [ + 312, + 562, + 565 + ] + }, + { + "at": 1303, + "frame": 528, + "new": 936, + "old": 618, + "reset_sources": [ + 504, + 610, + 613 + ] + }, + { + "at": 1308, + "frame": 530, + "new": 937, + "old": 602, + "reset_sources": [ + 424, + 594, + 597 + ] + }, + { + "at": 1316, + "frame": 533, + "new": 938, + "old": 590, + "reset_sources": [ + 361, + 578, + 581 + ] + }, + { + "at": 1373, + "frame": 558, + "new": 944, + "old": 702, + "reset_sources": [ + 473, + 690, + 693 + ] + }, + { + "at": 1385, + "frame": 563, + "new": 947, + "old": 538, + "reset_sources": [ + 344, + 530, + 533 + ] + }, + { + "at": 1395, + "frame": 567, + "new": 949, + "old": 554, + "reset_sources": [ + 328, + 546, + 549 + ] + }, + { + "at": 1399, + "frame": 569, + "new": 949, + "old": 526, + "reset_sources": [ + 409, + 514, + 517 + ] + }, + { + "at": 1408, + "frame": 573, + "new": 950, + "old": 734, + "reset_sources": [ + 393, + 722, + 725 + ] + } + ] + } +] diff --git a/research/e8-clean-reuse-extension/data/gauge-signed-base.json.gz b/research/e8-clean-reuse-extension/data/gauge-signed-base.json.gz new file mode 100644 index 0000000000..167ecfa7d1 Binary files /dev/null and b/research/e8-clean-reuse-extension/data/gauge-signed-base.json.gz differ diff --git a/research/e8-clean-reuse-extension/data/gauged-candidate.json.gz b/research/e8-clean-reuse-extension/data/gauged-candidate.json.gz new file mode 100644 index 0000000000..0daa432394 Binary files /dev/null and b/research/e8-clean-reuse-extension/data/gauged-candidate.json.gz differ diff --git a/research/e8-clean-reuse-extension/data/kernel-base.json.gz b/research/e8-clean-reuse-extension/data/kernel-base.json.gz new file mode 100644 index 0000000000..feb3bc0159 Binary files /dev/null and b/research/e8-clean-reuse-extension/data/kernel-base.json.gz differ diff --git a/research/e8-clean-reuse-extension/data/retime-selection.json b/research/e8-clean-reuse-extension/data/retime-selection.json new file mode 100644 index 0000000000..9789554084 --- /dev/null +++ b/research/e8-clean-reuse-extension/data/retime-selection.json @@ -0,0 +1,215 @@ +[ + { + "changes": [ + { + "entropy_delta": -0.33979807359079217, + "index": 1149, + "new": "78918677504442992524819169484", + "old": "78918681931661570219138089164", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1152, + "new": "20203181441137406086353707335740", + "old": "20203181445564624665074791874620", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1161, + "new": "5172014448931175958106549077934250", + "old": "5172014448934939094161468617130154", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1164, + "new": "308276084001730439550074970", + "old": "308279847137521476314333274", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1173, + "new": "71776119061217382", + "old": "1246151246048361766865587768697815142", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1176, + "new": "65430", + "old": "1136503902381245475127190", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1188, + "new": "1204203453131759529492633", + "old": "1205310257776182102651033", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1200, + "new": "16711765", + "old": "290143856914477635805839445", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1221, + "new": "5172014448931175958106549077934250", + "old": "5172014449172016648733120027164842", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1224, + "new": "71776119061217382", + "old": "71776338107891814", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1231, + "new": "308276084001730439550074970", + "old": "264807140093552293056786117412520026", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1234, + "new": "65430", + "old": "56440165302166", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1241, + "new": "1324035698926381045275276563951124585", + "old": "1324035698988036262075623489379762281", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1244, + "new": "280375465083045", + "old": "281212983718821", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1247, + "new": "1324035698926381045275276563951124585", + "old": "1324035699173001912476661173289222249", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1250, + "new": "280375465083045", + "old": "280633163173029", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1253, + "new": "1204203453131759529492633", + "old": "1034402890990438644753778014683289", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1256, + "new": "16711765", + "old": "14355932498559061", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1268, + "new": "4703919738795935662095", + "old": "8081272581158882173775505260559", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1307, + "new": "18374686479671623920", + "old": "18374702972347023600", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1310, + "new": "18374686479671623920", + "old": "18374950362478018800", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1317, + "new": "20203181441137406086353707335740", + "old": "441365436156901485831178541696614460", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -3.1123867958305738, + "index": 1324, + "new": "4278190275", + "old": "4291019715", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1329, + "new": "4278190275", + "old": "4282137795", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1339, + "new": "1095216660531", + "old": "25333843126517811", + "phase": "A", + "sweep": 0 + }, + { + "entropy_delta": -0.33979807359079217, + "index": 1343, + "new": "4703919738795935662095", + "old": "184970354320777059675734031", + "phase": "A", + "sweep": 0 + } + ], + "method": "extremes" + } +] diff --git a/research/e8-clean-reuse-extension/data/reuse-selection.json b/research/e8-clean-reuse-extension/data/reuse-selection.json new file mode 100644 index 0000000000..7c8adce034 --- /dev/null +++ b/research/e8-clean-reuse-extension/data/reuse-selection.json @@ -0,0 +1,272 @@ +[ + { + "at": 1819, + "frame": 812, + "new": 1052, + "old": 592, + "reset_sources": [ + 810, + 811 + ] + }, + { + "at": 1151, + "frame": 475, + "new": 933, + "old": 694, + "reset_sources": [ + 692, + 693 + ] + }, + { + "at": 1160, + "frame": 478, + "new": 933, + "old": 678, + "reset_sources": [ + 676, + 677 + ] + }, + { + "at": 1163, + "frame": 479, + "new": 933, + "old": 662, + "reset_sources": [ + 660, + 661 + ] + }, + { + "at": 1172, + "frame": 482, + "new": 933, + "old": 646, + "reset_sources": [ + 644, + 645 + ] + }, + { + "at": 1175, + "frame": 483, + "new": 933, + "old": 630, + "reset_sources": [ + 628, + 629 + ] + }, + { + "at": 1187, + "frame": 487, + "new": 933, + "old": 598, + "reset_sources": [ + 596, + 597 + ] + }, + { + "at": 1199, + "frame": 491, + "new": 933, + "old": 566, + "reset_sources": [ + 564, + 565 + ] + }, + { + "at": 1236, + "frame": 506, + "new": 941, + "old": 614, + "reset_sources": [ + 612, + 613 + ] + }, + { + "at": 1239, + "frame": 507, + "new": 941, + "old": 582, + "reset_sources": [ + 580, + 581 + ] + }, + { + "at": 1259, + "frame": 517, + "new": 947, + "old": 518, + "reset_sources": [ + 516, + 517 + ] + }, + { + "at": 1298, + "frame": 538, + "new": 963, + "old": 726, + "reset_sources": [ + 724, + 725 + ] + }, + { + "at": 1313, + "frame": 545, + "new": 969, + "old": 550, + "reset_sources": [ + 548, + 549 + ] + }, + { + "at": 1149, + "frame": 474, + "new": 932, + "old": 450, + "reset_sources": [ + 457, + 706 + ] + }, + { + "at": 1221, + "frame": 498, + "new": 932, + "old": 482, + "reset_sources": [ + 489, + 674 + ] + }, + { + "at": 1224, + "frame": 499, + "new": 932, + "old": 373, + "reset_sources": [ + 376, + 642 + ] + }, + { + "at": 1231, + "frame": 502, + "new": 934, + "old": 434, + "reset_sources": [ + 441, + 658 + ] + }, + { + "at": 1234, + "frame": 503, + "new": 934, + "old": 290, + "reset_sources": [ + 297, + 626 + ] + }, + { + "at": 1247, + "frame": 508, + "new": 936, + "old": 501, + "reset_sources": [ + 504, + 610 + ] + }, + { + "at": 1250, + "frame": 509, + "new": 936, + "old": 354, + "reset_sources": [ + 361, + 578 + ] + }, + { + "at": 1253, + "frame": 510, + "new": 936, + "old": 421, + "reset_sources": [ + 424, + 594 + ] + }, + { + "at": 1256, + "frame": 511, + "new": 936, + "old": 309, + "reset_sources": [ + 312, + 562 + ] + }, + { + "at": 1310, + "frame": 539, + "new": 954, + "old": 386, + "reset_sources": [ + 393, + 722 + ] + }, + { + "at": 1317, + "frame": 542, + "new": 956, + "old": 466, + "reset_sources": [ + 473, + 690 + ] + }, + { + "at": 1329, + "frame": 547, + "new": 959, + "old": 325, + "reset_sources": [ + 328, + 546 + ] + }, + { + "at": 1339, + "frame": 551, + "new": 961, + "old": 341, + "reset_sources": [ + 344, + 530 + ] + }, + { + "at": 1343, + "frame": 553, + "new": 961, + "old": 402, + "reset_sources": [ + 409, + 514 + ] + } +] diff --git a/research/e8-clean-reuse-extension/data/signed-selection.json b/research/e8-clean-reuse-extension/data/signed-selection.json new file mode 100644 index 0000000000..70275562b1 --- /dev/null +++ b/research/e8-clean-reuse-extension/data/signed-selection.json @@ -0,0 +1,358 @@ +[ + { + "coefficient": "-1", + "cut_group": 2659, + "destination": 123, + "donor_target": 170, + "gain": 4.7803567329033, + "histogram_delta": { + "3": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 3, + "recovery_frame": 725 + }, + { + "coefficient": "-1", + "cut_group": 2655, + "destination": 125, + "donor_target": 172, + "gain": 7.029697311378534, + "histogram_delta": { + "1": -1, + "3": -2, + "7": 1 + }, + "prefix_target_deliveries": 3, + "recovery_frame": 724 + }, + { + "coefficient": "1", + "cut_group": 2683, + "destination": 132, + "donor_target": 158, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 743 + }, + { + "coefficient": "1", + "cut_group": 2663, + "destination": 138, + "donor_target": 145, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 726 + }, + { + "coefficient": "1", + "cut_group": 2641, + "destination": 144, + "donor_target": 208, + "gain": 6.689899237787742, + "histogram_delta": { + "1": -1, + "2": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 3, + "recovery_frame": 935 + }, + { + "coefficient": "1", + "cut_group": 2617, + "destination": 152, + "donor_target": 156, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 923 + }, + { + "coefficient": "-1", + "cut_group": 2634, + "destination": 153, + "donor_target": 206, + "gain": 1.484519866898971, + "histogram_delta": { + "1": 1, + "2": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 937 + }, + { + "coefficient": "1", + "cut_group": 2675, + "destination": 159, + "donor_target": 166, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 729 + }, + { + "coefficient": "1", + "cut_group": 2642, + "destination": 165, + "donor_target": 215, + "gain": 1.484519866898971, + "histogram_delta": { + "1": 1, + "2": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 921 + }, + { + "coefficient": "1", + "cut_group": 2639, + "destination": 168, + "donor_target": 217, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 920 + }, + { + "coefficient": "-1", + "cut_group": 2645, + "destination": 169, + "donor_target": 122, + "gain": 4.7803567329033, + "histogram_delta": { + "3": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 722 + }, + { + "coefficient": "-1", + "cut_group": 2649, + "destination": 171, + "donor_target": 124, + "gain": 4.7803567329033, + "histogram_delta": { + "3": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 723 + }, + { + "coefficient": "1", + "cut_group": 2632, + "destination": 179, + "donor_target": 188, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 719 + }, + { + "coefficient": "1", + "cut_group": 2575, + "destination": 180, + "donor_target": 221, + "gain": 3.81908500976888, + "histogram_delta": { + "2": -1, + "4": -1, + "6": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 892 + }, + { + "coefficient": "1", + "cut_group": 2665, + "destination": 181, + "donor_target": 174, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 727 + }, + { + "coefficient": "1", + "cut_group": 2671, + "destination": 184, + "donor_target": 191, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 728 + }, + { + "coefficient": "1", + "cut_group": 2622, + "destination": 185, + "donor_target": 176, + "gain": 4.7803567329033, + "histogram_delta": { + "3": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 3, + "recovery_frame": 717 + }, + { + "coefficient": "1", + "cut_group": 2618, + "destination": 186, + "donor_target": 175, + "gain": 4.7803567329033, + "histogram_delta": { + "3": -1, + "4": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 716 + }, + { + "coefficient": "-1", + "cut_group": 2626, + "destination": 189, + "donor_target": 178, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 718 + }, + { + "coefficient": "1", + "cut_group": 2643, + "destination": 190, + "donor_target": 226, + "gain": 1.484519866898971, + "histogram_delta": { + "1": 1, + "2": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 927 + }, + { + "coefficient": "-1", + "cut_group": 2644, + "destination": 201, + "donor_target": 232, + "gain": 1.484519866898971, + "histogram_delta": { + "1": 1, + "2": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 942 + }, + { + "coefficient": "-1", + "cut_group": 2677, + "destination": 202, + "donor_target": 198, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 736 + }, + { + "coefficient": "1", + "cut_group": 2636, + "destination": 210, + "donor_target": 147, + "gain": 2.8708142280188618, + "histogram_delta": { + "1": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 933 + }, + { + "coefficient": "1", + "cut_group": 2635, + "destination": 223, + "donor_target": 183, + "gain": 1.484519866898971, + "histogram_delta": { + "1": 1, + "2": -1, + "6": -1, + "7": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 938 + }, + { + "coefficient": "-1", + "cut_group": 2588, + "destination": 227, + "donor_target": 192, + "gain": 3.81908500976888, + "histogram_delta": { + "2": -1, + "4": -1, + "6": 1 + }, + "prefix_target_deliveries": 2, + "recovery_frame": 902 + } +] diff --git a/research/e8-clean-reuse-extension/exact.py b/research/e8-clean-reuse-extension/exact.py new file mode 100644 index 0000000000..05e8cac7b2 --- /dev/null +++ b/research/e8-clean-reuse-extension/exact.py @@ -0,0 +1,36 @@ +"""Exact helpers for the changed finite witness; Apache-2.0, Codex assistance.""" +import gzip,json,pathlib +from collections import Counter +from fractions import Fraction as Q +def read(path): + p=pathlib.Path(path);raw=p.read_bytes();return json.loads(gzip.decompress(raw)if p.suffix=='.gz'else raw) +def rawmap(c): + n=2*c['v']+c['R'];rows=[{i:Q(1)}for i in range(n)] + def add(t,s,q): + for k,v in list(s.items()): + z=rows[t].get(k,Q(0))+q*v + if z:rows[t][k]=z + else:rows[t].pop(k,None) + def run(gs): + for g in gs: + for r,a,b in g[3]: + t,s=(r,g[2])if g[0]=='out'else(g[2],r);add(t,rows[s],Q(a,b)) + run(c['A']);tot={k:dict(rows[r])for k,r,f in c['ret']} + for t,es in enumerate(c['scat']['table']): + for k,a,b in es:add(c['v']+t,tot[k],Q(a,b)) + run(c['B']);return rows,tot +def rehist(c): + from vendor.source376.two_alias import inside + dim=list(map(len,c['frames']));cur=c['start'].copy();H={k:Counter()for k in'xysc'};v=c['v'] + def climb(r,f): + assert inside(tuple(c['frames'][cur[r]]),tuple(c['frames'][f])),(r,cur[r],f) + d=dim[f]-dim[cur[r]] + if d:H['x'if r0 + assert lr['unit_entrance_gates']==551 + assert len(lr['entrance_omission_algebraic_controls'])==551 + exe=out/('phase-replay.exe'if os.name=='nt'else'phase-replay') + run('compile-phase',[env.get('CXX','g++'),'-O2','-std=c++17','-I'+str(SOURCE/'architecture/deps'),SOURCE/'architecture/phase-replay.cpp','-o',exe]) + py('phase',SOURCE/'architecture/phase.py',candidate,SOURCE/'local/deps',exe,out/'phase',SOURCE/'architecture/phase-replay.cpp') + prior=SOURCE/'architecture/inputs/GLOBAL-TEMPLATE.json.gz' + py('banks',SOURCE/'architecture/banks.py',candidate,patterns,out/'phase/RESIDUALS.json',out/'local/LOCAL-PROGRAMS.json.gz',out/'local/RESULT.json',prior,SOURCE/'local/deps',out/'banks',SOURCE/'architecture/inputs/DATA-PHASES.json') + py('bank-audit',SOURCE/'architecture/audit.py',out/'banks',candidate,out/'phase/RESIDUALS.json',out/'local/LOCAL-PROGRAMS.json.gz',prior) + py('bridge',SOURCE/'architecture/bridge.py',out/'banks') + spec=importlib.util.spec_from_file_location('response_space_moments',SOURCE/'code/outer.py') + M=importlib.util.module_from_spec(spec);spec.loader.exec_module(M) + ad=read(out/'banks/ADMISSION.json');ind=read(out/'banks/INDEPENDENT-ADMISSION.json') + assert ad['template_sha256']==ind['template_sha256'] and ad['deficit']==2496 + price=M.coarse(ad['profile'],ad['m'],ad['live']);dump(out/'COARSE.json',price) + result=dict(status='PASS_FRESH_SHARED_RESPONSE_SPACES_FULL_SUPPLIER',coarse=price['lower'],R=779,local_columns=1019,frames=lr['checks']['frames']if 'frames'in lr['checks']else len(read(candidate)['frames']),live=ad['live'],physical=ad['physical'],profile=ad['profile'],finite_invoice=ad['invoice'],gauges=lr['gauges'],entrance_rankmass=lr['entrance_rankmass'],banks_per_stage=ad['banks_per_stage'],all_fresh_phase_pairs=lr['new_and_reflected_exact_phase_pairs'],explicit_bank_boundary_adapters=ad['invoice']['explicit_bank_boundary_adapters'],checks=[e['name']for e in checks],scope='Conditional finite supplier; full all-size compiler, arbitrary-correlated dirt/bank, recursion, cover/routing and analytic interfaces remain assumptions.') + dump(out/'VERIFICATION.json',result) + print(result['status'],result['coarse'],flush=True) + return result diff --git a/research/e8-clean-reuse-extension/gauges.py b/research/e8-clean-reuse-extension/gauges.py new file mode 100644 index 0000000000..e9c2f1bed3 --- /dev/null +++ b/research/e8-clean-reuse-extension/gauges.py @@ -0,0 +1,138 @@ +"""Compose pinned shared-donor plans with the reconstructed R779 word. + +The selection is Dugongue's PR404, using PR401's response-space machinery. +Removed helpers are mapped explicitly. No independent gains are added. +Apache-2.0; prepared with substantial OpenAI Codex assistance. +""" +import copy,importlib.util,pathlib +from collections import defaultdict +from fractions import Fraction as Q +import exact +ROOT=pathlib.Path(__file__).resolve().parent +spec=importlib.util.spec_from_file_location('pinned_response_frames',ROOT/'vendor/source401/frames/reconstruct.py') +G=importlib.util.module_from_spec(spec);spec.loader.exec_module(G) +from vendor.source376.two_alias import inside,meet + +def shared(signed,plans): + base=copy.deepcopy(signed);rows=G.replay(base) + hits=[g for g in base['B']if g==['in',203,201,[[491,1,2]]]] + assert len(hits)==1 and len(base['frames'][203])==8 and len(base['frames'][942])==7 + hits[0][1]=942;G.rehist_and_audit(base) + assert G.replay(base)==rows and exact.rawmap(base)==exact.rawmap(signed) + first=G.first_frames(base);c=copy.deepcopy(base);removed={556,577} + def mapped(r): + assert r not in removed + return r-sum(d0 else-1,b]]]for _ in range(abs(a))) + c['A']=unit+base['A'];c['ext']=sorted([p,f]for f,p,coef in selected) + transitions=G.rehist_and_audit(c);actual=G.replay(c) + for t in range(240+c['R']): + wanted=dict(rows[t]) + for f,p,coef in selected: + value=wanted.get(p,Q(0))+sum(a*rows[t].get(r,Q(0))for r,a in coef.items()) + if value:wanted[p]=value + else:wanted.pop(p,None) + assert actual[t]==wanted + assert all(p not in actual[t]for f,p,coef in selected for t in range(120,240)) + mass=sum(len(c['frames'][f])for f,p,coef in selected) + assert (len(selected),mass,len(unit))==(192,350,496) + for i in(0,len(unit)//2,len(unit)-1): + bad=copy.deepcopy(c);bad['A'].pop(i) + assert G.replay(bad)!=actual + report=dict(gauges=len(selected),entrance_rankmass=mass,unit_entrance_gates=len(unit),nested_transitions=transitions,raw_columns=240+c['R'],removed_original_helpers=sorted(removed),omission_controls=3,retimed_frame_control=exact.rawmap(base)==exact.rawmap(signed),excluded_composition='PR404 overlapping target125/124 recovery is incompatible with the R779 prefix input and is not imported.') + return c,base,report + +def build(signed): + """Fixed checker-clean repivots, enlargements and ordered promotions. + + Four shared-donor repivots and two sequential repivots are from PR412. + Eight entrance enlargements originate in PR410; the four ordered groups + originate in PR409. Their actual composition is rebuilt on our R779 word. + """ + src=ROOT/'vendor/source412' + spec=importlib.util.spec_from_file_location('pinned407_repivot',src/'repivot.py') + rp=importlib.util.module_from_spec(spec);spec.loader.exec_module(rp) + text=(src/'seqenlarge.py').read_text(encoding='utf-8');scope={'copy':copy,'Q':Q} + a=text.index('def enlarge(');b=text.index('\nPROM760',a) + exec(compile(text[a:b],str(src/'seqenlarge.py'),'exec'),scope) + a=text.index('def repivot_rows(') + exec(compile(text[a:],str(src/'seqenlarge.py'),'exec'),scope) + plans=exact.read(ROOT/'vendor/source404/selection194.json') + for e in exact.read(src/'repivot-e8.json')['swaps']: + plans=rp.swap(plans,e['plan'],e['out'],e['into']) + plans=scope['enlarge'](plans,exact.read(src/'pr410/enlarged205.json')['changes'],{1020:1001}) + rp.check_global(plans) + c,base,report=shared(signed,plans);prior=copy.deepcopy(c) + selection=exact.read(src/'pr409/SELECTION.json') + for e in exact.read(src/'repivot-e8seq.json')['swaps']: + i=next(i for i,p in enumerate(selection)if p['vector']==e['plan_vector']) + pivots=sorted(e['into']if p['pivot']==e['out']else p['pivot']for p in selection[i]['pivots']) + selection[i]=scope['repivot_rows'](selection[i],pivots) + assert selection[i]is not None + removed={556,577} + def mapped(r): + assert r not in removed + return r-sum(d0 else-1,q.denominator]]]for _ in range(abs(q.numerator))) + used|=roles + c['A']=prefix+c['A'];c['ext']=sorted([p,f]for p,f in ext.items());G.rehist_and_audit(c) + actual,retained=exact.rawmap(c);before,ret=exact.rawmap(prior) + wanted=copy.deepcopy(before);wanted_ret=copy.deepcopy(ret) + for g in reversed(prefix): + _,f,d,((p,a,b),)=g;q=Q(a,b) + for row in wanted+list(wanted_ret.values()): + z=row.get(p,Q(0))+q*row.get(d,Q(0)) + if z:row[p]=z + else:row.pop(p,None) + assert (actual,retained)==(wanted,wanted_ret) + assert all(p not in actual[t]for p in ext for t in range(120,240)) + head=c['A'][:len(c['A'])-len(base['A'])];written=set() + for g in head: + (p,a,b),=g[3];assert p not in written;written.add(g[2]) + mass=sum(len(c['frames'][f])for f in ext.values()) + assert (len(ext),mass,len(head),len(prefix))==(202,360,551,55) + # Preserve both unchanged legacy checker families, including the sixths + # denominator guard that requires re-pivoting the half-valued donor. + for name in ('gx','gxcore'): + path=ROOT.parent/'e8-coupled-bit-retiming/vendor/source384/complex/gx'/(name+'.py') + spec=importlib.util.spec_from_file_location('strict_entrance_'+name,path) + checker=importlib.util.module_from_spec(spec);spec.loader.exec_module(checker) + if name=='gx':checker.check1(c) + else:checker.mirror(checker.normal(c),batches=16) + report.update(gauges=len(ext),entrance_rankmass=mass,unit_entrance_gates=len(head),sequential_prefix_gates=len(prefix),chronological_source_read_before_write=True,unchanged_gx_and_gxcore='PASS') + return c,base,report diff --git a/research/e8-clean-reuse-extension/inline.py b/research/e8-clean-reuse-extension/inline.py new file mode 100644 index 0000000000..f96e115f67 --- /dev/null +++ b/research/e8-clean-reuse-extension/inline.py @@ -0,0 +1,119 @@ +"""Novel-stream experiment: exact helper inlining with paid frame repair. + +This is a search, not a verified exponent. Starts from frozen Sussman/Chafik +E8, uses applecrusher's echelon frame repair, and screens short nonconstant +linear substitutions independently of the two published equal-value aliases. +""" +import argparse, copy, gzip, json, math, pathlib, sys, time +from collections import Counter, defaultdict +from fractions import Fraction as Q +from functools import lru_cache + +HERE=pathlib.Path(__file__).resolve().parent +sys.path.insert(0,str(HERE/'vendor/source376')) +from two_alias import canon, inside, join + +@lru_cache(None) +def meet(a,b): + vals=[0] + for x in a:vals += [y^x for y in vals] + return canon(x for x in vals if inside((x,),b)) + +def flatten(c): + ops=[] + for phase in ('A','B'): + for g in c[phase]: + assert g[0] in ('in','out') and (g[0]!='out' or not g[4]) + for r,a,b in g[3]: + d,s=(g[2],r) if g[0]=='in' else (r,g[2]) + ops.append((g[1],d,s,Q(a,b))) + if phase=='A':split=len(ops) + return ops,split + +def plus(dst,src,q): + dst=dict(dst) + for k,v in src.items(): + z=dst.get(k,Q(0))+q*v + if z:dst[k]=z + else:dst.pop(k,None) + return dst + +def proposals(c,max_terms): + ops,split=flatten(c);v=c['v'];n=2*v+c['R'] + writes=defaultdict(list);reads=defaultdict(list) + for i,(f,d,s,q) in enumerate(ops):writes[d].append(i);reads[s].append(i) + protected={r for _,r,_ in c['ret']} + plans={} + for r in range(2*v,n): + if r in protected or not writes[r] or not reads[r]:continue + if max(writes[r])>=min(reads[r]):continue + terms=Counter() + for i in writes[r]: + _,d,s,q=ops[i];terms[s]+=q + terms={s:q for s,q in terms.items()if q} + if not 1<=len(terms)<=max_terms or r in terms:continue + if any(s<2*v for s in terms):continue + plans[r]=terms + vals=[{r:Q(1)}if rold and Q(expected['absolute_gain'])==k-old + assert Q(expected['bit_reuse_kappa_gain'])>0 and expected['conditional'] + assert Q(expected['fair_old_bit_kappa'])+Q(expected['bit_reuse_kappa_gain'])==k + assert Q(expected['bit_coarse'])>Q(expected['complex_coarse']) + with localcontext()as ctx:ctx.prec=70;decimal=format(Decimal(k.numerator)/Decimal(k.denominator),'f') + assert decimal in(REPO/'README.md').read_text(encoding='utf-8') + return dict(format='conditional-candidate-record/1',date='2026-10-11',contributor='ai-nanachi',assistance='Substantial OpenAI Codex assistance',review_status='Pending maintainer review',scope='Finite conditional witness. Full theorem, all-size compiler, recursive supplier, compressed Clifford windows, dirty banking/cover, restored-row, routing, fixed tape, precision/recovery and analytic interfaces remain assumed.',package='research/e8-clean-reuse-extension',verification='make e8-clean-reuse-verify',manifest_sha256=hashlib.sha256((ROOT/'MANIFEST.json').read_bytes()).hexdigest(),source_pins_sha256=hashlib.sha256((ROOT/'SOURCE-PINS.json').read_bytes()).hexdigest(),upstream_main='12a4934d15006e8c10f9b2264f13f8f341be802b',prior_pr389_commit='b3c45822ca847aec8c0c019bb04db30881fc2966',kappa_decimal=decimal,**expected) +if __name__=='__main__': + if sys.flags.optimize:raise SystemExit('Assertions must remain enabled') + ap=argparse.ArgumentParser();ap.add_argument('--write',action='store_true');a=ap.parse_args();result=record() + if a.write:DESTINATION.write_text(json.dumps(result,indent=2,sort_keys=True)+'\n',encoding='utf-8',newline='\n') + else:assert json.loads(DESTINATION.read_text(encoding='utf-8'))==result,'Pending extension record is stale' + print('PASS pending extension record',result['kappa']) diff --git a/research/e8-clean-reuse-extension/requirements.txt b/research/e8-clean-reuse-extension/requirements.txt new file mode 100644 index 0000000000..28bf0cdef5 --- /dev/null +++ b/research/e8-clean-reuse-extension/requirements.txt @@ -0,0 +1,3 @@ +numpy==2.5.4 +mpmath==1.3.0 +sympy==1.14.0 diff --git a/research/e8-clean-reuse-extension/vendor/source376/LICENSE b/research/e8-clean-reuse-extension/vendor/source376/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source376/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/e8-clean-reuse-extension/vendor/source376/NOTICE.md b/research/e8-clean-reuse-extension/vendor/source376/NOTICE.md new file mode 100644 index 0000000000..b289ae650f --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source376/NOTICE.md @@ -0,0 +1,35 @@ +# Attribution and scope + +New helper-substitution reconstruction, deterministic frame repair, two nested +frame reductions, source-bound +integration and composition packaging were prepared with OpenAI Codex assistance. +Apache-2.0 applies to this package; every unchanged dependency retains its own +license, notice and assistance disclosures. Attribution does not imply endorsement. + +- Chafik Boukhalfa / chafreaky, with substantial Anthropic Claude assistance, + authored PR378's far-retimed complex E8 certificate, far-piece relocation and + regeneration, source-span/full-operator checks and related code. This package + starts from that exact certificate and does not claim its relocations as new. + PR378 retains the earlier PR365/374 and retiming-lineage credits. +- Zhihao Chen, with OpenAI Codex assistance, authored PR377's compressed + nine-stage construction, exact Clifford and phase corrections, whole banks, + padding, finite template/invoice, independent decoder and proof argument. + The derived replay explicitly records its metadata adaptations. +- Jacob Sussman authored the E8 family, local complex unit, gx/gxcore, Lean + framework, generators and replay. His source and notices remain in both + pinned upstream packages. DaysSky's PR352/363/373/375 integrations and + halving-degree-two work retain their inherited credit and Claude disclosures. +- Dylan Crow / utcorvusvolat-dotcom, with Anthropic Claude assistance, supplied + the E8 bit word and checking tools. The frozen PR376 R822 frame/helper work and + unsplit bit extension, prepared with OpenAI Codex assistance, remain unchanged. +- The baseline notices preserve Rohan Arun's cascading-retiming contribution; + DreamingOfClouds, eumemic and the PR315/144/23 outer/finite lineage; Henry Grant's + construction on Sussman's architecture; Evan McKinney's completed banks; + Chafik Boukhalfa's bit infrastructure; and all earlier contributors. + +See the exact upstream commits/manifests in `SOURCE.json`, PR378's `NOTICE.md`, +PR377's nested `work/native358/vendor/complex-reserve/` notices, and the frozen +baseline notice chain. This package claims the two helper substitutions, two nested frame reductions and +their verified integration/composition, not the upstream local words, far +relocations, nine-stage architecture, a new Lean theorem or an unconditional +integer-multiplication result. diff --git a/research/e8-clean-reuse-extension/vendor/source376/candidate_frames.py b/research/e8-clean-reuse-extension/vendor/source376/candidate_frames.py new file mode 100644 index 0000000000..6e052aa1ec --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source376/candidate_frames.py @@ -0,0 +1,34 @@ +"""Two fixed nested-frame reductions after the pinned PR378/two-helper chain. +No scalar coefficients, operations, order, copied totals or boundary frames change. +Prepared with OpenAI Codex assistance. PR378 and inherited notices apply. +""" +import copy,json +from collections import Counter +from hashlib import sha256 +import candidate_from378,two_alias +FINAL='3df4c637c69840d53a0137eadbe16e25add617984bbe4da099d059f026192f1e' +def build(raw): + c=json.loads(candidate_from378.build(raw));old=copy.deepcopy(c) + assert sha256(json.dumps(c,sort_keys=True,separators=(',',':')).encode()).hexdigest()==candidate_from378.FINAL + for index,before,after in [(343,663,949),(369,676,948)]: + assert c['B'][index][1]==before + assert (len(c['frames'][before]),len(c['frames'][after]))==(6,5) + c['B'][index][1]=after + assert all(g[:1]+g[2:]==z[:1]+z[2:]for g,z in zip(c['A']+c['B'],old['A']+old['B'])) + cur=list(c['start']);H={k:Counter()for k in 'xysc'} + def climb(r,f): + assert two_alias.inside(tuple(c['frames'][cur[r]]),tuple(c['frames'][f])) + d=len(c['frames'][f])-len(c['frames'][cur[r]]) + if d:H['x'if r>k&1:x^=b[k] + if x: + k=x.bit_length()-1 + for j in list(b): + if b[j]>>k&1:b[j]^=x + b[k]=x + return tuple(b[k]for k in sorted(b,reverse=True)) +def inside(a,b): + for x in a: + for y in b: + if x>>(y.bit_length()-1)&1:x^=y + if x:return False + return True +def join(a,b):return canon(a+b) +def meet(a,b): + vals=[0] + for x in a:vals += [y^x for y in vals] + return canon(x for x in vals if inside((x,),b)) + +def build(c, drop=DROP, use=USE): + DROP,USE=drop,use + assert c['format']=='gcert/1' and (c['h'],c['v'])==(9,120) and c['R']in(783,782) + v=c['v'];n=2*v+c['R'];ops=[] + assert DROP!=USE and 2*v<=DROPcut or t!=target:continue + key=s,ve,f + if key not in rows:rows[key]=[Q(0),gi] + rows[key][0]+=scale*q + jp=[x for x in flat if nA<=x[0]<=cut and x[1]==j];assert len(jp)>=e['prefix_target_deliveries'] and jp[-1][0]==cut and jp[-1][3]==E + for (s,ve,f),(q,gi) in rows.items(): + if not q:continue + assert q.denominator in (1,2,3,6) + for _ in range(abs(q.numerator)):addat[gi].append(['in',f,i,[[s,1 if q>0 else -1,q.denominator]]]) + addat[cut].append(['in',E,i,[[j,lam.numerator,lam.denominator]]]) + B=list(setups) + for bi,g in enumerate(c['B']): + gi=nA+bi;g=copy.deepcopy(g) + if g[0]=='out':g[3]=[z for z in g[3] if z[0] not in destcuts or gi>destcuts[z[0]]];B.append(g) + elif g[2] in destcuts and gi<=destcuts[g[2]]:B.extend(['out',g[1],s,[],[]] for s,_,_ in g[3]) + else:B.append(g) + B.extend(addat.get(gi,[])) + d['B']=B;d['derived_from']=c['derived_from']+' | '+str(len(selection))+' exact signed disjoint target-prefix shears' + return up.rehist(d) +def emit(out): + out=Path(out);out.mkdir(parents=True,exist_ok=False) + c=json.loads(gzip.decompress((up.BASE/'data/gcert1-e8-r783-far.json.gz').read_bytes())) + selection=json.loads((ROOT/'SELECTION.json').read_text());d=transform(c,selection) + original=up.signed_rows(c);assert original==up.signed_rows(d) + ablated=transform(c,[]);assert all(ablated[k]==c[k] for k in ['A','B','blocks']) + controls=[];at=next(i for i,e in enumerate(selection) if Q(e['coefficient'])<0);entry=selection[at] + bad=copy.deepcopy(d);bad['B'].pop(at);assert up.signed_rows(bad)!=original;controls.append('signed setup omitted') + restoration=['in',entry['recovery_frame'],entry['destination'],[[entry['donor_target'],-1,1]]] + k=next(i for i,g in enumerate(d['B']) if g==restoration) + bad=copy.deepcopy(d);bad['B'].pop(k);assert up.signed_rows(bad)!=original;controls.append('signed restoration omitted') + bad=copy.deepcopy(d);bad['B'][k][3][0][1]=1;assert up.signed_rows(bad)!=original;controls.append('signed restoration sign reversed') + bad=copy.deepcopy(selection);bad[1]['destination']=bad[0]['destination'] + try:transform(c,bad) + except AssertionError:controls.append('overlapping targets rejected') + else:raise AssertionError('overlapping targets accepted') + def hist(z): + h=Counter() + for block in z['blocks'].values():h.update({int(k):n for k,n in block.items()}) + return h + old,new=hist(c),hist(d);delta={k:new[k]-old[k] for k in new.keys()|old.keys() if new[k]!=old[k]} + predicted=Counter() + for e in selection: + for k,n in e['histogram_delta'].items():predicted[int(k)]+=n + assert delta=={k:n for k,n in predicted.items() if n} and sum(k*n for k,n in delta.items())==0 + oldcert=json.loads(gzip.decompress((SOURCE/'data/prefix18.json.gz').read_bytes()));audit=json.loads((SOURCE/'data/sink-audit.json').read_text()) + oldgroups=oldcert['A']+oldcert['B'];groups=d['A']+d['B'] + for e in audit['accepted']: + matches=[i for i,g in enumerate(groups) if g==oldgroups[e['cut_group']]];assert len(matches)==1;e['cut_group']=matches[0] + data=json.dumps(d,sort_keys=True,separators=(',',':')).encode();(out/'candidate.json').write_bytes(data);(out/'candidate.json.gz').write_bytes(gzip.compress(data,mtime=0));(out/'sink-audit.json').write_text(json.dumps(audit,indent=2)+'\n') + result=dict(status='PASS_SIGNED_PREFIX_RAW_OPERATOR_AND_CONTROLS',pairs=len(selection),all_initial_columns=len(original),histogram_delta=delta,negative_controls=controls,ablation=True,candidate_sha256=hashlib.sha256(data).hexdigest(),sink_cuts=[e['cut_group'] for e in audit['accepted']]) + assert result['candidate_sha256']==json.loads((ROOT/'EXPECTED-DISCOVERY.json').read_text())['candidate_sha256'] + (out/'RESULT.json').write_text(json.dumps(result,indent=2)+'\n');return result +if __name__=='__main__':print(json.dumps(emit(sys.argv[1]),indent=2)) diff --git a/research/e8-clean-reuse-extension/vendor/source401/LICENSE b/research/e8-clean-reuse-extension/vendor/source401/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/e8-clean-reuse-extension/vendor/source401/MANIFEST.json b/research/e8-clean-reuse-extension/vendor/source401/MANIFEST.json new file mode 100644 index 0000000000..cd655ee5b8 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/MANIFEST.json @@ -0,0 +1,140 @@ +{ + "algorithm": "SHA-256", + "files": { + "architecture/audit.py": "c69bd2ac387a944ffa33bb9660f7ee407ca75648ec937217851780333df28f22", + "architecture/banks.py": "7a8d81894dd7c35f05122bca19c5fc30f04ddf0dc4f2c8d73e334cdd3b64e396", + "architecture/bridge.py": "92456fe1df26f51233fa5f8b96c1f8dd6118df3f3b385654c26de8c205db6bb0", + "architecture/deps/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "architecture/inputs/BANK-PATTERNS.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "architecture/inputs/DATA-PHASES.json": "47225c2ce696432aa9df6f422ae784aaa91bef651757f4266d0ea4edbff74694", + "architecture/inputs/GLOBAL-TEMPLATE.json.gz": "19185edd2837894f97dd962e8cebdcb12e46ec85b8f0146405840ee8eddd79f5", + "architecture/phase-replay.cpp": "b3f44ae97d191df8f11024cef3bd0fd1a92f543f45183557db546c43cc6d4674", + "architecture/phase.py": "be98c242c194674b35ece6b2254605ba0a04d51a0d13933ff86c84240b3f957a", + "architecture/SUFFICIENT.md": "1c9b41de1015196b608dbbe17fdcab692ac78249b585f4579dfe13676b8faa5f", + "code/bit-compose-replay.py": "553f29567694069526dd317f2c42ef4a235efbcec2d639c1692dcae50647ce04", + "code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "code/outer.py": "1db8744f85e87cfaa5e2b3696d7f89a2972c668365318a7cb1b6695c537467ee", + "frames/PROOF.md": "01e721550cbee2d58681bcd2b561b1f8d5e2e422dc7a630cb99d62505166beb8", + "frames/README.md": "6592f3191538dff5233c7b4613848f750e3e645ab0956a20ca93b9f6d0775a4f", + "frames/reconstruct.py": "726b3404aacf86b2515027622102d1a3075e82e1fbeb477f9d6aa438bb9baee3", + "frames/selection.json": "17b7959402af929e2b24d2d1b285f84d6cf51a90cd077eb0fca9b4f5f7bf1d76", + "inherited/BASE-MANIFEST.json": "01663bf06edadded13027713c49b5764fb0db8161bdf0b38320328e0fc428359", + "inherited/BASE-REPLAY.json": "7c323c0abfad726178ac36c69604b6825049c194715d1ea621f1b86a99a72e1d", + "inherited/BASE-VALIDATION.json": "dea88d4f6e201abec078505ded8d08a85fd6492d8c60874feb9113589f887157", + "inherited/BIT-COMPOSITION-RECEIPT.json": "453cb782369596c1086d98eab7931ff4a48046e71005a749d48e693431a50bbe", + "inherited/BIT-REUSE.json": "17dfc693af28f4ba639eb1145610f6f88b799efae49cc3a6a0fba886a3e0e35c", + "inherited/complex-reserve-notice.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "inherited/e8-notice.txt": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "inherited/helper-notice.md": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "inherited/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "inherited/NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "inherited/outer-notice.md": "eb15ca83343fadc44f184513680aaaca34d447e04f5929c30054afb205732ddc", + "inherited/pr352-notice.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "inherited/sussman-notice.txt": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "inputs/bank-patterns.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "inputs/candidate781.json": "a4e42aa1663f5ad0da48cee6fe8514b205e43cf6e791b80674dbc7506a098a32", + "inputs/helper781.json": "3df4c637c69840d53a0137eadbe16e25add617984bbe4da099d059f026192f1e", + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "local/ANCESTRY-NOTICE.md": "66997993ef97c9c185b2b96b9bc0f67ee297f01cc79da6f4b7e7077b3a601e6a", + "local/deps/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "local/deps/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "local/deps/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "local/deps/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "local/deps/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "local/deps/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "local/local_admit.py": "bb6e0f228e841bb0dfa61accae6478e3ddf153e414bc353f2f48ca4e9c7cc9b3", + "local/MANIFEST.json": "3244b88da8f5b1582a777319d9a92b7bf317c41ae76215f9a191fb39b2a9e218", + "local/prior-phase/CLIFFORD-RECIPES.json": "356211a16d179c8b4d37d0bc5d038b55b4d0397242b119f7b83a583b7f766e1a", + "local/prior-phase/CLIFFORD-REVIEW.json": "0adf36a157af511c6b96a1a5c3c319061a7c9585b865f1289668c0f915fff641", + "local/prior-phase/SOURCE-REUSE.json": "e5e7b8c8dc2f6df47ab2b21e58299d4316d104bbf426146d948f16ba92ecd88c", + "local/README.md": "fb34710058552124798406167c0e3f2525cb665f9aa8d297329b3a4d1e295051", + "local/UPSTREAM-NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "NOTICE.md": "8e2a5c0d6a1a582f52bdfc421d7412eb3e84aef5460835c647ce55f5b8d2896d", + "PROOF.md": "94a8244d3211ef091d570735cee4521995691ecba7fd18ed05647745d58d24da", + "README.md": "912d7aec76f958142cacd2f647e9224e22f2909feb0430295ad5584f86451c67", + "requirements.txt": "f201db884fc05bd8fb9478402ec8394b7c71a6ae189e4e953c6f00a2b793ffa7", + "research-notes/AUXILIARY-PREWHITENING.md": "58024afc83867a99441c513c6852df7305c2423ae5601c73c2e22854e261ce43", + "research-notes/bank-patterns.cpp": "b7c16637602a6682b79f75dc7b0f069284b0cc21ba43b6b3c36f7fa9606f28ce", + "research-notes/bank-review.md": "23914f4771dc882f71683809b4d84dda7ae8b60bbb9c64ac8ec17816d71a3a24", + "research-notes/frames-gl3.cpp": "5ed6b2c0a654393c54552d26bd4c1c9cc07addb0d6c8ddd8e969e1ab9681dee5", + "research-notes/frames-NOTES.md": "e4bec2dab0e059df74d35870c1ca3435d4cd5fd021961b56253aea7f429d796b", + "research-notes/frames-response-search.cpp": "fa56a09e7b98465e0173a2bdd8e331dd8831dead7f5397e2509586c386bcc321", + "research-notes/outer-and-dual-proof.md": "0312475a1c2426df57b4e4b655b0f29f13cb21ba8e7aab3d7a800ace37303a3a", + "research-notes/readout-SUMMARY.md": "974f59c965f1ae0fd89e2f87d1d6108f41a731535caa93638fe513daefa02165", + "research-notes/SEARCH.md": "ef66c6962ec287562d06cecb94d918d82279ec56a7112ecd578406f865084c27", + "RESULT.json": "466cb1aeb6ffde5fcebb019e5dd8e5549c1b24e25e74e5d32b82c56691b56c6e", + "VALIDATION.json": "316f09393038630b772e82669fb00963a14c8218a831d9b35c0f256543a4eb7e", + "VALIDATION.md": "e3bdad62dc0f4ef7c90b9fd650d3647d5b3eeef69473aa4caf4dc3cfba72dfa4", + "vendor/bit/code/bit/checkers/certify_bit_g.py": "c9a31508126f34e7ac95d802c39e8919a872cd705314de5bf3538de1636ce8ce", + "vendor/bit/code/bit/checkers/certify_bit_k.py": "e68a81ef7981a90d613752003cd5cab5351e260f909b094f1668d8a4dfe480df", + "vendor/bit/code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "vendor/bit/code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "vendor/bit/code/bit/checkers/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/bit/code/bit/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "vendor/bit/code/bit/checkers/finite_g.py": "a591d8caa9ab50a4c7ec6934c71c93fc18fd14680180b43071e8d9d704f7ac9a", + "vendor/bit/code/bit/checkers/finite_k.py": "7e67dc75e63a11e38ac6d6615656c7cf6982e5a33dd404d04b967bf474cad02e", + "vendor/bit/code/bit/checkers/geometry_g.py": "b9fa3cd05f36f5fcebfdebfb4a86fb90e92ed3c1d9157c52918ee8c5b563b54f", + "vendor/bit/code/bit/checkers/geometry_k.py": "646b7e8773d9c99376cb00627f109a97319e6d72b439ff513c39035c28c3f70f", + "vendor/bit/code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "vendor/bit/code/bit/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/bit/code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "vendor/bit/code/bit/checkers/tile_g.py": "8140eec180e42202f2c6a9f11f5c92885e60861c38a7611dd805c524e3438138", + "vendor/bit/code/bit/checkers/tile_k.py": "64255088821f601ede2c3006f08cb97c39a4fa10dbbeb93a8a71fcfa0e1d8d77", + "vendor/bit/code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "vendor/bit/code/bit/independent/centres_sat.py": "f69379968367544807db2f0cf14359977e56299383b3edcc4469ddea7c7ecb40", + "vendor/bit/code/bit/independent/checkword.py": "11bf9620ca9db16d52d9fe806b814fc9ec9a89c4d7645354d1861d96f6e805ad", + "vendor/bit/code/bit/independent/mutate.py": "0ff65aace5da4b57d96235bf830f8f11969322e75134d498aeb70e9753ec6b0d", + "vendor/bit/code/bit/mutate_records.py": "b0e75d6550412a7be4017695e6b237392b611bb852ad8ff309d6682c9f166a4e", + "vendor/bit/code/bit/producer/compile.py": "60fea6a9d6617a3f87376d3fda040642e9cb70e7c179015e03ede8d289f30357", + "vendor/bit/code/bit/producer/compile2.py": "0e23d4282ceb75768e82631da016aaff9818aec53c7d75a6b2a28ee1b1160dc3", + "vendor/bit/code/bit/producer/e8lib.py": "4f8a6843e83bc4f7055d7337f33dbe12ce499051f46bee1b81bbf6b34c652574", + "vendor/bit/code/bit/producer/frames.py": "ba71f77dd3e3c1c54f361c066cebe9faadbc78db46376046e7af625bf1de8c24", + "vendor/bit/code/bit/producer/fullword.py": "0daf87599e9e48646b985ad87351c56c1b73cfc99cdf9eca081483846ddbfa90", + "vendor/bit/code/bit/producer/ham1.py": "359040fb432fd392472af6b8f5dca0234dd6c2be744a791df27ba62bc5da5175", + "vendor/bit/code/bit/producer/ham2.py": "fdf0af785ce697bd7f80b4e75f7163735f3b599d9dc42f652f0ffdbdf18ea8bf", + "vendor/bit/code/bit/producer/params-r865.json": "1256c54debe0a551da8e24896ab73ef0bd4a5233ff8e6fedf21a9e6301d6e6f3", + "vendor/bit/code/bit/producer/price.py": "46c858e60ba0a117bf8227b864abf55e85ebee2d56a0dce64472b706499ac405", + "vendor/bit/code/bit/producer/search2.py": "4999c5d6bac9757e4236c45435201631eae21f644dc9543d8c0b6e3cc8360daf", + "vendor/bit/code/bit/receipts_e8.py": "935ea65d9c6739e868ccf1aa439bd3c246657dfc887e4a0222a8f0901a5b41a5", + "vendor/bit/code/bit/receipts_k.py": "67f714e10a846e9cc62996342f825cd715055031e0b12591abdafd225717e195", + "vendor/bit/code/bit/regression/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "vendor/bit/code/bit/regression/columns_h_pr346.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "vendor/bit/code/bit/regression/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/bit/code/bit/regression/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/bit/code/bit/regression/legality_h_pr346.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "vendor/bit/code/bit/regression/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "vendor/bit/code/bit/regression/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/bit/code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "vendor/bit/code/bit/regression/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "vendor/bit/code/complex/code/bridged.py": "5fe7174cd3a6580a74e4c1bf8fa7b426e8673f1c285603bf3076d4e758d70731", + "vendor/bit/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/bit/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/bit/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/bit/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/bit/data/bit/bitE8-r865.json.gz": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "vendor/cx/work/odd-stages/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "vendor/cx/work/odd-stages/data_phases.py": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "vendor/cx/work/odd-stages/global_nine.py": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "vendor/cx/work/odd-stages/RECIPE-9.json": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "vendor/cx/work/pr361/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/cx/work/pr361/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/cx/work/pr361/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/helper/candidate_frames.py": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "vendor/helper/candidate_from378.py": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "vendor/helper/two_alias.py": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "vendor/reuse/frame-selection.json": "a83d4880579fb1f8cffb701d1d685c157b7fa14ef9d6642e42ff1e4f5a1b8c5c", + "vendor/reuse/frame_replay.py": "6dc74f24323c717d9eff7c12f27c67a0531899e61a8ee340c98162b1e34f9531", + "vendor/reuse/reuse-selection.json": "0b300bab47cf0d69cbc7965bf01c2a27c96b97677ee651334470d8c968b603f1", + "vendor/reuse/reuse_replay.py": "e83251e3d49267fb5b53eda53c1be80118b7df0cc671c38cad1f300883cd1316", + "verify.py": "9a573069ef44ffa092ab638bbfa817cc2922c5a2827c7de0e71138b6cf9c13ff" + } +} diff --git a/research/e8-clean-reuse-extension/vendor/source401/NOTICE.md b/research/e8-clean-reuse-extension/vendor/source401/NOTICE.md new file mode 100644 index 0000000000..b5e2b1894a --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/NOTICE.md @@ -0,0 +1,17 @@ +# Sources, direct inspirations and attribution + +All PR links below refer to CrocSwap/integer-mult-bounds. Upstream author and license notices in bundled source are retained. No submitter name, email or credentials are included intentionally. + +- [PR398](https://github.com/CrocSwap/integer-mult-bounds/pull/398), head `c3251c8f33fac9332fb3606c2dc0bd4f32de4615`: the exact R781 signed-prefix input used here, including its 25 target-prefix rewrites and unchanged phase receipts. +- [PR396](https://github.com/CrocSwap/integer-mult-bounds/pull/396), head `b7d56cd87f8e97c3c28cb150dc89995490ba6a0c`: entrance response-kernel gauges and the odd rank-one complement mechanism directly motivate the new entrance-space route. The contribution here is synthesis of larger/even/degenerate spaces, phase-correct two-sided normalization and their actual mixed-rank realization, not a claim to have invented response kernels. +- [PR376](https://github.com/CrocSwap/integer-mult-bounds/pull/376): R781 helper substitutions, frame repairs and bit lifetime reuse. The inherited baseline in PR398 uses its pinned `b07cf2f3fdffcbccca86c88a0c33b32dfce4bfe9` lineage. Latest reviewed head in this sweep is `2205b0973440091770ae2354377d2be8b1ed8790`; that newer head is not silently substituted into the input. +- [PR378](https://github.com/CrocSwap/integer-mult-bounds/pull/378): the far-retimed R783 ancestry (including PR365/374) of the R781 source. +- [PR377](https://github.com/CrocSwap/integer-mult-bounds/pull/377): compressed nine-stage E8 geometry, exact Clifford representatives, routes and finite invoice framework. +- [PR381](https://github.com/CrocSwap/integer-mult-bounds/pull/381): the unsplit nine-stage bit assembly, exact local checkers, paid moments and degree-two halving bridge. +- [PR390](https://github.com/CrocSwap/integer-mult-bounds/pull/390): positive-prefix restoration and full dirty-column replay, extended to signed prefixes in PR398. +- [PR387](https://github.com/CrocSwap/integer-mult-bounds/pull/387), [PR392](https://github.com/CrocSwap/integer-mult-bounds/pull/392), and [PR185](https://github.com/CrocSwap/integer-mult-bounds/pull/185): six-level ordinary bootstrap and slack refinement used in the final assembly. +- [PR384](https://github.com/CrocSwap/integer-mult-bounds/pull/384): carries the exact outer engine used by PR387. Engine ancestry includes PR315, PR144 and PR23; original headers and notices remain. + +PR394/395 and [PR399](https://github.com/CrocSwap/integer-mult-bounds/pull/399) were reviewed for the free-sink/prewhitening/padding-fusion route. PR399 at `b974e481efd2f771cda2dcdd71c91f133793558f` is the frozen public benchmark. Its different cleanup bracket is NOT combined with this construction and its gain is not added. PR397 supplies a conditional Lean bridge, not the new finite witness here. + +Essential supplier/compiler ancestry also includes PR352, PR363, PR373, PR370, PR375, PR266 and PR234. This package does not claim global optimality or literature-wide novelty. It reports a new finite witness and an explicit sufficient construction relative to the frozen inputs. diff --git a/research/e8-clean-reuse-extension/vendor/source401/PROOF.md b/research/e8-clean-reuse-extension/vendor/source401/PROOF.md new file mode 100644 index 0000000000..c8ae460edf --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/PROOF.md @@ -0,0 +1,29 @@ +# Sufficient construction and complete cost composition + +## Response-space synthesis + +Let K be the final target-by-helper response of the complete raw local word. Each selected pivot p has explicit rational coefficients satisfying K_p + sum_d c_pd K_d = 0. The entrance additions h_d += c_pd h_p therefore make its response identically zero. The groups have disjoint pivot/donor role sets; no pivot is a donor. Their shear matrix is S = I + N with N squared zero. Reconstructing every column verifies M_new = M_old diag(I,I,S), not merely agreement on clean inputs. + +The fixed witness contains 119 pivots, 143 donors, 26 new F2 subspaces, and 240 literal unit-numerator gates with denominator 1 or 2. Each entrance lies in the first required frame of every involved helper. All 4,082 frame transitions are checked nested. Entrance dimensions sum to 265; the local histogram delta is {1:+169,2:+91,3:-43,4:+15,5:+10,6:-96,7:-3}, with rank-mass delta -265. Old response, cleanup, retained-centre work, literal scalar expansion and endpoint adapters remain charged. + +## Arbitrary entrance spaces without an orthogonal-complement assumption + +For entrance E, its actual phase-sensitive chart is T_E, not an assumed coordinate or orthogonal chart. The exposed helper residual is J_E = F T_E^-1. Exact Clifford lowering gives J_E = L C_(9-dim E) R, with explicit rank-zero monomial unitaries L,R. Surround the COMPLETE dirty invocation by R^-1 before old response and L^-1 after cleanup. The local endpoint is block diagonal with the gauged helper independently restored, so the new residual is exactly C_(9-dim E), while the data is unchanged. + +Zero response alone would not justify this wrapper. The local checker separately establishes the needed block-diagonal endpoint on every dirty column with a distinct symbolic entrance token for each E, in both orientations. The Gaussian checker verifies the exact phase of every address column. Neither adapter is commuted through internal scalar gates. Chronological inverse-adjoint is multiplicative and fixes unitary address adapters; the same physical wrapper is valid in the backward convention. See `frames/PROOF.md` for the full argument. + +## Explicit heterogeneous banks + +Eight replicas per stage produce residual inventory {4:120,5:208,7:64,8:560,9:5296}. The fixed integer patterns place all 6,248 residuals into 748 banks of width 73. Coordinate slots are disjoint and cover every bank after padding: 482 rank-one pads and one rank-ten pad per stage. Every helper has an explicit coordinate permutation and its literal inverse owner route. There are nine stages and 72 complete local invocations. + +The template emits both boundary adapters for each gauged helper in each invocation: 17,136 explicit rank-zero adapters. Private centre, tableau and coefficient namespaces are separated. The inherited data-stage/idle chronology and cover corrections are retained, with all bank family indices, padding and final translations rebuilt for the new stock. Independent readback checks the emitted assignments, profiles and finite cost bounds. + +Live stock is 14,412, physical stock 15,203, paid child count 316,107, maximum child rank 48, and deficit 73*14,412 - rank_mass = 2,496. The finite invoice includes scalar expansion, all boundary/routing adapters, old-response/cleanup work, padding, cover correction and private workspace. No gain is obtained by omitting a charged child or treating an unimplemented route as free. + +## Conditional exponent + +The actual emitted profile feeds two independent exact rational moment engines. The complex coarse lower bound is 507169363968149971159 / 500000000000000000000000, below the unchanged bit bound 255384852701747 / 250000000000000000. Six fixed ordinary bootstrap levels, eta=beta=10^-18 and a 10^-24 backoff feed all 47 strict outer inequalities. They give kappa = 101331088745971 / 100000000000000000. + +The conclusion is conditional on the inherited all-size compressed-window lift, arbitrary correlated dirty-bank semantics, recursive compiler, ordinary-call/fixed-tape/restored-row, precision and analytic contracts stated by the inherited assembly. Finite column, phase, template and inequality checks do not prove those all-size interfaces. This document supplies a sufficient composition for the changed finite witness and its conditional price, not an unconditional integer-multiplication theorem or Lean certification. + +The public PR399 padding-fusion bracket is different and is not applied here. No independent gains are added. Discovery solver objectives nominate witnesses; exact reconstruction, integer packing and final pricing establish the reported finite result. No bounded search establishes optimality. diff --git a/research/e8-clean-reuse-extension/vendor/source401/README.md b/research/e8-clean-reuse-extension/vendor/source401/README.md new file mode 100644 index 0000000000..1f1cca7a44 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/README.md @@ -0,0 +1,23 @@ +# Synthesized response subspaces and two-sided dirty-bank normalization + +**Conditional exponent saving: kappa = 101331088745971 / 100000000000000000 = 0.001013310887459710.** + +The frozen comparison is PR399 at `b974e481efd2f771cda2dcdd71c91f133793558f`, claiming 0.001002661106042177. This construction improves that value by approximately **1.06215%**. The source sweep is frozen through PR399; no claim is made against later submissions. + +The changed complex supplier synthesizes 26 entrance subspaces of dimensions 1, 2, 4 and 5, eliminates 119 helper response columns with 240 exact entrance shears, and packs the resulting mixed residual ranks into 748 banks per stage. Unlike the earlier odd rank-one orthogonal-complement route, an explicit two-sided Clifford normalization handles even and degenerate entrance spaces as well. Both boundary adapters are emitted and charged. The bit supplier is unchanged and remains above the complex bound. + +This is a **finite conditional construction**, not an unconditional multiplication theorem or a Lean certificate. The inherited all-size compressed-window, arbitrary-correlated dirty-bank, recursive compiler, precision, fixed-tape/restored-row and analytic interfaces remain assumptions. See `PROOF.md`, `frames/PROOF.md`, and the bundled outer proof. + +## Reproduce offline + +Use Python 3.11 or later and a GCC/Clang C++17 compiler. The default changed-composition replay uses Python standard-library modules; bundled dependencies and Boost headers are required only for the optional unchanged bit replay. From any directory: + +```sh +python -B verify.py /absolute/path/to/a-new-output-directory +``` + +Set `CXX` when required. Use `--replay-bit` and, if needed, `BOOST_INCLUDE` to freshly replay the unchanged bit component; the default checks its source-bound prior receipt. The output directory must be new and outside the package. Do not run Python with `-O`. Source dependencies are bundled; there is no network access or discovery search in the replay. + +The runner reconstructs the exact candidate, checks all dirty columns and both local orientations, checks every new/reflected Clifford edge and all 13,312 residual address columns, emits and independently decodes the new bank template and cost invoice, then checks the exact moments and 47 outer inequalities. Unchanged local phase receipts are source-bound and expressly reused. This is verification of the changed composition, not a replay of other public PR pipelines. + +`RESULT.json` in the output directory is the final replay receipt. The package manifest covers every uploaded file. Research notes retain bounded searches and sufficient identities that contribute no additional priced gain. diff --git a/research/e8-clean-reuse-extension/vendor/source401/RESULT.json b/research/e8-clean-reuse-extension/vendor/source401/RESULT.json new file mode 100644 index 0000000000..fa8bd211fe --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/RESULT.json @@ -0,0 +1,11 @@ +{ + "status": "PASS_RESPONSE_SUBSPACES_CONDITIONAL_COMPOSITION", + "kappa": "101331088745971/100000000000000000", + "kappa_decimal": "0.001013310887459710", + "complex_coarse": "507169363968149971159/500000000000000000000000", + "bit_coarse": "255384852701747/250000000000000000", + "candidate_sha256": "3b78069c4ce032e95f757a2f79fa5557af923c947430b638b0eb6859be659866", + "template_sha256": "888fb32cb5e4d2f4deff7b689d7afe6be514718667973e047fa0734492408708", + "bit_evidence": "unchanged source-bound prior finite receipt", + "scope": "Finite conditional changed composition. Inherited all-size window, correlated-bank, recursive compiler, ordinary-call/fixed-tape/restored-row, precision and analytic interfaces remain assumptions; no Lean or unconditional multiplication theorem." +} diff --git a/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.json b/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.json new file mode 100644 index 0000000000..63fd10bab9 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.json @@ -0,0 +1,221 @@ +{ + "status": "PASS_RESPONSE_SUBSPACES_CONDITIONAL_COMPOSITION", + "kappa": "101331088745971/100000000000000000", + "kappa_decimal": "0.001013310887459710", + "complex_coarse": "507169363968149971159/500000000000000000000000", + "bit_coarse": "255384852701747/250000000000000000", + "execution_checks": [ + { + "name": "reconstruct", + "seconds": 2.609, + "log_sha256": "7d3e3dafe6e1ce3af47e8e83f07776ac15c5fc036d610cd8f061dd08560992ea" + }, + { + "name": "local", + "seconds": 51.203, + "log_sha256": "a9949f268ede10060f6570a068083d8581dcaf94f1a27a5c377d27cb65389705" + }, + { + "name": "compile-phase", + "seconds": 4.484, + "log_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "name": "phase", + "seconds": 4.141, + "log_sha256": "f655c282eca00c1d41fad3614185662bfefd2fcc9d53eec7c83b57365c8c2df2" + }, + { + "name": "banks", + "seconds": 10.688, + "log_sha256": "7502fd52762050cbd883e533362702ddbe63dc0863ef77f0333966d68520dd01" + }, + { + "name": "bank-audit", + "seconds": 25.218, + "log_sha256": "5f5b73839286aaf384860f9e3bd622d4e92759d3363856723e9424032e0dc31c" + }, + { + "name": "bridge", + "seconds": 0.125, + "log_sha256": "b765345b5c128f609f52082d40fa35b19349cac66b2e52aca37479d9d30cc33c" + }, + { + "name": "outer", + "seconds": 0.563, + "log_sha256": "9d758868d8527b728368d9e1f92159a816da6e50bed4fc29387aed559557a2cc" + } + ], + "execution_manifest_sha256": "0bc60d184004cf7f283e3d795d3ea94dae292a3a550cf9f613f523a1998974ef", + "executed_payload_sha256": { + "architecture/audit.py": "c69bd2ac387a944ffa33bb9660f7ee407ca75648ec937217851780333df28f22", + "architecture/banks.py": "7a8d81894dd7c35f05122bca19c5fc30f04ddf0dc4f2c8d73e334cdd3b64e396", + "architecture/bridge.py": "92456fe1df26f51233fa5f8b96c1f8dd6118df3f3b385654c26de8c205db6bb0", + "architecture/deps/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "architecture/inputs/BANK-PATTERNS.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "architecture/inputs/DATA-PHASES.json": "47225c2ce696432aa9df6f422ae784aaa91bef651757f4266d0ea4edbff74694", + "architecture/inputs/GLOBAL-TEMPLATE.json.gz": "19185edd2837894f97dd962e8cebdcb12e46ec85b8f0146405840ee8eddd79f5", + "architecture/phase-replay.cpp": "b3f44ae97d191df8f11024cef3bd0fd1a92f543f45183557db546c43cc6d4674", + "architecture/phase.py": "be98c242c194674b35ece6b2254605ba0a04d51a0d13933ff86c84240b3f957a", + "architecture/SUFFICIENT.md": "1c9b41de1015196b608dbbe17fdcab692ac78249b585f4579dfe13676b8faa5f", + "code/bit-compose-replay.py": "553f29567694069526dd317f2c42ef4a235efbcec2d639c1692dcae50647ce04", + "code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "code/outer.py": "1db8744f85e87cfaa5e2b3696d7f89a2972c668365318a7cb1b6695c537467ee", + "frames/PROOF.md": "01e721550cbee2d58681bcd2b561b1f8d5e2e422dc7a630cb99d62505166beb8", + "frames/README.md": "6592f3191538dff5233c7b4613848f750e3e645ab0956a20ca93b9f6d0775a4f", + "frames/reconstruct.py": "726b3404aacf86b2515027622102d1a3075e82e1fbeb477f9d6aa438bb9baee3", + "frames/selection.json": "17b7959402af929e2b24d2d1b285f84d6cf51a90cd077eb0fca9b4f5f7bf1d76", + "inherited/BASE-MANIFEST.json": "01663bf06edadded13027713c49b5764fb0db8161bdf0b38320328e0fc428359", + "inherited/BASE-REPLAY.json": "7c323c0abfad726178ac36c69604b6825049c194715d1ea621f1b86a99a72e1d", + "inherited/BASE-VALIDATION.json": "dea88d4f6e201abec078505ded8d08a85fd6492d8c60874feb9113589f887157", + "inherited/BIT-COMPOSITION-RECEIPT.json": "453cb782369596c1086d98eab7931ff4a48046e71005a749d48e693431a50bbe", + "inherited/BIT-REUSE.json": "17dfc693af28f4ba639eb1145610f6f88b799efae49cc3a6a0fba886a3e0e35c", + "inherited/complex-reserve-notice.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "inherited/e8-notice.txt": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "inherited/helper-notice.md": "604f9225eee50bc7bc5cb8bfd33c2598e700466278d03fa06cfbb74c2b8e0d8e", + "inherited/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "inherited/NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "inherited/outer-notice.md": "eb15ca83343fadc44f184513680aaaca34d447e04f5929c30054afb205732ddc", + "inherited/pr352-notice.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "inherited/sussman-notice.txt": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "inputs/bank-patterns.json": "5d29feadc8f6b4d946cfdf26455e4211e1213616ae033625e924d1ad30d61bae", + "inputs/candidate781.json": "a4e42aa1663f5ad0da48cee6fe8514b205e43cf6e791b80674dbc7506a098a32", + "inputs/helper781.json": "3df4c637c69840d53a0137eadbe16e25add617984bbe4da099d059f026192f1e", + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "local/ANCESTRY-NOTICE.md": "66997993ef97c9c185b2b96b9bc0f67ee297f01cc79da6f4b7e7077b3a601e6a", + "local/deps/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "local/deps/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "local/deps/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "local/deps/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "local/deps/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "local/deps/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "local/local_admit.py": "bb6e0f228e841bb0dfa61accae6478e3ddf153e414bc353f2f48ca4e9c7cc9b3", + "local/MANIFEST.json": "3244b88da8f5b1582a777319d9a92b7bf317c41ae76215f9a191fb39b2a9e218", + "local/prior-phase/CLIFFORD-RECIPES.json": "356211a16d179c8b4d37d0bc5d038b55b4d0397242b119f7b83a583b7f766e1a", + "local/prior-phase/CLIFFORD-REVIEW.json": "0adf36a157af511c6b96a1a5c3c319061a7c9585b865f1289668c0f915fff641", + "local/prior-phase/SOURCE-REUSE.json": "e5e7b8c8dc2f6df47ab2b21e58299d4316d104bbf426146d948f16ba92ecd88c", + "local/README.md": "fb34710058552124798406167c0e3f2525cb665f9aa8d297329b3a4d1e295051", + "local/UPSTREAM-NOTICE.md": "9d8ba00681a08f4f6e2d2fef828c9837763a5ea534dca198b5b82ca8a0fc3662", + "NOTICE.md": "8e2a5c0d6a1a582f52bdfc421d7412eb3e84aef5460835c647ce55f5b8d2896d", + "PROOF.md": "94a8244d3211ef091d570735cee4521995691ecba7fd18ed05647745d58d24da", + "README.md": "912d7aec76f958142cacd2f647e9224e22f2909feb0430295ad5584f86451c67", + "requirements.txt": "f201db884fc05bd8fb9478402ec8394b7c71a6ae189e4e953c6f00a2b793ffa7", + "research-notes/AUXILIARY-PREWHITENING.md": "58024afc83867a99441c513c6852df7305c2423ae5601c73c2e22854e261ce43", + "research-notes/bank-patterns.cpp": "b7c16637602a6682b79f75dc7b0f069284b0cc21ba43b6b3c36f7fa9606f28ce", + "research-notes/bank-review.md": "23914f4771dc882f71683809b4d84dda7ae8b60bbb9c64ac8ec17816d71a3a24", + "research-notes/frames-gl3.cpp": "5ed6b2c0a654393c54552d26bd4c1c9cc07addb0d6c8ddd8e969e1ab9681dee5", + "research-notes/frames-NOTES.md": "e4bec2dab0e059df74d35870c1ca3435d4cd5fd021961b56253aea7f429d796b", + "research-notes/frames-response-search.cpp": "fa56a09e7b98465e0173a2bdd8e331dd8831dead7f5397e2509586c386bcc321", + "research-notes/outer-and-dual-proof.md": "0312475a1c2426df57b4e4b655b0f29f13cb21ba8e7aab3d7a800ace37303a3a", + "research-notes/readout-SUMMARY.md": "974f59c965f1ae0fd89e2f87d1d6108f41a731535caa93638fe513daefa02165", + "research-notes/SEARCH.md": "ef66c6962ec287562d06cecb94d918d82279ec56a7112ecd578406f865084c27", + "vendor/bit/code/bit/checkers/certify_bit_g.py": "c9a31508126f34e7ac95d802c39e8919a872cd705314de5bf3538de1636ce8ce", + "vendor/bit/code/bit/checkers/certify_bit_k.py": "e68a81ef7981a90d613752003cd5cab5351e260f909b094f1668d8a4dfe480df", + "vendor/bit/code/bit/checkers/columns_h.cpp": "d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce", + "vendor/bit/code/bit/checkers/columns_k.cpp": "1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2", + "vendor/bit/code/bit/checkers/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/bit/code/bit/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "vendor/bit/code/bit/checkers/finite_g.py": "a591d8caa9ab50a4c7ec6934c71c93fc18fd14680180b43071e8d9d704f7ac9a", + "vendor/bit/code/bit/checkers/finite_k.py": "7e67dc75e63a11e38ac6d6615656c7cf6982e5a33dd404d04b967bf474cad02e", + "vendor/bit/code/bit/checkers/geometry_g.py": "b9fa3cd05f36f5fcebfdebfb4a86fb90e92ed3c1d9157c52918ee8c5b563b54f", + "vendor/bit/code/bit/checkers/geometry_k.py": "646b7e8773d9c99376cb00627f109a97319e6d72b439ff513c39035c28c3f70f", + "vendor/bit/code/bit/checkers/gram_frames.py": "223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608", + "vendor/bit/code/bit/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/bit/code/bit/checkers/legality_h.cpp": "6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3", + "vendor/bit/code/bit/checkers/tile_g.py": "8140eec180e42202f2c6a9f11f5c92885e60861c38a7611dd805c524e3438138", + "vendor/bit/code/bit/checkers/tile_k.py": "64255088821f601ede2c3006f08cb97c39a4fa10dbbeb93a8a71fcfa0e1d8d77", + "vendor/bit/code/bit/export_records.py": "8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3", + "vendor/bit/code/bit/independent/centres_sat.py": "f69379968367544807db2f0cf14359977e56299383b3edcc4469ddea7c7ecb40", + "vendor/bit/code/bit/independent/checkword.py": "11bf9620ca9db16d52d9fe806b814fc9ec9a89c4d7645354d1861d96f6e805ad", + "vendor/bit/code/bit/independent/mutate.py": "0ff65aace5da4b57d96235bf830f8f11969322e75134d498aeb70e9753ec6b0d", + "vendor/bit/code/bit/mutate_records.py": "b0e75d6550412a7be4017695e6b237392b611bb852ad8ff309d6682c9f166a4e", + "vendor/bit/code/bit/producer/compile.py": "60fea6a9d6617a3f87376d3fda040642e9cb70e7c179015e03ede8d289f30357", + "vendor/bit/code/bit/producer/compile2.py": "0e23d4282ceb75768e82631da016aaff9818aec53c7d75a6b2a28ee1b1160dc3", + "vendor/bit/code/bit/producer/e8lib.py": "4f8a6843e83bc4f7055d7337f33dbe12ce499051f46bee1b81bbf6b34c652574", + "vendor/bit/code/bit/producer/frames.py": "ba71f77dd3e3c1c54f361c066cebe9faadbc78db46376046e7af625bf1de8c24", + "vendor/bit/code/bit/producer/fullword.py": "0daf87599e9e48646b985ad87351c56c1b73cfc99cdf9eca081483846ddbfa90", + "vendor/bit/code/bit/producer/ham1.py": "359040fb432fd392472af6b8f5dca0234dd6c2be744a791df27ba62bc5da5175", + "vendor/bit/code/bit/producer/ham2.py": "fdf0af785ce697bd7f80b4e75f7163735f3b599d9dc42f652f0ffdbdf18ea8bf", + "vendor/bit/code/bit/producer/params-r865.json": "1256c54debe0a551da8e24896ab73ef0bd4a5233ff8e6fedf21a9e6301d6e6f3", + "vendor/bit/code/bit/producer/price.py": "46c858e60ba0a117bf8227b864abf55e85ebee2d56a0dce64472b706499ac405", + "vendor/bit/code/bit/producer/search2.py": "4999c5d6bac9757e4236c45435201631eae21f644dc9543d8c0b6e3cc8360daf", + "vendor/bit/code/bit/receipts_e8.py": "935ea65d9c6739e868ccf1aa439bd3c246657dfc887e4a0222a8f0901a5b41a5", + "vendor/bit/code/bit/receipts_k.py": "67f714e10a846e9cc62996342f825cd715055031e0b12591abdafd225717e195", + "vendor/bit/code/bit/regression/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "vendor/bit/code/bit/regression/columns_h_pr346.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "vendor/bit/code/bit/regression/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "vendor/bit/code/bit/regression/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "vendor/bit/code/bit/regression/legality_h_pr346.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "vendor/bit/code/bit/regression/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "vendor/bit/code/bit/regression/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/bit/code/bit/regression/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "vendor/bit/code/bit/regression/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "vendor/bit/code/complex/code/bridged.py": "5fe7174cd3a6580a74e4c1bf8fa7b426e8673f1c285603bf3076d4e758d70731", + "vendor/bit/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/bit/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/bit/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/bit/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "vendor/bit/data/bit/bitE8-r865.json.gz": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "vendor/cx/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "vendor/cx/work/odd-stages/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "vendor/cx/work/odd-stages/data_phases.py": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "vendor/cx/work/odd-stages/global_nine.py": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "vendor/cx/work/odd-stages/RECIPE-9.json": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "vendor/cx/work/pr361/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "vendor/cx/work/pr361/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "vendor/cx/work/pr361/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "vendor/helper/candidate_frames.py": "2b8d10ff732e030eb643478b3da0a91753dc77314eeb882a51eafdb871d935e2", + "vendor/helper/candidate_from378.py": "b97c57e03fb570caab63bd82bf00664b5abea7eda8db3adfed69fc20efd82fb6", + "vendor/helper/two_alias.py": "5046a050e168266aff6488d27ca6525469c844118fbaced9af2b3dde8e13065c", + "vendor/reuse/frame-selection.json": "a83d4880579fb1f8cffb701d1d685c157b7fa14ef9d6642e42ff1e4f5a1b8c5c", + "vendor/reuse/frame_replay.py": "6dc74f24323c717d9eff7c12f27c67a0531899e61a8ee340c98162b1e34f9531", + "vendor/reuse/reuse-selection.json": "0b300bab47cf0d69cbc7965bf01c2a27c96b97677ee651334470d8c968b603f1", + "vendor/reuse/reuse_replay.py": "e83251e3d49267fb5b53eda53c1be80118b7df0cc671c38cad1f300883cd1316", + "verify.py": "9a573069ef44ffa092ab638bbfa817cc2922c5a2827c7de0e71138b6cf9c13ff" + }, + "candidate_sha256": "3b78069c4ce032e95f757a2f79fa5557af923c947430b638b0eb6859be659866", + "template_sha256": "888fb32cb5e4d2f4deff7b689d7afe6be514718667973e047fa0734492408708", + "source_bound_prior_bit_reuse": true, + "fresh_phase_frames": 26, + "fresh_residual_address_columns": 13312, + "structural_controls_rejected": [ + "omit_pre", + "omit_post", + "wrong_inverse", + "duplicate_padding", + "underpriced_padding", + "omit_final_cover_family", + "wrong_chart_I", + "aliased_owner" + ], + "profile": { + "1": 166338, + "2": 50328, + "3": 33552, + "4": 8928, + "5": 16344, + "6": 16488, + "7": 4536, + "8": 7488, + "9": 576, + "10": 9, + "16": 3840, + "32": 3840, + "48": 3840 + }, + "live": 14412, + "physical": 15203, + "banks_per_stage": 748, + "deficit": 2496, + "outer_constraints": 47, + "scope": "Finite conditional changed composition. Inherited all-size window, correlated-bank, recursive compiler, ordinary-call/fixed-tape/restored-row, precision and analytic interfaces remain assumptions; no Lean or unconditional multiplication theorem.", + "manifest_history": "The executable and witness payload listed here passed together. Only this validation record, RESULT.json and VALIDATION.md were added afterwards; the final manifest covers all delivered bytes." +} diff --git a/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.md b/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.md new file mode 100644 index 0000000000..0f996c7d66 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/VALIDATION.md @@ -0,0 +1,11 @@ +# Validation + +The complete offline changed-composition replay passed in approximately 99 seconds on the development machine, including native compilation. Its exact result is kappa = 101331088745971 / 100000000000000000. This is the finite conditional scope described in PROOF.md. + +The fresh run checked exact reconstruction, both dirty local orientations and entrance charts, all new/reflected local phase edges, 26 full residual Gaussian operators (13,312 columns), bank emission, independent owner/routing/schedule/profile/invoice decoding with eight adverse controls, the recomputed reserve bridge, two moment engines and all 47 outer inequalities. Unchanged bit and old local-phase evidence was explicitly source-bound and reused; no new bit replay is claimed. + +VALIDATION.json binds every payload byte present during that run. Only these final validation/provenance records were added afterward; no executed source or witness changed. The final MANIFEST.json covers all delivered files. Generated logs and large templates remain output rather than required input files. Output receipt/template hashes can depend on output paths through source-binding provenance; acceptance is mathematical replay plus current-source hashes, not a platform-independent claim about generated receipt bytes. + +The native phase runner checks at most 30 coordinate-C operations per tested circuit. Monomial gates only permute or multiply by units. Starting from an integer basis vector, each C step increases an unnormalized component magnitude by at most four and its dyadic denominator exponent by one. After exact powers-of-two cancellation and final denominator alignment, every magnitude is bounded by 2^60, within signed 64-bit range. Python separately supplies exact phase-aware decompositions and restricts the circuit count. + +The upload preflight checks complete hash union, at most 70 files per batch, each file below 25 MiB, short paths, no upload archives/compiled binaries/caches, and absence of the submitter identity markers. Compressed JSON witness data and upstream attribution are retained. diff --git a/research/e8-clean-reuse-extension/vendor/source401/architecture/SUFFICIENT.md b/research/e8-clean-reuse-extension/vendor/source401/architecture/SUFFICIENT.md new file mode 100644 index 0000000000..032a4af051 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/architecture/SUFFICIENT.md @@ -0,0 +1,19 @@ +# Sufficient two-sided normalization for arbitrary entrance frames + +Let a complete local invocation, after its exact dirty response and cleanup, have data block S and independent helper blocks F_h T_E^(-1). Every input helper value is arbitrary and may be correlated with every other stream. Require zero data response on each gauged initial helper column and complete restoration of all off-diagonal helper responses. The separately bound local scalar/chart replay establishes these premises for the frozen119-gauge word. + +For each used entrance E, the exact Gaussian Clifford compiler supplies +R_E=F_h T_E^(-1)=L_E C_[h-dimE] R_E0, +where both L_E and R_E0 are literal unitary monomial operators. Apply R_E0^(-1) to that complete helper stream BEFORE the entire old-response phase, and L_E^(-1) AFTER complete cleanup. The resulting helper operator is exactly C_[h-dimE]. The data output is unchanged because its response to that helper is zero; every other helper output is unchanged because the completed helper block is diagonal. This proves the construction for arbitrary dirty input, without commuting either boundary monomial through the internal circuit. No C_q chart is asserted for even or degenerate E, and no orthonormal E-perpendicular basis is assumed. + +Backward local words use chronological inverse adjoint: each real shear t+=a*s becomes s-=a*t. Every address operator is unitary, so U^(-adjoint)=U. If the forward completed word is Q W P, its inverse adjoint is Q W^(-adjoint) P. Thus the SAME chronological unitary pre/post adapters are correct for both orientations. On real and imaginary components, these unitary maps are orthogonal; this is the equivalent real inverse-transpose convention. + +All boundary monomials act on nine local axes and identity spectators. In each ambient lifted ratio the SAME exterior-prefix factor cancels, leaving F_h T_E^(-1) tensor identity. The exact residual identities are checked on every one of512 address columns for all26 frames, including Gaussian global phase; the native replay does not specialize helpers to clean inputs. + +Each normalized residual is a product of C factors on standard coordinate axes. A stored orthogonal coordinate permutation A maps these to its assigned disjoint bank axes. For physical owner g=d*A^(-1), d=g*A, so the routed factor is P_g C_(A e_i) P_g^(-1). Owner right factors are the ACTUAL inverse matrices, not assumed symmetric. Each invocation checks injectivity of the actual pair(bank,A^(-1)), and different cover classes may coown physical streams sequentially. This relies on the inherited arbitrary-correlated bank/window interface, never on independence of initial helper values. + +Because A is a coordinate permutation, row weights of d*A^(-1) equal row weights of d. Thus delta_i(d*A^(-1))=delta_i(d); the new nonsymmetric inverse routes introduce no extra cover correction. + +At each bank all residual axes are pairwise disjoint. Add the explicit paid C child on the missing coordinate axes. Their product is exactly C_all73. Retain the source-bound interleaved nine-stage data/idle/bridge schedule, exact cover enumeration, loop order, and final all-live X_delta(g) correction. Both boundary monomials, finite routes, all missing-axis children, complete private stock and scalar primitives are charged by the regenerated invoice. + +The frozen packing has748banks perstage, residuals120rank4+208rank5+64rank7+560rank8+5296rank9. Its padding is482rank1+1rank10 perstage. Live stock14412, physical15203, rankmass1,049,580 and deficit2496. The finite invoice pays17136 explicit boundary adapters, requires row coefficient15445<20161, and keeps the stated compiler/router/literal bounds. These finite sufficient identities do not discharge inherited all-size window, recursive/compiler, fixed-tape, grid/precision, restored-row or analytic contracts, and establish no unconditional multiplication theorem. diff --git a/research/e8-clean-reuse-extension/vendor/source401/architecture/audit.py b/research/e8-clean-reuse-extension/vendor/source401/architecture/audit.py new file mode 100644 index 0000000000..87a4173847 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/architecture/audit.py @@ -0,0 +1,61 @@ +from pathlib import Path +from collections import Counter,defaultdict +import sys,json,gzip,hashlib,copy,math +sys.dont_write_bytecode=True +OUT=Path(sys.argv[1]);CP=Path(sys.argv[2]);PHASE=Path(sys.argv[3]);LOCAL=Path(sys.argv[4]);PRIOR=Path(sys.argv[5]) +read=lambda p:json.loads(Path(p).read_text());sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest();raw=gzip.decompress((OUT/'TEMPLATE.json.gz').read_bytes());ir=json.loads(raw);rr=gzip.decompress((OUT/'ROUTES.json.gz').read_bytes());routes=json.loads(rr);receipt=read(OUT/'ADMISSION.json');phase=read(PHASE);local=json.loads(gzip.decompress(LOCAL.read_bytes()));prior=json.loads(gzip.decompress(PRIOR.read_bytes()));c=read(CP);ext=dict(c['ext']);n=2*c['v']+c['R'];m=73;bank=ir['banks_per_stage'];phaseby={p['frame']:p for p in phase['frames']} +assert hashlib.sha256(raw).hexdigest()==receipt['template_sha256'];assert hashlib.sha256(rr).hexdigest()==receipt['route_table_sha256']==ir['route_table_sha256'];assert sha(CP)==receipt['candidate_sha256']==phase['candidate_sha256'];assert phase['fresh_frames']==len(set(ext.values())) and phase['fresh_address_columns']==512*phase['fresh_frames'];assert all(sha(p)==h for p,h in receipt['source_hashes'].items()) +# Independent integer-permutation decoder, not the emitter's matrix arithmetic. +def permutation(rows): + assert len(rows)==m and all(x>0 and not(x&(x-1)) for x in rows) + ids=[x.bit_length()-1 for x in rows];assert set(ids)==set(range(m));return ids +def audit(t,rs): + lookup={};used=defaultdict(set);nonsymmetric=0 + for a in rs: + key=a['replica'],a['helper'];assert key not in lookup;lookup[key]=a;f=permutation(a['map_local_to_bank_rows']);z=permutation(a['owner_right_factor_rows']);assert all(z[f[i]]==i and f[z[i]]==i for i in range(m)) + columns=[f.index(i) for i in range(m)];expectedrank=9-len(c['frames'][ext[a['helper']]]) if a['helper'] in ext else 9;assert a['rank']==expectedrank and a['residual_axes']==columns[:expectedrank] + assert not used[a['bank']]&set(a['residual_axes']);used[a['bank']].update(a['residual_axes']);nonsymmetric+=f!=z + assert len(lookup)==8*c['R'] and len(used)==bank + for b in range(bank): + original=used[b];missing=set(range(m))-original + for s in range(9): + ps=[p for p in t['bank_padding'] if p['family']==7680+s*bank+b];assert len(ps)==bool(missing) + if ps:assert set(ps[0]['axes'])==missing and ps[0]['rank']==len(missing) + assert t['live']==7680+9*bank and t['physical']==t['live']+c['R']+10 + assert t['private_namespace']==dict(centers=[t['live'],t['live']+9],tableau=[t['live']+9,t['live']+9+c['R']],coefficient=[t['physical']-1,t['physical']]) + H=Counter();programsha={} + for ori,program in t['local_programs'].items(): + assert program[0]==['phase','bank_pre_adapters'] and program[-1]==['phase','done'];first=next(i for i,e in enumerate(program) if e==['phase','old_response']);last=next(i for i,e in enumerate(program) if e==['phase','bank_post_adapters']);assert first==len(ext)+1 + pre=program[1:first];post=program[last+1:-1];assert [e[2] for e in pre]==sorted(ext)==[e[2] for e in post] + for e in pre+post: + _,which,r,f,rec=e;assert ext[r]==f and rec['rank']==0;expected=phaseby[f]['pre_adapter' if which=='right_inverse_before_old_response' else 'post_adapter'];assert rec==expected + assert all(e[1]=='right_inverse_before_old_response' for e in pre) and all(e[1]=='left_inverse_after_cleanup' for e in post) + assert program[first:last]==local['local_programs'][ori][:-1] + for r,f in ext.items():assert t['entry_charts'][str(f)]['physical_initial_chart']==f'T_{f}' and t['entry_charts'][str(f)]['formal_normalized_input_token']==f'T_{f}_inverse' and t['entry_charts'][str(f)]['entry_adapter_rank']==0 + hh=Counter(e[5] for e in program if e[0]=='climb');hh.update(e[4] for e in program if e[0]=='center');assert hh=={int(r):num for r,num in receipt['local_profile'].items()} + programsha[ori]=hashlib.sha256(json.dumps(program,sort_keys=True,separators=(',',':')).encode()).hexdigest() + for call,oldcall in zip(t['calls'],prior['calls']): + assert all(call[k]==oldcall[k] for k in ['stage','replica','pair','orientation','window']);assert call['owners'][:240]==oldcall['owners'][:240];s,r=call['stage'],call['replica'];assert call['local_program_sha256']==programsha[call['orientation']] + for helper in range(240,n):assert call['owners'][helper]==[7680+s*bank+lookup[r,helper]['bank'],['explicit_inverse_route',r,helper]] + assert len({json.dumps(o) for o in call['owners']})==n;assert len({(lookup[r,helper]['bank'],tuple(lookup[r,helper]['owner_right_factor_rows'])) for helper in range(240,n)})==c['R'] + program=t['local_programs'][call['orientation']];H.update(e[5] for e in program if e[0]=='climb');H.update(e[4] for e in program if e[0]=='center') + assert len(t['calls'])==72 and t['recipe']==prior['recipe'] and t['idle_children']==prior['idle_children'] + for ch in t['idle_children']:H[ch['rank']]+=ch['replicas'] + for p in t['bank_padding']:H[p['rank']]+=1 + assert H=={int(r):num for r,num in receipt['profile'].items()};mass=sum(r*num for r,num in H.items());assert mass==receipt['rank_mass'] and 73*t['live']-mass==2496 + assert t['cover']==prior['cover'] and t['loop_order']==prior['loop_order'];assert t['route_semantics']['data']==prior['route_semantics']['data'] and t['route_semantics']['work']==prior['route_semantics']['work'];assert t['exact_data_phase_recipe_sha256']==prior['exact_data_phase_recipe_sha256'] + originalschedule=[e for e in prior['execution_schedule'] if e['kind'] not in ('bank_padding_cover_sweep','translate_every_live_family')];assert t['execution_schedule'][:-2]==originalschedule + assert t['execution_schedule'][-2]==dict(kind='heterogeneous_bank_padding_cover_sweep',padding=t['bank_padding']);assert t['execution_schedule'][-1]==t['cover_final_correction'] and t['cover_final_correction']['families']==[0,t['live']] and t['cover_final_correction']['formula']==prior['cover_final_correction']['formula'] + return nonsymmetric +nonsymmetric=audit(ir,routes);controls=[] +mutants=[('omit_pre',lambda t,r:t['local_programs']['forward'].pop(1)),('omit_post',lambda t,r:t['local_programs']['backward'].pop(-2)),('wrong_inverse',lambda t,r:next(a for a in r if a['map_local_to_bank_rows']!=a['owner_right_factor_rows']).__setitem__('owner_right_factor_rows',next(a for a in r if a['map_local_to_bank_rows']!=a['owner_right_factor_rows'])['map_local_to_bank_rows'])),('duplicate_padding',lambda t,r:t['bank_padding'].append(copy.deepcopy(t['bank_padding'][0]))),('underpriced_padding',lambda t,r:t['bank_padding'][0].__setitem__('rank',0)),('omit_final_cover_family',lambda t,r:t['cover_final_correction']['families'].__setitem__(1,t['live']-1)),('wrong_chart_I',lambda t,r:t['entry_charts'][str(next(iter(ext.values())))].__setitem__('physical_initial_chart','I')),('aliased_owner',lambda t,r:t['calls'][0]['owners'].__setitem__(241,t['calls'][0]['owners'][240]))] +for name,mut in mutants: + t,r=copy.deepcopy(ir),copy.deepcopy(routes);mut(t,r) + try:audit(t,r) + except (AssertionError,KeyError,StopIteration):controls.append(name) + else:raise AssertionError('accepted mutant '+name) +# Independently recompute source-counted invoice from decoded programs and bills. +bills=local['bills'];prim=sum(bills[c['orientation']]['totals']['real_component_primitive_steps'] for c in ir['calls']);lc=sum(int(v) for v in receipt['local_profile'].values());macros=max(bills[o]['totals']['scalar_macros'] for o in bills);comp=64*74**3;adapters=16*(macros+lc+n+9)+64*73+8*len(ext);bridges=sum(e['kind']=='bridge' for e in ir['recipe']);ba=2*120*8*bridges;ts=4*120*8;tm=7680 +items=6*120*8*9+2*9*8*c['R']+len(ir['idle_children'])*8+len(ir['bank_padding'])+ba+ts+tm+ir['live']+ir['physical']+4*72*len(ext);outside=8*items+64*73;pv=prim+ba+ts+tm+ir['live']+(72*adapters+outside)*comp+64*ir['physical'];inv=receipt['invoice'];assert inv['real_primitives_all_calls']==prim and inv['adapter_groups']==adapters and inv['outside_groups']==outside and inv['pervertex']==pv and inv['explicit_bank_boundary_adapters']==2*72*len(ext) +result=dict(status='PASS_INDEPENDENT_DECODED_TWO_SIDED_BANKS_SCHEDULE_PROFILE_AND_INVOICE',candidate_sha256=sha(CP),template_sha256=receipt['template_sha256'],route_table_sha256=receipt['route_table_sha256'],banks_per_stage=bank,stage_bank_products=9*bank,owner_routes=8*c['R'],nonsymmetric_routes=nonsymmetric,all_size_claim=False,structural_controls_rejected=controls,source_hashes={str(p):sha(p) for p in [CP,PHASE,LOCAL,PRIOR,OUT/'ADMISSION.json',Path(__file__)]},scope='Independent integer-permutation readback plus complete scalar/local source equality, literal bank pre/post locations, current paid child profile, private namespace, retained interleaved schedule and counted finite invoice. Exact monomial identities and arbitrary-dirty block diagonal endpoints are separately source-bound. Conditional all-size interfaces remain inherited.') +(OUT/'INDEPENDENT-ADMISSION.json').write_text(json.dumps(result,indent=2));print(json.dumps(result)) diff --git a/research/e8-clean-reuse-extension/vendor/source401/architecture/banks.py b/research/e8-clean-reuse-extension/vendor/source401/architecture/banks.py new file mode 100644 index 0000000000..4a891ca5c7 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/architecture/banks.py @@ -0,0 +1,61 @@ +from pathlib import Path +from collections import Counter,defaultdict,deque +import sys,json,gzip,hashlib,math,copy +sys.dont_write_bytecode=True +CP,PAT,PHASE,LOCAL,LOCALRESULT,PRIOR,GEO,OUT=[Path(a).resolve() for a in sys.argv[1:9]];assert not OUT.exists();OUT.mkdir(parents=True) +sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest();read=lambda p:json.loads(Path(p).read_text());ungzip=lambda p:json.loads(gzip.decompress(Path(p).read_bytes()));write=lambda name,o:(OUT/name).write_text(json.dumps(o,indent=2)) +sys.path.insert(0,str(GEO));from clifford_exact import transpose,mv +c=read(CP);patterns=read(PAT);phase=read(PHASE);local=ungzip(LOCAL);lr=read(LOCALRESULT);prior=ungzip(PRIOR);ext=dict(c['ext']);h,v,R=c['h'],c['v'],c['R'];n=2*v+R;m,T,L=73,8,9 +DATA=Path(sys.argv[9]).resolve() if len(sys.argv)>9 else PRIOR.with_name('DATA-PHASES.json');assert sha(DATA)==prior['exact_data_phase_recipe_sha256'] +assert sha(CP)==phase['candidate_sha256']==local['candidate_sha256']==lr['candidate_sha256'];assert lr['all_new_phase_equalities_include_Gaussian_global_phase'] and lr['gauged_K_columns_zero'];assert lr['raw_operator_equals_same_entrance_nonY_baseline'] +assert hashlib.sha256(gzip.decompress(LOCAL.read_bytes())).hexdigest()==lr['local_programs_uncompressed_sha256'];assert prior['m']==m and len(prior['calls'])==72;phaseby={p['frame']:p for p in phase['frames']} +queues=defaultdict(deque) +for rep in range(T): + for r in range(2*v,n):queues[h-len(c['frames'][ext[r]]) if r in ext else h].append((rep,r)) +expected=Counter({r:len(q) for r,q in queues.items()});assign=[];bank=0;padding=[] +for pattern in patterns: + for _ in range(pattern['count']): + offset=0 + for key,num in sorted(((k,num) for k,num in pattern.items() if k.startswith('r')),key=lambda x:-int(x[0][1:])): + rank=int(key[1:]) + for slot in range(num): + assert queues[rank];rep,helper=queues[rank].popleft();axes=list(range(offset,offset+rank));offset+=rank;assert offset<=m + cols=axes+[a for a in range(m) if a not in axes];A=transpose(tuple(1<2*max(H)**2 and row<20161 +invoice=dict(local_bound=localbound,real_primitives_all_calls=primitives,adapter_groups=adapters,outside_groups=outside,explicit_bank_boundary_adapters=2*len(calls)*len(ext),pervertex=pervertex,live=live,physical=physical,group_bits=group.bit_length(),physical_stock_bits=stock.bit_length(),logical_bits=logical.bit_length(),router_bits=router.bit_length(),literal_bits=literal.bit_length(),row=row,retained_row=20161,compiler=compiler,G_exponent=30000,E_exponent=100000,C0_exponent=210000,halving_degree=2,induction_gap_multiple_B=2*(m-max(H))-1) +routeblob=json.dumps(assign,separators=(',',':')).encode();(OUT/'ROUTES.json.gz').write_bytes(gzip.compress(routeblob,mtime=0));schedule=[copy.deepcopy(e) for e in prior['execution_schedule'] if e['kind'] not in ('bank_padding_cover_sweep','translate_every_live_family')];pad=[dict(family=7680+s*bank+p['bank'],axes=p['axes'],rank=p['rank']) for s in range(L) for p in padding];correction=dict(kind='translate_every_live_family',families=[0,live],formula=prior['cover_final_correction']['formula']);schedule+=[dict(kind='heterogeneous_bank_padding_cover_sweep',padding=pad),correction] +ir=dict(version='arbitrary-entrance-two-sided-banks-v1',candidate_sha256=sha(CP),m=m,live=live,physical=physical,banks_per_stage=bank,local_programs=programs,entry_charts=local['entry_charts'],calls=calls,recipe=prior['recipe'],execution_schedule=schedule,idle_children=prior['idle_children'],bank_padding=pad,cover_final_correction=correction,route_table_sha256=hashlib.sha256(routeblob).hexdigest(),residual_phase_sha256=sha(PHASE),local_admission_sha256=sha(LOCALRESULT),private_namespace=dict(centers=[live,live+h],tableau=[live+h,live+h+R],coefficient=[physical-1,physical]),scope='Finite changed dirty-word/adapters/routing/template/invoice. Exact local scalar and Gaussian checks source-bound; inherited all-size window lift, arbitrary correlated bank semantics, recursive compiler, fixed tapes, common grid, restored rows and analytic interfaces remain conditional.') +ir['cover']=prior['cover'];ir['loop_order']=prior['loop_order'];ir['route_semantics']=dict(prior['route_semantics']);ir['route_semantics']['helper']='physical cover owner g=d*A^-1 using explicit owner_right_factor_rows; local-to-bank map A is an orthogonal coordinate permutation';ir['adapter_policy']='Retain source-bound exact data phase and endpoint adapters; explicit helper pre R0^-1 before entire old_response, post L^-1 after complete cleanup; count all rankzero compilations';ir['exact_data_phase_recipe_sha256']=sha(DATA) +blob=json.dumps(ir,sort_keys=True,separators=(',',':')).encode();(OUT/'TEMPLATE.json.gz').write_bytes(gzip.compress(blob,mtime=0));result=dict(status='PASS_NEW_ARBITRARY_ENTRANCE_TWO_SIDED_BANK_TEMPLATE_FINITE_INVOICE',candidate_sha256=sha(CP),template_sha256=hashlib.sha256(blob).hexdigest(),route_table_sha256=hashlib.sha256(routeblob).hexdigest(),m=m,live=live,physical=physical,banks_per_stage=bank,residual_ranks=dict(expected),padding_per_stage=dict(Counter(p['rank'] for p in padding)),rank_mass=mass,deficit=m*live-mass,profile=dict(sorted(H.items())),local_profile=dict(sorted(localhist.items())),invoice=invoice,source_hashes={str(p):sha(p) for p in [CP,PAT,PHASE,LOCAL,LOCALRESULT,PRIOR,DATA,GEO/'clifford_exact.py',Path(__file__)]},scope=ir['scope']);write('ADMISSION.json',result) +assert all(sha(p)==digest for p,digest in result['source_hashes'].items());print('PASS FRESH PORTABLE BANK EMISSION + INVOICE',bank,live,physical,invoice) diff --git a/research/e8-clean-reuse-extension/vendor/source401/architecture/bridge.py b/research/e8-clean-reuse-extension/vendor/source401/architecture/bridge.py new file mode 100644 index 0000000000..0478f21be3 --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/architecture/bridge.py @@ -0,0 +1,13 @@ +from pathlib import Path +from fractions import Fraction as Q +import sys,json,hashlib,math +sys.dont_write_bytecode=True +OUT=Path(sys.argv[1]).resolve();read=lambda p:json.loads(Path(p).read_text());sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest();a=read(OUT/'ADMISSION.json');ind=read(OUT/'INDEPENDENT-ADMISSION.json');assert a['template_sha256']==ind['template_sha256'] and ind['status'].startswith('PASS_');i=a['invoice'];m=a['m'];r=m//2;H={int(k):v for k,v in a['profile'].items()};mass=sum(k*v for k,v in H.items());assert mass==a['rank_mass'] and m*a['live']-mass==2496 +# Recompute every new supplier reserve inequality with exact integers. +group=2**(r*r)*math.prod(2**(2*j)-1 for j in range(1,r+1));physical_stock=group*a['physical'];smass=group*mass;logical=group*i['pervertex']+64;compiler=64*(m+1)**3;router=compiler*(logical+1)*(physical_stock+1)**2;G,E,C0=1<<30000,1<<100000,1<<210000;B=smass+E;literal=2*G*physical_stock**2+8*smass+4*physical_stock+4+32*m;C0required=32*m*B*B;row=2*physical_stock.bit_length()+9909+252 +assert i['local_bound']<1<<48 and logical<1<<6050 and router2*max(H)**2 and 2*B*(m-max(H))-smass-E==49*B and row==i['row']<20161 +degreegap=Q(10**6)-Q(51*20161,25);assert degreegap>0 +certificate=dict(candidate_sha256=a['candidate_sha256'],template_sha256=a['template_sha256'],supplier_admission_sha256=sha(OUT/'ADMISSION.json'),independent_decoder_sha256=sha(OUT/'INDEPENDENT-ADMISSION.json'),m=m,live=a['live'],physical=a['physical'],rank_mass=mass,deficit=m*a['live']-mass,new_local_bound=i['local_bound'],local_bound_upper_exponent=48,new_logical_bits=logical.bit_length(),logical_upper_exponent=6050,new_router_bits=router.bit_length(),G_exponent=30000,new_literal_bits=literal.bit_length(),E_exponent=100000,new_B_bits=B.bit_length(),B_upper_exponent=100001,new_C0_required_bits=C0required.bit_length(),C0_exponent=210000,halving_integer_inequality=[m*m,2*max(H)**2],induction_gap_multiple_B=49,new_required_row=row,retained_row_coefficient=20161,explicit_bank_boundary_adapters=i['explicit_bank_boundary_adapters'],source_hashes=a['source_hashes']) +bridge=dict(semantic=dict(G=dict(base=2,exponent=30000),E=dict(base=2,exponent=100000),B_upper=dict(base=2,exponent=100001),C0=dict(base=2,exponent=210000),C1=1,strict_literal_gap=1,induction_gap_lower=1),rows=dict(coefficient=20161,degree=10**6,suffix_slope=4*10**6,degree_gap=str(degreegap)),certificate=certificate,proof='Every finite semantic reserve and row domination inequality freshly recomputed from the changed emitted source and independent decoder. Positive gaps are integer lowerbounds, not transplanted old profile/stock assertions. Completed ordinary wrappers and all-size supplier/window/dirty-bank/compiler/tape/grid/precision/analytic interfaces remain conditional.') +(OUT/'BRIDGE.json').write_text(json.dumps(bridge,indent=2));(OUT/'OUTER-INPUT.json').write_text(json.dumps(dict(profile=a['profile'],m=m,stock=a['live'],bridge=bridge,supplier_receipt_sha256=sha(OUT/'ADMISSION.json')),indent=2));print('PASS NEW EXACT BRIDGE',row,router.bit_length(),literal.bit_length(),C0required.bit_length()) diff --git a/research/e8-clean-reuse-extension/vendor/source401/architecture/deps/json.hpp b/research/e8-clean-reuse-extension/vendor/source401/architecture/deps/json.hpp new file mode 100644 index 0000000000..82d69f7c5d --- /dev/null +++ b/research/e8-clean-reuse-extension/vendor/source401/architecture/deps/json.hpp @@ -0,0 +1,25526 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file docs/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#include // all_of, find, for_each +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO +#include // random_access_iterator_tag +#include // unique_ptr +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_DIAGNOSTIC_POSITIONS + #define JSON_DIAGNOSTIC_POSITIONS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_DIAGNOSTIC_POSITIONS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#ifdef JSON_HAS_CPP_17 + #include // optional +#endif +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // nullptr_t +#include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif +#include // runtime_error +#include // to_string +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // uint8_t +#include // string + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // declval, pair +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson +// SPDX-License-Identifier: MIT + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(JSON_HEDLEY_MSVC_VERSION) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_CRAY_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if \ + defined(__has_attribute) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if \ + (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// #include + + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_23) && !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) + #define JSON_HAS_CPP_23 + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201402L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include() + #include + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifndef JSON_HAS_STATIC_RTTI + #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0 + #define JSON_HAS_STATIC_RTTI 1 + #else + #define JSON_HAS_STATIC_RTTI 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType, \ + class CustomBaseClass> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = !nlohmann_json_j.is_null() ? nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1) : nlohmann_json_default_obj.v1; + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +// inspired from https://stackoverflow.com/a/26745591 +// allows calling any std function as if (e.g., with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept +#endif +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} + +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +template +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != StringType::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +template +inline StringType escape(StringType s) +{ + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +template +static void unescape(StringType& s) +{ + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // size_t + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif + +template +constexpr std::array make_array(Args&& ... args) +{ + return std::array {{static_cast(std::forward(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // numeric_limits +#include // char_traits +#include // tuple +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // random_access_iterator_tag + +// #include + +// #include + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + #include // int64_t, uint64_t + #include // map + #include // allocator + #include // string + #include // vector + + // #include + + + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN + + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; + + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template + struct ordered_map; + + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; + + NLOHMANN_JSON_NAMESPACE_END + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +template +using detect_key_compare = typename T::key_compare; + +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +///////////////// +// char_traits // +///////////////// + +// Primary template of char_traits calls std char_traits +template +struct char_traits : std::char_traits +{}; + +// Explicitly define char traits for unsigned char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = unsigned char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +// Explicitly define char traits for signed char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = signed char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible, + is_detected_exact>::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& +is_complete_type < +detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template