diff --git a/.github/workflows/e8-retimed-nine-composition.yml b/.github/workflows/e8-retimed-nine-composition.yml new file mode 100644 index 0000000000..b3b621147e --- /dev/null +++ b/.github/workflows/e8-retimed-nine-composition.yml @@ -0,0 +1,36 @@ +name: Verify retimed nine-stage E8 composition +on: + pull_request: + paths: + - 'research/e8-retimed-nine-composition/**' + - '.github/workflows/e8-retimed-nine-composition.yml' + push: + paths: + - 'research/e8-retimed-nine-composition/**' + - '.github/workflows/e8-retimed-nine-composition.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: ${{ matrix.python }} + - name: Install verifier dependencies + run: | + sudo apt-get update + sudo apt-get install -y g++ libboost-dev + python -m pip install -r research/e8-retimed-nine-composition/requirements.txt + - name: Replay source and new certificate + run: python -B research/e8-retimed-nine-composition/verify.py "$RUNNER_TEMP/e8-composed" + - name: Confirm source tree unchanged + run: git diff --exit-code diff --git a/certificates/joint-dual-kappa.json b/certificates/joint-dual-kappa.json index b7f7b89bc2..1f35b89221 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": "698fe862a620e5b80b85fbc6034c9456fa0fa9aea638dbbbcb3f9edd24c0415e", "sources": [ { "files": { diff --git a/certificates/joint-dual-validation.json b/certificates/joint-dual-validation.json index 194861d3c3..61a8d41622 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": "6f684fa7f747073a132e8d0b5652cf12a8afa389f2a16ff6ade8e080d786dd22", "kappa": "4764513337/100000000000000", "margins": 7, "producer_words_regenerated_and_matched": true, diff --git a/research/e8-retimed-nine-composition/EXPECTED.json b/research/e8-retimed-nine-composition/EXPECTED.json new file mode 100644 index 0000000000..15dcec7bb9 --- /dev/null +++ b/research/e8-retimed-nine-composition/EXPECTED.json @@ -0,0 +1,8 @@ +{ + "kappa": "7987126506013/8000000000000000", + "kappa_float": 0.000998390813251625, + "bit_coarse": "251726760077483/250000000000000000", + "complex_coarse": "999388595603943/1000000000000000000", + "binding": "complex", + "gain_percent_vs382": 0.014791889125625176 +} diff --git a/research/e8-retimed-nine-composition/LICENSE b/research/e8-retimed-nine-composition/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-retimed-nine-composition/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-retimed-nine-composition/MANIFEST.json b/research/e8-retimed-nine-composition/MANIFEST.json new file mode 100644 index 0000000000..fe0b8e437d --- /dev/null +++ b/research/e8-retimed-nine-composition/MANIFEST.json @@ -0,0 +1,210 @@ +{ + "EXPECTED.json": "9bf088d808c0abb91766057d3f5e14586a09411c7f8939cb3fc31d2ccd1be80c", + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "NOTICE.md": "db96c01198a29b0254ed31d76f51f3cbf98bc95425451d3842ef88297057ed30", + "README.md": "030543cf7b8380df446a0b3e822fb184ebe482d1fb0c81ca15280bdcb5b244e9", + "SOURCES.json": "2ff5cddf9bd1ff81c685fb9ec5bb466094b8e6f0f4ad8694215cbd0eb00d6fe8", + "candidate-five-pins.json": "56d5c0761be1c8ad34e22edda36f7cefaf512f33d2105c7d9a884316d3a7904d", + "requirements.txt": "12ce61badd5c50c101d6d759e1de6bc494be3f906df49a63b6db20d7e54a7348", + "source365/NOTICE.md": "d90e498b08ebc83951ae44f5b3c507eac314ee03e7cab53df675e7a86da9046b", + "source365/PROOF.md": "f21c7a5f54ae39763765c833f8f4c916340f3417b508c267153a0fe52358c0c9", + "source365/README.md": "1d014a1835d3e50e0c8e10d4e1c18afe7e91837707e184440d0ca893ea50c165", + "source365/data/original.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "source365/data/retimed.json.gz": "31467ace2b1667630b72e488e688911a0404b4755d0d2c87560b111ed4c07998", + "source365/reconstruct.py": "5a3d1e4cc45dde080a999f4a94040eba2d52c01877ffe70ae121109fbf9853e5", + "source365/retime.py": "0b4cddf5c9c0cb738b0e023d1108c65daf465843397428fef57f99c5bc7c1683", + "source365/scalar_map_comparison.py": "4ee8a3c9074d2e599e124882e182e0fc8397d9ef420f99508b7a7b0f0f9066e9", + "source365/sources.json": "016a1eb4edd569c2b13fdde9c39f7144f30c659eb3f947fae97c795a8905bbc5", + "source365/verification.json": "97874902c6548cf6fd04ead2345a7e40ad960407771515af40f202a9eac637b6", + "source365/verify.py": "2230294a81b980a4bee415e387e0371def5cda1e4651146dd1f98c4ad7911a6e", + "source377/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source377/MANIFEST.json": "3743f954b5a652e51fa9ae5101318345d79f4c897ff9a29d5c54387b92118458", + "source377/README.md": "a62afee2856e1eb096250efd3202a429cd4118e7d9a114e7b9c67e3c168df3ab", + "source377/README.txt": "ffe26cdb8a7e083f2f745b6cf18916a6af4f1635bc5b1577f30fb1ca4e575e07", + "source377/verify.py": "f99a2601b4864bb596955933b41f45a04e9c9b300b23e4aae2cb2934ec5d8c74", + "source377/work/complex-nine-native/PROOF.txt": "ea0edb8cfb6b2f2c1adb2de12cc0aa5fb7c57e649033528565af3e52087beda7", + "source377/work/native358/vendor/complex-reserve/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source377/work/native358/vendor/complex-reserve/MANIFEST.json": "3d0d867b84b86dd9f0850cedce9a6de83f2313a604bdef58f7235af30f94bcbd", + "source377/work/native358/vendor/complex-reserve/NOTICE.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "source377/work/native358/vendor/complex-reserve/SOURCE.json": "e69f2a72785302f892263cf765c84d07e083d9ad05730748f9c3374aade11e53", + "source377/work/native358/vendor/complex-reserve/admit.py": "1b9b069fbdef37b7e3fbc586aad9578ba85948e9f80877733af387573f3fa723", + "source377/work/native358/vendor/complex-reserve/finite_guard.py": "bef59dddd391bcb49ed16ec6384517b8b7a2e21415cc810f9c2f59f440370983", + "source377/work/native358/vendor/complex-reserve/price.py": "90cfb8d102adf0b5f93b71b05af5c078076f56873a868a66865575a5ea85d573", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/MANIFEST.sha256": "4b76fb09595321986da04017db16cf6aa36bcd6a048cdee2ec8b656de811e488", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/NOTICE.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/README.md": "c5349ae6637e846fefe132756968376d52c5e3f76241e96214f59e65cdb7ad16", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/SOURCE-pr346.json": "2ad0b2138d2aa8cd5c6ab6995fa8c6c167a822b668ef56a9cc39c5765d1134b3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/addcomp.py": "82e5ef0c7b6cf84c53bf6039330930242c9a5c8e8ea13183b2805cf9577f7129", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/build_v5.py": "c0867d68b863ca7d8cdd7002ffed263cbd5525fea4522267b5f640e4eff5597b", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/decomp.py": "699c424170b41d3711da6a283f58cac824402ca373764365fd05c8e645ed07f5", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/gather.py": "8c7d2a34fdcbe75d8ed8299e399d578b32adf44402c773fd905aa7c88e2b460d", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/interface.py": "3b3e2fb894f871a9b6145844faaff34a05add59ae0eb8882c8feb2b914265b8a", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/twin.py": "cfd261d82a31dd9024f1fa191eac2f5d893a7b51833b912459de46a1e9aac003", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/columns_h.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/legality_h.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/sub.hpp": "59c1a64f9df61fc50f47d5a78c8f9351875bf6b352db1c9d109c7c90542a4f19", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/verifyT.cpp": "1a5aea81aab652622e6547d901ead6aaf54fdca231da897dd99474c9f64a33bf", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/certify_complex.py": "7e480b7761fa700944a7dca41ccbefd530203b5e9168b6b37fe879b7e6da57fa", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/NOTICE": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/FINITE_BRIDGE.txt": "66d8f4ea8752abd89952d6674a636575a0db16e18b1c16e293f48f64242f0c46", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/compact-control-layout.tex": "2bc28e50f3eb092195294cafa81213e520f6d42e7935e9905ad8a6199e2a7c87", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/compact-control-movement.tex": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/copied-centers-assembly.tex": "00117892971ae766188ace0af03030c44164fda105e42b70d84f52c3339a7dcb", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/copied-centers-lemma.tex": "d0ce6d3d504996aadb098227885224e48df46101daec8893523a0a8b7364d8fe", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/endpoint-gauge-complex.tex": "dfee33b0281e5551bb6927f757ff0240abade60ae1800f715afd88853ae0191e", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/general-clifford-frames.tex": "c9bb9655b594583c6b4bab8cb485233f1d1e588f83858cf1e4c3530cee8fed54", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/stopped-product-complex.tex": "4738089103a4b263b3b0ef458f5ef35519c696f1ea871ae79e508d3720f5870a", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/source-pins.json": "0d76527bf9c259b9532466a7b056ad6ff118867a96e044ff8e1a24aca12e1dbb", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Cert.lean": "5c24746a6330907b9b37d6064095035a58575d64ce793d6d7c9881121fdc3980", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Net.lean": "cf7d7d330b1bffe2e66712c873e647b13dc32db1ccfc0e0f4cd62ee6caf584f0", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Live.lean": "6d0649eb62589e66057f044e1e2103fc42f3f57a1498f82a26565bd8eb4026d0", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Phases.lean": "71dc3dda23dfe510d5d53cbada3a6c540cd1dc2825503fda618a5bd6cfc3e812", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Fourier__Main.lean": "2e8e88efd4dcbdf0b1a6e39ce7eea8c5fd5ffee2faf360a8c0c9cba84c0e4ef3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Geom.lean": "c302f5834287421f11f3b0da7112fcde876cbc702896f2af4145b2d72ee393a2", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__InvThm.lean": "ade7e7873da75ca63a4b5ce2f562dde9c12bfbb69d87d7ae831039ff790e5adb", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetCert.lean": "22ae34809466b4ac2a2c5cdde526f51ff246f5189f7c142b38aa4c0dcffb04a4", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetDef.lean": "6e17a68b1e988969f6eb77000028f7ed877e687b8ad3976ec1707fcfe1d2f520", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetStage.lean": "c122bc01392a6fdcc0bee918fed81804d3c9b1d3e071016dab65a4ed804ef0b6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Phased.lean": "0de429c80231334f1ce92575c1e8ac382ca2d5e7d956767b547639a8941d9a8c", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__WinB.lean": "c33ec3fce09c0971c32ddcbb86d9383ffbe4c6d05cf36f20460005e6547bb845", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__B2Gp193Main.lean": "cb61f304da51f1dd0a2ec25bca4b63eb095eeb2863289e1e2bdee7c82beff48b", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Glue.lean": "d5314f2b93a7f0e1c949fb502331825bfc6d9d8762d35f865443e7c95b6c7ef7", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__InstB2Gp193.lean": "9587ddb9961f44938032b609307ab91c0b0e757e3991f1ad95480dd50fd4f72b", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Cert.lean": "d92ee6889be4753fc99f467bd84039743325123a1165128378b9c906a04f2703", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Price.lean": "0299bcd0fe255960eec682eef0f045f7e5cb1e4711af2aab4393526eae2caea3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193ScalOK.lean": "479434815822e98f015e335361089c3788d00dc3dd39c2944f75410aa0c158fe", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__RateB2Gp193x.lean": "6b40cac1481c931d47b1a092e382d04716ede0e785c492a2f2983e886a257c3f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Raw.lean": "aba94a004c94dcae7cf3047c88a6da9561555f4ebe8ab92e299e6ce09ee7aa66", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__SolutionB2Gp193x.lean": "45c768c9d71a7cc18bd6db74cb036db880d89580ca60557bb4a492280296b169", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Adapt.lean": "feec0a3828867968a5c7c2c30b86ed70449abc3c660a60ada67203a75bae2ef7", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Letters.lean": "34906dbf5ae16b5174db00b4881a5cc1d2e583b8c8806db6523a5e2f86565f09", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Level.lean": "80fb3daa9a45de0ed6da570eb4476b9104734be65d0116f58bcfcbcd67f771d0", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__ORIGIN.md": "6ba897a9495ddadcf8558b93133fdfaf66fc35ce7fa2c53e2d5667335c315e0b", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gx.py": "6f3dc8bb639933227a8dae181ec4a542e85c7276be9c9e330f49518e7b630b95", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxconv.py": "dab7fec9f44c2d368ed334055d7126e202017feb46e41a8d86e2d998720f67c2", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/NOTICE": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8.lean": "842b217147cf84e8042d6ef1c33104d5444b6587b594664bc9eb89b237ab4ad0", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8Main.lean": "987103107d5586c096016f0a702d0de35b74398dbb50ac66f5886a43a5ca0d05", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/ChallengeB2Ge8x.lean": "a59db9d54b83adc73391916f7c1ef5e381ff073027781c26cb350f43b79839e3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Cert.lean": "13a243c7d7be31ae429d19b5ecd5d428d60c41b7cca8a330f0c4179b110ba7ea", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Price.lean": "cd250dd72406dde37765c501f666ceeedcc18f831070b26369bcb154c1f99a8e", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8ScalOK.lean": "6bd5e68effe8913a3f73e25ea59142cd9928ddf81e94250a6ea28aa7317388b3", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8/S0.lean": "36de82f6969c23082876a4d6848428623d1c65d2df3fc917f23ecba003189dd2", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8.lean": "5c7fb23df2c10b690f638a19bf066905b5b620b8a2ad0ffde76cc9348d8aa2b4", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8End.lean": "6ea83365afe01664b2132a630511b4de65f938dc328744ce7f77a01fad97f32d", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Hist.lean": "cce81699abe1f85a870dcf64edd395d2cf5a586da7700af565b557093095ab51", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Par.lean": "a343219b419f30f8ac4dd3a0a98bf53550c5fec6b2cbd245320a95977c319016", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Scal0.lean": "78036e5443775ade5bde46a77ba3e0433fe22160da11b5b6c96c7f1075ecfbbd", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg0.lean": "f6b248dc4c3b2c94db95989b6bd5ad3c3f0d7ece3a511e5b69069550b821b138", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg1.lean": "79d16ccceb61391446ea97f77fddadafa9150e9dea97919e775f6c78daa71839", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8SegF.lean": "924340aebc6f68b5a6526311ce33341af0a0a5a8375416762f08c1914ec08abe", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab0.lean": "650600b631a21221956f9abbab9abebcc9cca628512d3e9a017e2373e2649b17", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab1.lean": "60036fa4deeb19d39fc0dddf31359d2b6d2407ff66070f145b111bff16190eb0", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab2.lean": "c8a248da3eb770ba55ef267d118b29d49983311087ef789398d555e2c44b3a41", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab3.lean": "41975d430ec0095ad465a36d4903e90c01bc891d3abe5e2c372ef786c029a7ed", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8YChk.lean": "a290360c175544cb85edffe1b92fcf7d447cba09128e19de8dc87e0a1ff0c524", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/InstB2Ge8.lean": "c1fee298187ea19b5d70fcfccef7d4fd4161be70c0adda19a89ca9933a759954", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8.lean": "7b6e59724c0f140e714afba237d5a1a91b22da70abc096ce274690140b39a3a6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8x.lean": "7c56d865ed6bfcb6919dabc1a6e53f8744ff4824a2f78335787485f3090970d1", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/SolutionB2Ge8x.lean": "dd52f1fe0a372480edaf5e6c64903d6257c410e43d406f8acb6bf8f60a1ee28f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/comparator/B2Ge8x.json": "ddad06c37f9268986f3ec8ce43da5230ee2bd887da2480328413a0dc58f2a926", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/certificate/gcert1-e8-r783.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/e8/replay.py": "be41ee310f28121c3e424cc8637d8fa02ef7c47fc8945e9bbd3856138fd800d6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/foldgen.py": "a0f16e2c9e078ffbfb2174281ee93a48c18593aefb880318fc105ec85a205932", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/foldlib.py": "7a3c38a698c129e13a767da75926a1305eb0c031b908450afc6feb185505c59a", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/gen_rates.py": "ef8c869e4cf8da33a4c10b96f7f6faafd46e15d66766238070a60315aa169994", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/gen_sharp.py": "1b5eb3730cb16cf516e760879951fdfb9b065efc55f78c29a5c6404fcca57a78", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/templates/ChallengeB2L16x.lean.txt": "0488b7a2442c795414f103df912d1e6cc66d37b5be270940ea9564b7f2b666be", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/templates/SolutionB2L16x.lean.txt": "d414a890dfe126916374c1afc804b90e5081b7760f894b9ccdcf23d83a12f9ee", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gsmirror.py": "0e22bbe5924284e2fb916337ccefc8e41f6e54469749986ad15b3b81cfaec534", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxgen.py": "ce9151054370c2210ed08f54c249a19dcb6946d182cdf934dee1a3781b53040f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxpaths.py": "f00802d48ef3fedb00278f0b1c7bde074cc49dd30f202d7f32a9d2aebb3be443", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxrate.py": "514a5719f970fe36b1273cf59df0396db0e042dd7864c2eea53ab2a2fd1e2ad6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxunit.py": "3cc09a9c1a2db681c0f2016bc821af5b674d34834dbd6f195b9d482ce7c0ff58", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check.py": "b6172d58749c0b3b9138570c74827bcb23bf5db4ff9643740768cd7782ac4ca6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check_e8.py": "ad8fe9811c6ea0d89c795caef48686cfca600f5d540ebfd5d1251d6777cec7cf", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/pins-e8.json": "bf66f785878f636616ceab193e5a222143945ea06fc2f13dfb99b204ebba82ff", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/portable_complex.py": "44e8ae8a5b915358a97dbed5fe4e70195ed3581fd45a216df48fc82a029db87d", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/complex/regress_pr346.py": "29479da1547cd39cf20fe387cde4cad847a2880266db9d0ef3fb474f68591feb", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/export_p10.py": "1161d23b459f7d981d6716073745909126d5465018cbbea7e6e6a9e4e5d68add", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/provenance.py": "9f5c05aa4d172478f2ab67e7bb83cacebfccc10ecba650c23539cdcee18f2139", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/code/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-RECORDS.bin.gz": "caabc13126e8f87d08f7697f51512cb3431ff52861f4190149251d8e19224430", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-frames.json.gz": "35070b83d12ebc60003ed344315328713134a43bdb04217c2c5cbc39e101391f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-states.json.gz": "1e37ae5001447dd78a8287d8aa23d73a1d5862c4017f44db49af327f58d7cf22", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/FINAL-NEW-FRAMES.json": "e7fe9d0686829ad5acf7930698b3c81a866ae834422aa3c9a12057dfae627175", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/FINAL-RECORDS.bin.gz": "fc4f1986da4585dc1721bcd954a95b3ffb2b562cc7031f40242de81664e3acb6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/RECORD-SHA256SUMS": "21f732671eb34468be2252d4dfb81bdec4e7d7cd6564b93a482c2dd925e9c3b2", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/data/bit/labels.json": "e037cd3d19d68e08523d09fce1c5f92206567784eb59f1924d93a837e4302fce", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/receipts/complex-guard-e8.json": "f94a5dca42cbb88e9650f8f8a3ffbd1153636dfc0a48da5f7a7fca908c0650ad", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/receipts/kappa.json": "36316b6cfe423b56cda1fd52843e56c997d060e33d26b732b3ecf4de3ae83aaa", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/receipts/official-five-stage-columns.json": "32e291f249b4eab8d65664d10c94208fe2154bdb4a45aaff84e9e8da5295a29f", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/receipts/official-legality.json": "7e675b7720f056548c1ee9f9de523eea10e6b014ddf90b7a630fd96163acbce6", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/requirements.txt": "ca0825e0ae3db2855af7535ebdc4775beadbb6f07f8d3a84f0f4fd5b95ba5eae", + "source377/work/native358/vendor/complex-reserve/upstream/pr352/verify.sh": "1a05c0b31ea37b2b5a4b84f6f9f504af8dd4220e13a6d9d86f64b2a731a903c7", + "source377/work/native358/vendor/complex-reserve/verify.py": "aa6f05c39404b4038c31c72f9fe7a8e137df911f6cb6fc668e316be37c40b126", + "source377/work/odd-stages/RECIPE-9.json": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "source377/work/odd-stages/audit_nine_template.py": "30c33508d02aeb8823dc477e8027bf6d44740aea0d3a3970fd2490aaf3b072d0", + "source377/work/odd-stages/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "source377/work/odd-stages/complex_candidate.py": "e4faf656403720f78223934bec90c667086453d449323c85fa839d19829b4517", + "source377/work/odd-stages/data_phases.py": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "source377/work/odd-stages/global_nine.py": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "source377/work/odd-stages/outer_fixed.py": "0dc5b5a23bba5b4532cd11a290019d66d56ead611dddd3c40e2c9d0df64da198", + "source377/work/odd-stages/verify_clifford_frames.py": "5d8cf110150c66f2e2df58ea4e24096f335740e2ae726a4778347d98053cfa76", + "source377/work/pr361/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source377/work/pr361/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source377/work/pr361/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source377/work/pr361/complex/gcert1-e8-r783.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "source382/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "source382/MANIFEST.sha256": "05f782fdfa4b5c16afb90d8fb09f473ce3a6b620884ecd63fbb34fc4ae173d84", + "source382/NOTICE.md": "da54f1e15ee7da323d2307aa047ae4cd009dd01f831121e44dbcf65af60c4e46", + "source382/README.md": "081314056d87e086669afeeb2f181053cf11d0694c904de60b12ceca9069f1f4", + "source382/code/checkers/bits/stdc++.h": "51908262576163a64815def96ff39b62aef3d52daaad9c561505c4293ff88e18", + "source382/code/checkers/columns_h.cpp": "0c455ea497412fce02d2689c6e32cefa0b2a56c1624a1a1648900cd39b8f45fb", + "source382/code/checkers/columns_k.cpp": "f96cb88097adf7112cf122008aecc795605b41c57e0cd019db2b5f91682d9b76", + "source382/code/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "source382/code/checkers/legality_h.cpp": "07eb27106c8f43e4ffb6916facc2508035de51e4ce343fb6371fc35116889aeb", + "source382/code/controls.py": "ec9923314e2245739fa68a2bd3a3d7309db7d21cf45e0dded72f555cb22bc453", + "source382/code/e8core.py": "1cb286196c1530d06f50f0997febc5993b388f33464e295611b920ba30a24eeb", + "source382/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "source382/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "source382/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "source382/code/export249.py": "6d9817f7c431573aff695e1eacfa7c2ca6d3a2a10baa3a2ea814ab9b9f7b13ab", + "source382/code/guard.py": "14b39d08ec5a9723195beb28b19c0d489458e47efe362460ccb826ae2c315f9b", + "source382/code/kappa.py": "1fe7818b492c68565286d8b35f7413093de88266e46a4b1ea468b55bb7b7b48b", + "source382/code/layout_bk.py": "e650d16538db8d80495fda5109cdfa0775e1d5f3b56b0aa39e5c1efc660877e7", + "source382/code/nondeg.py": "157f9d1cd0c3160a9fc4a2fd2a7460e03cd0473967da93c4b9a5f97bc53bbdfb", + "source382/code/stages.py": "e37ccfdd0bf60a93fb0150d9810674b37409b161046fea268df87d6372e15f8a", + "source382/code/tile_m.py": "d6ae4a556472d403773cd2117c992bfc10e1187112da1b3893f3fae628a131dd", + "source382/data/final/bitE8-kernel.json.gz": "947f6e1266f009c6c54647e0b348b1e2076bb584b54fae19016bc8086741876a", + "source382/data/input/bitE8-r865.json.gz": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "source382/data/pr377/GLOBAL-REVIEW.json": "5ab0d754c01500879dd6c2a70322d08016e2917b3f5f84655923d383729411ad", + "source382/stages/kernel-selection.json": "9a05666d6a0607a599c683fc3d51d6fa1fc9eb8ea2c040d160cca565212e58a7", + "source382/stages/retime-selection.json": "29cc4e68d8c8026e9652171656d8c5bf35ff4dc67ef1d03fd057162d1be6d78a", + "source382/verify.sh": "79f156d22a9163f244b4716c71e110259584988dc232c4a37a59abc3bfff5d58", + "verify.py": "54951c55aac653827ab77f4ffe95078599a723f987bd993e327c2dcd14e3b799" +} diff --git a/research/e8-retimed-nine-composition/NOTICE.md b/research/e8-retimed-nine-composition/NOTICE.md new file mode 100644 index 0000000000..f336b20833 --- /dev/null +++ b/research/e8-retimed-nine-composition/NOTICE.md @@ -0,0 +1,11 @@ +# Attribution + +Source-bound composition and replay harness: Rohan Arun, with OpenAI Codex assistance. Apache-2.0. + +Complex retiming: Ali Romman (aliromman), PR #365, a22270515e9c6102dda3b22e75ca2c62e82812ff. The unchanged source365 package contains his proof, reconstruction, scalar-map comparison, data and notices. + +Nine-stage complex construction: Zhihao Chen (jacklightChen), with OpenAI Codex assistance, PR #377, d0a620fcc99ba012468d61d01f5bb14007076d50. His full package, proof and upstream notices remain unchanged in source377. + +Kernel bit supplier: Chafik Boukhalfa (chafreaky), with substantial Anthropic Claude assistance, PR #382, 015f00b8da94197f3cef02a60e728c195f8047a6. His unchanged source382 package includes the earlier stage lineage and full credits. + +The underlying E8 certificate is Jacob Sussman's. Earlier bit suppliers and generalized guards include Dylan Crow (utcorvusvolat-dotcom), DaysSky, and the authors credited in the retained notices. No ownership of their local constructions or proofs is claimed here. diff --git a/research/e8-retimed-nine-composition/README.md b/research/e8-retimed-nine-composition/README.md new file mode 100644 index 0000000000..966b1571a7 --- /dev/null +++ b/research/e8-retimed-nine-composition/README.md @@ -0,0 +1,34 @@ +# Retimed nine-stage complex with the kernel bit supplier + +Conditional **kappa = 0.000998390813251625** (`7987126506013/8000000000000000`), **0.014791889125625176% above PR #382**. The complex component binds: `b = 999388595603943/10^18`, while the unchanged #382 bit component supplies `c = 251726760077483/250000000000000000`. + +The composition places Ali Romman's [PR #365](https://github.com/CrocSwap/integer-mult-bounds/pull/365) retimed complex unit in Zhihao Chen's [PR #377](https://github.com/CrocSwap/integer-mult-bounds/pull/377) nine-stage layout and pairs it with Chafik Boukhalfa's [PR #382](https://github.com/CrocSwap/integer-mult-bounds/pull/382) kernel bit word. This contributes the source-bound composition and fresh global replay; the local retiming, bit kernel, and nine-stage construction remain their authors' work. + +## Reproduce + +Python 3.11+, a C++17 compiler, Boost, and the dependencies in `requirements.txt` are needed: + +```sh +python -m pip install -r research/e8-retimed-nine-composition/requirements.txt +python -B research/e8-retimed-nine-composition/verify.py /fresh/output/directory +``` + +The output must not exist. On macOS use `--boost-include /opt/homebrew/include`. GitHub CI runs Python 3.11 and 3.14. All generated files stay outside the package. + +The verifier runs the full unchanged #382 baseline including its five-stage regression, both producer stages, integer source-span rule, local and global F2 columns, mutation controls, exact Gram checks, width-56 banks, degree-two guard, two exact moment engines, and outer assembly. It also runs all eight stages of the unchanged #377 complex verifier and the complete #365 reconstruction and rational scalar-map comparison. + +It then derives a separate working copy of #377, changing only the certificate, certificate/census pins, the expected local child count (3974 to 3973), and expected rational price. `DERIVATION.json` records every old and new file hash. The original source packages stay byte-identical and are checked again at completion. Candidate input and count pins are frozen before execution; no validation is disabled. + +Fresh candidate checks cover the complete local dirty scalar words and erased scratch, exact Clifford representatives for 948 frames and 3,122 directed transitions, data routes and Gaussian phases, nine-stage owner injections, 56,376 residual assignments, the complete emitted template, all 14,727 terminal cover corrections, global mutation controls, the finite invoice, two rational moment engines, all 47 outer inequalities, and adjacent-grid rejection. + +## Change in the profile + +The local retiming removes one paid call and preserves rank mass. Nine stages times eight replicas remove 72 calls. The global rank-count difference is `{1:+144, 2:-432, 3:+288, 4:+72, 5:-432, 6:+288}`. The freshly emitted profile has 310,383 calls, rank mass 1,072,575 and deficit 2,496, with `m=73`, live stock 14,727, physical stock 15,520, and maximum child 48. Halving degree two, row coefficient 15,445 below the retained 20,161, and the 49B induction gap remain unchanged. + +## Conditional scope and open obligations + +This retains every #382 bit admission and open obligation. In particular, its E8 kernel entrance completion remains inherited from its earlier lineage; its seven-block PR234-style port geometry and full finite bill at m=56 are not independently discharged here. We rerun its existing checks and its stated generalized degree-two guard. Its global F2 columns alone do not prove the complete integer circuit. + +The complex side retains #377's compressed-window lift, arbitrary-dirty-bank composition, exact Clifford/compiler, all-cover symbolic route argument, tape/common-grid/row, and all-size analytic interfaces. Its dimension m=73 and degree-two induction interpretation remain explicit assumptions. This PR freshly checks the changed component's full finite template and invoice but does not supply a new Lean proof or an unconditional multiplication exponent. + +`SOURCES.json` pins all three supplier commits. Licenses, notices, original manifests, proof documents, and checkers are retained. Outside this package, the three joint-dual source-pin metadata files reuse #318's repair without a mathematical change. diff --git a/research/e8-retimed-nine-composition/SOURCES.json b/research/e8-retimed-nine-composition/SOURCES.json new file mode 100644 index 0000000000..e4e59e7d30 --- /dev/null +++ b/research/e8-retimed-nine-composition/SOURCES.json @@ -0,0 +1,21 @@ +{ + "bit": { + "pr": 382, + "head": "015f00b8da94197f3cef02a60e728c195f8047a6", + "manifest_sha256": "05f782fdfa4b5c16afb90d8fb09f473ce3a6b620884ecd63fbb34fc4ae173d84" + }, + "complex": { + "pr": 377, + "head": "d0a620fcc99ba012468d61d01f5bb14007076d50", + "manifest_sha256": "3743f954b5a652e51fa9ae5101318345d79f4c897ff9a29d5c54387b92118458" + }, + "retiming": { + "pr": 365, + "head": "a22270515e9c6102dda3b22e75ca2c62e82812ff", + "certificate_sha256": "31467ace2b1667630b72e488e688911a0404b4755d0d2c87560b111ed4c07998" + }, + "comparison": { + "pr": 382, + "kappa": "998243154231047/1000000000000000000" + } +} diff --git a/research/e8-retimed-nine-composition/candidate-five-pins.json b/research/e8-retimed-nine-composition/candidate-five-pins.json new file mode 100644 index 0000000000..e1f30ed209 --- /dev/null +++ b/research/e8-retimed-nine-composition/candidate-five-pins.json @@ -0,0 +1,58 @@ +{ + "V": 120, + "R": 783, + "H": 9, + "cst": 72, + "N": 9039, + "frames": 948, + "scatter": "8178452d0315a0e454b6230b41fd4dca2a55b5519718a2c1ba523f60917a79d4", + "gates": [ + 775, + 1220 + ], + "centre_ranks": [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9 + ], + "label_histogram": { + "1": 2093, + "2": 598, + "3": 522, + "4": 141, + "5": 209, + "6": 335, + "7": 43, + "8": 24, + "9": 8 + }, + "ledger": [ + 20825, + 56715, + 120, + 20 + ], + "scalar_steps": [ + 68158, + 72856 + ], + "climbed": { + "A": 1237, + "B": 1953, + "final": 775 + }, + "climb_forward": 3965, + "climb_backward": 3965, + "local_bill": 839936556184, + "stock_bits": [ + 947, + 957, + 958, + 963 + ] +} diff --git a/research/e8-retimed-nine-composition/requirements.txt b/research/e8-retimed-nine-composition/requirements.txt new file mode 100644 index 0000000000..3b2951f558 --- /dev/null +++ b/research/e8-retimed-nine-composition/requirements.txt @@ -0,0 +1,3 @@ +numpy>=2.0,<3 +sympy==1.14.0 +mpmath==1.3.0 diff --git a/research/e8-retimed-nine-composition/source365/NOTICE.md b/research/e8-retimed-nine-composition/source365/NOTICE.md new file mode 100644 index 0000000000..8bbad70301 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/NOTICE.md @@ -0,0 +1,78 @@ +# Attribution and scope of new work + +Jacob Sussman supplied the E8 label family, circuit, scatter, frame scheduler, +checkers, price routines, and general proof framework in +`jacobalansussman/wht-power-saving-lean`, commit +`9c94857bbaee886f8649edee0bc2d3c738f9555e`. + +`data/original.json.gz` is an unchanged copy from that commit. The new +certificate derives from that file. This package uses the repository's +[Apache-2.0 license](../../LICENSE). The source notices that apply to the +retained certificate are copied below. + +DaysSky's CrocSwap PR352 supplies the connection to the complex branch and the +exact coarse-moment convention used here. Its commit +`04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2`, source paths, and hashes are +recorded in `sources.json`. Prior frame-retiming contributions +include CrocSwap PR328 and PR350. No claim of priority for the general method is +made. + +The new work consists of four explicit frame changes, a deterministic +generator, independent scalar and frame checks, exact rational cost bounds, +and the short cost proof. OpenAI Codex and its research agents supplied +substantial assistance. New contributions are +offered under the repository's Apache-2.0 license. + +Attribution does not imply review or endorsement by the credited authors. + +## Upstream notice excerpts + +The following text is copied from the copyright header and sections 4 and 8 +of the [upstream NOTICE](https://github.com/jacobalansussman/wht-power-saving-lean/blob/9c94857bbaee886f8649edee0bc2d3c738f9555e/NOTICE). +References within these excerpts refer to that source repository. + +```text +Walsh-Hadamard power saving (wht-power-saving-lean) +Copyright 2026 Jacob Sussman + +Repository: https://github.com/jacobalansussman/wht-power-saving-lean + +4. How the new files were made. + Jacob Sussman made the new files on 2026-10-08, 2026-10-09 and 2026-10-10 + by directing a team of AI agents (Claude). The agents wrote the new Lean + files, the certificate data and the generator scripts. They made the + rebuild scripts under tools/rebuild/, in part by adapting programs of + CrocSwap/integer-mult-bounds (section 6): ten of the thirteen on + 2026-10-09, tidied for this repository on 2026-10-10, and three on + 2026-10-10. On 2026-10-10 they also wrote the search programs under + tools/e8/ and found with them the certificate of the fourth result + (section 8). See README.md, section 4. + +8. The certificate of the fourth result and the search programs. + tools/certificate/gcert1-e8-r783.json.gz, the Lean data modules + generated from it (Work/GCert/Data/Gen/E8*.lean, Work/GCert/Data/Gen/E8/ + and the modules of Work/GCert/Data/ with E8 or B2Ge8 in their names) and + the Python programs under tools/e8/ were made by the agents for this + repository on 2026-10-10 (section 4). The circuit in that certificate + is not the circuit of section 6, and no data file of + CrocSwap/integer-mult-bounds was loaded to make it. It uses three + devices that were published by others in pull requests to that + repository: + - the in-place pair, a + b and a - b formed on the two arrays that held + a and b: icekylinx (#184), carried in #191 and #193 (ikeboy); + - the re-use of a finished helper with a compensating read: jamesyc + (#124) and eumemic (#143); + - the late pairing rule, the choice of which finished helper a new + value takes: Chafik Boukhalfa (the account chafreaky), #200 and #233, + and pull request #2 of this repository. The search programs apply the + idea with a greedy rule of their own; his program, his pairs and his + certificate were not used. + No program of that repository is included in tools/e8/, imported or + run by it. The programs of tools/e8/ have not been compared statement + by statement with the programs of that repository, as those of + tools/rebuild/ were (section 6). The integer programme of + tools/e8/ is solved with the open-source solver HiGHS, called through + SciPy (scipy.optimize.milp), with NumPy; none of the three is included + here. The credits, with links, are in README.md ("Whose ideas the new + unit uses") and in RELATED-WORK.md, section 8. +``` diff --git a/research/e8-retimed-nine-composition/source365/PROOF.md b/research/e8-retimed-nine-composition/source365/PROOF.md new file mode 100644 index 0000000000..332d30c265 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/PROOF.md @@ -0,0 +1,170 @@ +# Four E8 frame changes + +All gate and register indices below are zero-based indices in the original +certificate. Binary frames are given by integer bit masks. The new certificate +has uncompressed SHA-256 +`3191011e0cb189665c8e0a9b97137dbed50241a0704c8be01c11b1b5a9518fc2`. + +## Circuit changes + +1. Remove `helper388 -= source64` and `helper771 += source64` from A65. + Insert those two additions just before A187, at frame 285 with basis + `[196,56]`. No gate A66 through A186 touches any of these three registers. + Source 64 has label 56. +2. Remove `helper693 += source98` and `helper839 -= source98` from A100. + Insert those two additions just before A198, at frame 296 with basis + `[257,243,14]`. No gate A101 through A197 touches any of these three + registers. Source 98 has label 253, and `253 = 243 XOR 14`. +3. In B193, B916, and B917, replace frame 599, with basis + `F=[276,148,84,51,15]`, by `G=[256,128,64,39,20,15]`. + These gates add helper807 to helper766, distribute plus or minus half of + helper807 to targets149 and155, and add helper766 to helper807. +4. In B873 and B874, replace frame 585, with basis `[161,81,9,5,3]`, + by `[305,161,81,9,5,3]`. The first gate adds half of helper550 to target198 + and subtracts half of helper550 from target202. The second gate adds + helper521 to helper550. + +The first two changes move additions only across gates that touch disjoint +registers. Such scalar operations commute, for all initial register values. +Neither change crosses the scatter. The last two changes keep all scalar +operations and their order. Thus the complete scalar operator and the retained +totals at scatter stay the same. The verifier also compares the complete +1023-by-1023 rational scalar matrices. + +All paths remain nested. The verifier checks actual binary subspace inclusion, +not only dimensions. For the third change, `G=F+span(256)` has dimension six. +The identities + +``` +276 = 256 XOR 20 +148 = 128 XOR 20 +84 = 64 XOR 20 +51 = 39 XOR 20 +``` + +show that F is contained in G. The preceding helper frames are contained in F. +The next helper frames are + +``` +helper766: [256,128,64,37,20,13,2] +helper807: [256,128,64,38,20,14,1] +``` + +They contain G because `39=37 XOR 2=38 XOR 1` and +`15=13 XOR 2=14 XOR 1`. The final target frames also contain G: + +``` +target149: [256,128,64,32,18,8,6,1] +target155: [256,128,64,34,16,10,4,1] +``` + +For target149, use `39=32 XOR 6 XOR 1`, `20=18 XOR 6`, and +`15=8 XOR 6 XOR 1`. For target155, use `39=34 XOR 4 XOR 1`, +`20=16 XOR 4`, and `15=10 XOR 4 XOR 1`. + +For the fourth change, let `F=span(161,81,9,5,3)` and +`G=F+span(305)`. These frames have dimensions five and six. All preceding +frames are contained in F. The next frame of helper521 is +`span(257,145,81,48,9,5,3)`. The next frame of helper550 and both targets is +`span(304,160,80,8,4,2,1)`. Both contain F. They contain the added vector +because `305=257 XOR 48=304 XOR 1`. Thus both contain G, and the paths +remain nested. + +## Child ranks + +Each climb contributes a child whose rank is the increase in frame dimension. +The four changes affect disjoint sets of registers. Thus their histogram +differences add. + +| Change | Register | Old child ranks | New child ranks | +| --- | --- | --- | --- | +| 1 | source64 | 5,3 | 1,4,3 | +| 1 | helper388 | 1,1,2,2,3 | 2,2,2,3 | +| 1 | helper771 | 1,1,1,3,1,2 | 2,1,3,1,2 | +| 2 | source98 | 5,3 | 2,3,3 | +| 2 | helper693 | 1,2,1,5 | 3,1,5 | +| 2 | helper839 | 1,2,1,2,1,1,1 | 3,1,2,1,1,1 | +| 3 | helper766 and helper807, each | 3,2,2,1,1 | 3,3,1,1,1 | +| 3 | target149 and target155, each | 5,3 | 6,2 | +| 4 | target198 and target202, each | 5,2,1 | 6,1,1 | +| 4 | helper521 | 2,1,2,2,1,1 | 2,1,2,1,1,1,1 | +| 4 | helper550 | 2,1,2,2,2 | 2,1,3,1,2 | + +The combined invocation histogram difference is + +``` +rank: 1 2 3 4 5 6 +change: +2 -6 +4 +1 -6 +4 +``` + +Its rank mass is zero and its child count is minus one. Copy cost remains 72. +The five-stage histogram is five times the invocation histogram, plus 240 +children at each rank 4, 8, 16, and 20. Therefore its rank mass remains 56,715, +with dimension m=45, stock W=1263, and deficit mW-56715=120. + +## Strict cost inequality + +Let a be a saving, with 0 1 +M_candidate(876412559609473 / 10^18) < 1 +M_candidate(876412559609474 / 10^18) > 1. +``` + +The logarithm uses the atanh series with a positive geometric tail bound. +Arguments are reduced to [1,2]. The exponential uses a Taylor polynomial of degree 20 with +a geometric tail bound. All arithmetic in these enclosures is rational. +Decimals in the saved result are only displays of the proved margins. + +## Limits + +This proves the finite circuit and recursive-cost improvement under the +stated convention. The general frame-transfer and recursion theorems remain +dependencies. A complete scalar identity is not a proof of the tape compiler +or the integer-multiplication assembly. No global optimum or larger final +integer-multiplication saving is claimed. + +The local verifier checks the finite rational circuit, its frame paths, and +the stated moment. It does not run the upstream checkers or their Lean +representation checks for separate positive and negative parts and digit +limits. The disjoint operations in the first two changes commute in those +representations as well: each moved addition crosses only operations on other +registers. The last two changes leave the scalar operations in place. This +preserves the scalar computation from the pinned baseline; it does not replace +a build of new Lean data. diff --git a/research/e8-retimed-nine-composition/source365/README.md b/research/e8-retimed-nine-composition/source365/README.md new file mode 100644 index 0000000000..50593e7050 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/README.md @@ -0,0 +1,80 @@ +# E8 complex cost from four coupled frame changes + +This package changes Jacob Sussman's E8 circuit at commit +`9c94857bbaee886f8649edee0bc2d3c738f9555e`. It gives a smaller recursive moment with +the same 783 helpers, copy cost 72, rank mass 56,715, and deficit 120. + +| Quantity | Original | Candidate | +| --- | ---: | ---: | +| Conditional complex saving under PR352's fallback convention | 876248285600677 / 10^18 | 876412559609473 / 10^18 | +| Children in one invocation | 3974 | 3973 | +| Children in five stages | 20830 | 20825 | +| Scalar additions, including scatter | 3876 | 3876 | + +The conditional saving increases by about 0.01875%. + +Four phase-A additions move to two later frames. Two sets of phase-B gates use +larger frames. The original frame table gains two entries. All scalar coefficients, +retained totals, and scatter coefficients stay the same. The complete rational +scalar operator also stays the same, including its dependence on every initial +helper value. + +[PROOF.md](PROOF.md) gives the exact edits and a strict cost inequality for every +saving between zero and one. It does not rely on the approximate moment root. + +## Reproduce + +From the repository root, run: + +```sh +python3 -B research/e8-coupled-retiming/verify.py +``` + +The script uses Python and its standard library. It checks source hashes, +rebuilds the candidate, checks every frame path, reconstructs the scalar source +map and histogram, and compares all 1,046,529 entries of the complete scalar maps. +A coefficient identity checks the +strict-concavity proof for the full saving interval. Exact rational bounds prove both +reported savings. In each case the next 10^-18 grid point fails. Four damaged +inputs must fail for their stated reasons. + +To write the candidate to another file, run: + +```sh +python3 -B research/e8-coupled-retiming/retime.py /tmp/e8-retimed.json.gz +``` + +The saved verification result is `verification.json`. Run the script to obtain +a fresh result; the script does not use that saved result as an input. + +## Scope + +This is a finite complex-circuit improvement. It does not change the selected +integer-multiplication result, the bit circuit, or its saving. + +The new certificate has not been compiled in Lean. The original certificate's +Lean data and theorem do not certify this changed file. A formal extension must +generate and compile new data. The general frame-transfer, helper cleanup, +recursive construction, and multiplication assembly remain inherited +dependencies. The complete scalar-map comparison does not prove those steps. +The script does not run the upstream checkers or their Lean representation +checks for separate positive and negative parts and digit limits. + +## Source and search + +The baseline is Sussman's `tools/certificate/gcert1-e8-r783.json.gz`. The exact +commit and original-data hash are in `sources.json`. The E8 complex +connection and fallback convention follow CrocSwap PR352 at +`04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2`. The exact reference paths and +hashes are recorded as mathematical provenance in `sources.json`; those files +are not imported or run. Earlier retiming +work includes Sussman's `tools/e8/sched.py` and CrocSwap PR328 and PR350. +This package supplies a new E8 witness; it does not claim to invent retiming. + +The candidate came from bounded searches over pairs of moves and common +intermediate frames. Frames came from existing stops and their joins or +intersections. A later search moved two more complete gates to one common +intermediate frame. These searches do not establish +global optimality. The search is not needed to reproduce or verify the witness. + +See [NOTICE.md](NOTICE.md) for attribution and AI assistance. diff --git a/research/e8-retimed-nine-composition/source365/data/original.json.gz b/research/e8-retimed-nine-composition/source365/data/original.json.gz new file mode 100644 index 0000000000..0bd0bacf74 Binary files /dev/null and b/research/e8-retimed-nine-composition/source365/data/original.json.gz differ diff --git a/research/e8-retimed-nine-composition/source365/data/retimed.json.gz b/research/e8-retimed-nine-composition/source365/data/retimed.json.gz new file mode 100644 index 0000000000..efdb76ecf3 Binary files /dev/null and b/research/e8-retimed-nine-composition/source365/data/retimed.json.gz differ diff --git a/research/e8-retimed-nine-composition/source365/reconstruct.py b/research/e8-retimed-nine-composition/source365/reconstruct.py new file mode 100644 index 0000000000..9cefd8ec9d --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/reconstruct.py @@ -0,0 +1,226 @@ +"""Check the E8 scalar map, frame paths, and recursive cost from one certificate. + +This file uses only the Python standard library. It imports no supplier code. +The checks do not prove the all-size tape compiler or the multiplication theorem. +""" + +import argparse +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +import gzip +import hashlib +import json +from pathlib import Path + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def add(row, source, coefficient): + for key, value in source.items(): + increment = coefficient * value + require(6 % increment.denominator == 0, "Scalar increment is not in sixths") + result = row.get(key, Q(0)) + increment + if result: + row[key] = result + else: + row.pop(key, None) + + +def elements(basis): + result = {0} + for vector in basis: + require(vector not in result, "Dependent frame basis") + result |= {x ^ vector for x in result} + return frozenset(result) + + +@lru_cache(None) +def logarithm(ratio): + def small(value): + t = (value - 1) / (value + 1) + total = Q(0) + power = t + terms = 80 + for j in range(terms): + total += 2 * power / (2 * j + 1) + power *= t * t + tail = 2 * power / ((2 * terms + 1) * (1 - t * t)) + return total, total + tail + + exponent = 0 + while ratio >= 2: + ratio /= 2 + exponent += 1 + lo, hi = small(ratio) + a, b = small(Q(2)) + return lo + exponent * a, hi + exponent * b + + +def exponential(value): + require(0 <= value < 1, "Exponential bound requires an argument below one") + total = term = Q(1) + for j in range(1, 21): + term *= value / j + total += term + tail = term * value / 21 / (1 - value / 22) + return total, total + tail + + +def moment(histogram, dimension, stock, saving, fallback=True): + lo = hi = Q(0) + terms = {rank: Q(count) for rank, count in histogram.items()} + if fallback: + terms[1] = terms.get(1, Q(0)) + Q( + 32 * dimension * dimension * sum(histogram.values()), 10**16 + ) + for rank, count in terms.items(): + a, b = logarithm(Q(dimension, rank)) + lower = exponential(saving * a)[0] + upper = exponential(saving * b)[1] + weight = count * rank / (dimension * stock) + lo += weight * lower + hi += weight * upper + return lo, hi + + +def reconstruct(c): + require(c["format"] == "gcert/1", "Certificate format") + h, v, helpers = c["h"], c["v"], c["R"] + require((h, v) == (9, 120), "This audit is for the E8 label family") + require(not c["ext"], "Exterior gauges are outside this audit") + ports = c["ports"] + require(len(ports) == v and set(ports) == {p for p in range(512) if p.bit_count() in (3, 7)}, "E8 ports") + require(c["frames"][0] == [] and c["frames"][1] == [1 << i for i in range(h - 1, -1, -1)], "Frame endpoints") + for basis in c["frames"]: + require(all(0 < vector < 512 for vector in basis), "Frame outside ambient space") + pivots = [vector.bit_length() - 1 for vector in basis] + require(pivots == sorted(set(pivots), reverse=True) and all( + not (vector >> pivot & 1) + for i, vector in enumerate(basis) for j, pivot in enumerate(pivots) if i != j + ), "Noncanonical frame basis") + spaces = [elements(f) for f in c["frames"]] + dimensions = [len(f) for f in c["frames"]] + require(len(set(spaces)) == len(spaces), "Duplicate frame spaces") + require(all(all(0 <= x < 512 for x in s) for s in spaces), "Frame outside ambient space") + total = 2 * v + helpers + require(len(c["start"]) == len(c["final"]) == total, "Endpoint count") + require(all(0 <= frame < len(spaces) for frame in c["start"] + c["final"]), "Endpoint frame index") + current = list(c["start"]) + rows = [{i: Q(1)} if i < v else {} for i in range(total)] + by_role = {kind: Counter() for kind in "xysc"} + allowed = {("x", "s"), ("s", "s"), ("s", "y"), ("x", "y"), ("x", "x")} + + def kind(register): + return "x" if register < v else "y" if register < 2 * v else "s" + + def climb(register, frame): + previous = current[register] + require(spaces[previous] <= spaces[frame], "A frame path is not nested") + if previous != frame: + by_role[kind(register)][dimensions[frame] - dimensions[previous]] += 1 + current[register] = frame + + for i, port in enumerate(ports): + require(spaces[current[i]] == {0, port}, "Source start") + require(spaces[c["final"][i]] == frozenset(range(512)), "Source final") + require(spaces[current[v + i]] == {0}, "Target start") + require(spaces[c["final"][v + i]] == {x for x in range(512) if (x & port).bit_count() % 2 == 0}, "Target final") + for i in range(2 * v, total): + require(spaces[current[i]] == {0} and len(spaces[c["final"][i]]) == 512, "Helper endpoints") + + def run(gates, phase): + for gate in gates: + require(gate[0] in ("in", "out") and len(gate) == (5 if gate[0] == "out" else 4), "Unsupported gate") + tag, frame, pivot, terms = gate[:4] + require(0 <= frame < len(spaces), "Gate frame index") + spectators = gate[4] if tag == "out" else [] + registers = [pivot] + [r for r, _, _ in terms] + spectators + require(len(set(registers)) == len(registers), "Aliased gate ports") + require(all(0 <= r < total for r in registers), "Register outside circuit") + require(phase == "B" or all(kind(r) != "y" for r in registers), "Early target operation") + for register in registers: + climb(register, frame) + for register, numerator, denominator in terms: + target, source = (pivot, register) if tag == "in" else (register, pivot) + require((kind(source), kind(target)) in allowed, "Unsupported scalar direction") + require(phase == "B" or (kind(source), kind(target)) in {("x", "s"), ("s", "s")}, "Unsupported phase-A scalar direction") + require(denominator > 0, "Coefficient denominator") + add(rows[target], rows[source], Q(numerator, denominator)) + + run(c["A"], "A") + retained = c["ret"] + require(sorted(k for k, _, _ in retained) == list(range(len(retained))), "Retained total indices") + totals = {} + for k, register, frame in retained: + require(2 * v <= register < total and current[register] == frame, "Retained total frame") + totals[k] = dict(rows[register]) + by_role["c"][dimensions[frame]] += 1 + require(all(spaces[current[v + i]] == {0} for i in range(v)), "Target moved before scatter") + require(len(c["scat"]["table"]) == v, "Scatter size") + for target, entries in enumerate(c["scat"]["table"]): + for k, numerator, denominator in entries: + require(k in totals and denominator > 0, "Scatter entry") + add(rows[v + target], totals[k], Q(numerator, denominator)) + run(c["B"], "B") + require(all(rows[i] == {i: Q(1)} and rows[v + i] == {i: Q(1)} for i in range(v)), "Clean-source scalar identity") + for i, frame in enumerate(c["final"]): + climb(i, frame) + recorded = {kind: {int(r): n for r, n in hist.items()} for kind, hist in c["blocks"].items()} + require(by_role == recorded, "Recorded histogram differs from actual paths") + invocation = sum(by_role.values(), Counter()) + copy_cost = sum(rank * count for rank, count in by_role["c"].items()) + require(copy_cost == c["cst"], "Copy cost") + mass = sum(rank * count for rank, count in invocation.items()) + require(mass == c["N"] == helpers * h + 2 * v * (h - 1) + copy_cost, "Telescoping rank identity") + histogram = Counter({rank: 5 * count for rank, count in invocation.items()}) + for rank in (h - 1, 2 * h - 2, 2 * h + 2, 4): + histogram[rank] += 2 * v + dimension, stock = 5 * h, 4 * v + helpers + deficit = dimension * stock - sum(rank * count for rank, count in histogram.items()) + require(deficit == 4 * v - 5 * copy_cost, "Five-stage deficit") + return { + "h": h, "v": v, "helpers": helpers, "frames": len(spaces), + "source_columns": v, "copy_cost": copy_cost, + "invocation_histogram": dict(sorted(invocation.items())), "invocation_mass": mass, + "m": dimension, "W": stock, "histogram": dict(sorted(histogram.items())), + "rank_mass": dimension * stock - deficit, "deficit": deficit, + "scope": "Exact scalar source columns and frame paths. The general dirty and frame transfer theorems remain dependencies. No tape compiler or Lean build is checked.", + } + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("certificate", type=Path) + parser.add_argument("--saving", default="876248285600677/1000000000000000000") + parser.add_argument("--output", type=Path) + args = parser.parse_args() + blob = args.certificate.read_bytes() + raw = gzip.decompress(blob) if blob[:2] == b"\x1f\x8b" else blob + result = reconstruct(json.loads(raw)) + result["source_sha256"] = hashlib.sha256(raw).hexdigest() + saving = Q(args.saving) + lower, upper = moment(result["histogram"], result["m"], result["W"], saving) + following = moment(result["histogram"], result["m"], result["W"], saving + Q(1, 10**18)) + require(upper < 1, "Requested saving is not certified") + result["saving"] = str(saving) + scale = 2**256 + lo = lower - 1 + hi = upper - 1 + enclosed = [Q(lo.numerator * scale // lo.denominator, scale), + Q(-((-hi.numerator * scale) // hi.denominator), scale)] + result["moment_minus_one"] = list(map(str, enclosed)) + result["interval_method"] = "Exact rational log and exp bounds; outward rounding to 256 bits for the saved interval." + result["adjacent_grid_excluded"] = following[0] > 1 + result["moment_gap_decimal"] = float(1 - upper) + text = json.dumps(result, indent=2) + "\n" + if args.output: + args.output.write_text(text) + print(json.dumps({k: result[k] for k in ("source_sha256", "helpers", "copy_cost", "invocation_mass", "rank_mass", "deficit", "saving", "moment_gap_decimal", "adjacent_grid_excluded")}, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/e8-retimed-nine-composition/source365/retime.py b/research/e8-retimed-nine-composition/source365/retime.py new file mode 100644 index 0000000000..db25baf196 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/retime.py @@ -0,0 +1,102 @@ +"""Change E8 frame assignments and count the resulting blocks.""" + +from collections import Counter +from copy import deepcopy +import gzip +import hashlib +import json +from pathlib import Path +import sys + + +ROOT = Path(__file__).resolve().parent +SOURCE_SHA256 = "3594f19c4d01cf11fb930c5c61baeed399620acbc5b94096b16bcacb23997dd3" +# All positions refer to the original, zero-based phase-A gate list. +MOVES = ((65, 187, 64, (388, 771), 285), + (100, 198, 98, (693, 839), 296)) + + +def registers(gate): + return {gate[2]} | {term[0] for term in gate[3]} | set(gate[4] if gate[0] == "out" else []) + + +def build(source): + candidate = deepcopy(source) + additions = {} + for origin, destination, source_register, targets, frame in MOVES: + gate = candidate["A"][origin] + assert gate[0] == "out" and gate[2] == source_register and not gate[4] + selected = [term for term in gate[3] if term[0] in targets] + assert len(selected) == len(targets) + touched = {source_register, *targets} + # The moved additions commute with every gate they cross. + assert all(not (registers(g) & touched) for g in source["A"][origin + 1:destination]) + assert source["A"][destination][1] == frame + gate[3] = [term for term in gate[3] if term[0] not in targets] + additions[destination] = ["out", frame, source_register, selected, []] + candidate["A"] = [g for i, gate in enumerate(candidate["A"]) + for g in ([additions[i], gate] if i in additions else [gate])] + frame = len(candidate["frames"]) + assert frame == 946 + candidate["frames"].append([256, 128, 64, 39, 20, 15]) + for index in (193, 916, 917): + assert candidate["B"][index][1] == 599 + candidate["B"][index][1] = frame + frame = len(candidate["frames"]) + assert frame == 947 + assert candidate["frames"][585] == [161, 81, 9, 5, 3] + assert candidate["B"][873] == ["out", 585, 550, [[198, 1, 2], [202, -1, 2]], []] + assert candidate["B"][874] == ["in", 585, 550, [[521, 1, 1]]] + candidate["frames"].append([305, 161, 81, 9, 5, 3]) + for index in (873, 874): + candidate["B"][index][1] = frame + candidate["derived_from"] = ( + "Three frame changes from Sussman E8 at 9c94857b; see PROOF.md" + "; move B873 and B874 to one common rank-six frame" + ) + + current = list(candidate["start"]) + blocks = {role: Counter() for role in "xysc"} + v = candidate["v"] + + def climb(register, frame): + old = current[register] + if old != frame: + role = "x" if register < v else "y" if register < 2 * v else "s" + rank = len(candidate["frames"][frame]) - len(candidate["frames"][old]) + assert rank > 0 + blocks[role][rank] += 1 + current[register] = frame + + for phase in ("A", "B"): + if phase == "B": + for _, register, frame in candidate["ret"]: + assert current[register] == frame + blocks["c"][len(candidate["frames"][frame])] += 1 + for gate in candidate[phase]: + for register in registers(gate): + climb(register, gate[1]) + for register, frame in enumerate(candidate["final"]): + climb(register, frame) + candidate["blocks"] = {role: {str(r): count for r, count in sorted(hist.items())} + for role, hist in blocks.items()} + assert sum(r * n for hist in blocks.values() for r, n in hist.items()) == candidate["N"] + return candidate + + +def main(): + if sys.flags.optimize: + raise SystemExit("Assertions must remain enabled for generation") + raw = gzip.decompress((ROOT / "data/original.json.gz").read_bytes()) + assert hashlib.sha256(raw).hexdigest() == SOURCE_SHA256 + candidate = build(json.loads(raw)) + output = Path(sys.argv[1]) if len(sys.argv) > 1 else ROOT / "data/retimed.json.gz" + raw = json.dumps(candidate, separators=(",", ":")).encode() + with output.open("wb") as stream: + with gzip.GzipFile(filename="", mode="wb", fileobj=stream, mtime=0) as zipped: + zipped.write(raw) + print(hashlib.sha256(raw).hexdigest()) + + +if __name__ == "__main__": + main() diff --git a/research/e8-retimed-nine-composition/source365/scalar_map_comparison.py b/research/e8-retimed-nine-composition/source365/scalar_map_comparison.py new file mode 100644 index 0000000000..f814448cf7 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/scalar_map_comparison.py @@ -0,0 +1,71 @@ +"""Compare every row of the complete rational scalar maps of two certificates.""" + +from fractions import Fraction +import gzip +import hashlib +import json +from pathlib import Path +import sys + + +def word(certificate): + additions = [] + for phase in ("A", "B"): + if phase == "B": + retained = {k: register for k, register, _ in certificate["ret"]} + for target, terms in enumerate(certificate["scat"]["table"]): + additions.extend((certificate["v"] + target, retained[k], Fraction(a, b)) for k, a, b in terms) + for gate in certificate[phase]: + tag, _, pivot, terms = gate[:4] + for register, a, b in terms: + target, source = (pivot, register) if tag == "in" else (register, pivot) + additions.append((target, source, Fraction(a, b))) + return additions + + +def row(additions, output): + result = {output: Fraction(1)} + for target, source, coefficient in reversed(additions): + value = result.get(target, 0) + if value: + result[source] = result.get(source, 0) + coefficient * value + if not result[source]: + del result[source] + return result + + +def compare(certificates): + """Compare the complete scalar maps, including all initial helper values.""" + a, b = certificates + assert all(a[key] == b[key] for key in ("h", "v", "R", "ports", "scat")) + n = 2 * a["v"] + a["R"] + words = [word(certificate) for certificate in certificates] + assert len(words[0]) == len(words[1]) + counts = [] + for output in range(n): + original, candidate = (row(additions, output) for additions in words) + assert original == candidate, output + counts.append(len(original)) + return { + "complete_scalar_maps_equal": True, + "rows": n, + "columns": n, + "nonzero_entries": sum(counts), + "elementary_additions": len(words[0]), + "scope": "Exact full rational scalar map, including arbitrary source, target, and helper initial values. Frame transforms and compiled cleanup are separate obligations." + } + + +def main(): + if sys.flags.optimize: + raise SystemExit("Assertions must remain enabled for verification") + assert len(sys.argv) == 3 + raws = [gzip.decompress(Path(path).read_bytes()) for path in sys.argv[1:]] + result = compare([json.loads(raw) for raw in raws]) + result["uncompressed_sha256"] = [hashlib.sha256(raw).hexdigest() for raw in raws] + result["source_files"] = sys.argv[1:] + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/e8-retimed-nine-composition/source365/sources.json b/research/e8-retimed-nine-composition/source365/sources.json new file mode 100644 index 0000000000..68edc2307c --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/sources.json @@ -0,0 +1,26 @@ +{ + "repository": "https://github.com/jacobalansussman/wht-power-saving-lean", + "commit": "9c94857bbaee886f8649edee0bc2d3c738f9555e", + "mathematical_provenance": { + "repository": "https://github.com/DaysSky/integer-mult-bounds", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/352", + "commit": "04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2", + "scope": "Reference for the moment convention only. These files are not imported or run.", + "files": { + "research/w3-p10b-e8-complex/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "research/w3-p10b-e8-complex/code/complex/certify_complex.py": "7e480b7761fa700944a7dca41ccbefd530203b5e9168b6b37fe879b7e6da57fa" + } + }, + "files": { + "data/original.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa" + }, + "upstream_notice": { + "path": "NOTICE", + "sha256": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "retained_sections": [ + "copyright header", + "4. How the new files were made.", + "8. The certificate of the fourth result and the search programs." + ] + } +} diff --git a/research/e8-retimed-nine-composition/source365/verification.json b/research/e8-retimed-nine-composition/source365/verification.json new file mode 100644 index 0000000000..76e59bff23 --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/verification.json @@ -0,0 +1,67 @@ +{ + "status": "PASS", + "source_commit": "9c94857bbaee886f8649edee0bc2d3c738f9555e", + "uncompressed_sha256": [ + "3594f19c4d01cf11fb930c5c61baeed399620acbc5b94096b16bcacb23997dd3", + "3191011e0cb189665c8e0a9b97137dbed50241a0704c8be01c11b1b5a9518fc2" + ], + "histogram_delta": { + "1": 2, + "2": -6, + "3": 4, + "4": 1, + "5": -6, + "6": 4 + }, + "histogram": { + "1": 2093, + "2": 598, + "3": 522, + "4": 141, + "5": 209, + "6": 335, + "7": 43, + "8": 24, + "9": 8 + }, + "positive_second_difference_weights": [ + 1, + 4, + 1, + 2, + 4 + ], + "baseline": { + "saving": "876248285600677/1000000000000000000", + "strict_upper_below_one": true, + "next_grid_lower_above_one": true, + "upper_gap_decimal": 8.291462013379377e-19 + }, + "candidate": { + "saving": "876412559609473/1000000000000000000", + "strict_upper_below_one": true, + "next_grid_lower_above_one": true, + "upper_gap_decimal": 2.5095997917841125e-19 + }, + "m": 45, + "W": 1263, + "helpers": 783, + "copy_cost": 72, + "rank_mass": 56715, + "deficit": 120, + "scalar_map_rows_and_columns": 1023, + "checks": [ + "frame_paths", + "clean_source_identity", + "complete_scalar_map", + "exact_moments", + "strict_concavity_identity" + ], + "rejected_controls": [ + "scatter sign", + "same-rank wrong subspace", + "copy undercharge", + "forbidden phase-A cancellation" + ], + "scope": "Finite E8 circuit and exact recursive moment. No new Lean build or full multiplication theorem is claimed." +} diff --git a/research/e8-retimed-nine-composition/source365/verify.py b/research/e8-retimed-nine-composition/source365/verify.py new file mode 100644 index 0000000000..10c56a738a --- /dev/null +++ b/research/e8-retimed-nine-composition/source365/verify.py @@ -0,0 +1,110 @@ +"""Check the pinned E8 frame changes and their exact recursive cost.""" + +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q +import gzip +import hashlib +import json +from pathlib import Path +import sys + +sys.dont_write_bytecode = True +from reconstruct import moment, reconstruct +from retime import build +from scalar_map_comparison import compare + + +ROOT = Path(__file__).resolve().parent +OLD = Q(876248285600677, 10**18) +NEW = Q(876412559609473, 10**18) +GRID = Q(1, 10**18) + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def check_bound(result, saving): + args = result["histogram"], result["m"], result["W"] + low, high = moment(*args, saving) + next_low, _ = moment(*args, saving + GRID) + assert high < 1 < next_low + return {"saving": str(saving), "strict_upper_below_one": True, + "next_grid_lower_above_one": True, "upper_gap_decimal": float(1 - high)} + + +def main(): + if sys.flags.optimize: + raise SystemExit("Assertions must remain enabled for verification") + pins = json.loads((ROOT / "sources.json").read_text()) + for path, expected in pins["files"].items(): + assert digest((ROOT / path).read_bytes()) == expected, path + raw = [gzip.decompress((ROOT / "data" / name).read_bytes()) + for name in ("original.json.gz", "retimed.json.gz")] + original, candidate = map(json.loads, raw) + assert digest(raw[0]) == "3594f19c4d01cf11fb930c5c61baeed399620acbc5b94096b16bcacb23997dd3" + assert digest(raw[1]) == "3191011e0cb189665c8e0a9b97137dbed50241a0704c8be01c11b1b5a9518fc2" + rebuilt = json.dumps(build(original), separators=(",", ":")).encode() + assert rebuilt == raw[1] + old, new = map(reconstruct, (original, candidate)) + delta = {r: new["invocation_histogram"].get(r, 0) - old["invocation_histogram"].get(r, 0) + for r in range(1, 10)} + delta = {r: count for r, count in delta.items() if count} + assert delta == {1: 2, 2: -6, 3: 4, 4: 1, 5: -6, 6: 4} + # These positive weights prove the cost sign for every exponent in (0, 1). + weights = [1, 4, 1, 2, 4] + coefficients = Counter() + for rank, weight in enumerate(weights, 1): + assert weight > 0 + coefficients[rank - 1] += weight + coefficients[rank] -= 2 * weight + coefficients[rank + 1] += weight + assert coefficients.pop(0) == 1 + assert dict(coefficients) == delta + assert sum(delta.values()) == -1 + for key in ("helpers", "copy_cost", "invocation_mass", "rank_mass", "deficit", "m", "W"): + assert old[key] == new[key], key + + # These damaged inputs test separate proof obligations. + controls = [] + bad = deepcopy(candidate) + bad["scat"]["table"][0][0][1] *= -1 + controls.append(("scatter sign", bad, "Clean-source scalar identity")) + bad = deepcopy(candidate) + bad["A"][0][1] = candidate["start"][1] + controls.append(("same-rank wrong subspace", bad, "A frame path is not nested")) + bad = deepcopy(candidate) + bad["cst"] -= 1 + controls.append(("copy undercharge", bad, "Copy cost")) + bad = deepcopy(candidate) + bad["A"] += [["out", 1, 0, [[1, 1, 1]], []], ["out", 1, 0, [[1, -1, 1]], []]] + controls.append(("forbidden phase-A cancellation", bad, "Unsupported phase-A scalar direction")) + rejected = [] + for name, broken, expected in controls: + try: + reconstruct(broken) + except ValueError as error: + assert str(error) == expected, (name, str(error)) + rejected.append(name) + else: + raise AssertionError("Damaged input accepted: " + name) + + scalar = compare((original, candidate)) + assert scalar["complete_scalar_maps_equal"] and scalar["rows"] == 1023 + result = {"status": "PASS", "source_commit": pins["commit"], + "uncompressed_sha256": list(map(digest, raw)), + "histogram_delta": delta, "histogram": new["invocation_histogram"], + "positive_second_difference_weights": weights, + "baseline": check_bound(old, OLD), "candidate": check_bound(new, NEW), + "m": new["m"], "W": new["W"], "helpers": new["helpers"], + "copy_cost": new["copy_cost"], "rank_mass": new["rank_mass"], "deficit": new["deficit"], + "scalar_map_rows_and_columns": scalar["rows"], + "checks": ["frame_paths", "clean_source_identity", "complete_scalar_map", "exact_moments", "strict_concavity_identity"], + "rejected_controls": rejected, + "scope": "Finite E8 circuit and exact recursive moment. No new Lean build or full multiplication theorem is claimed."} + print(json.dumps(result, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/e8-retimed-nine-composition/source377/LICENSE b/research/e8-retimed-nine-composition/source377/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/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-retimed-nine-composition/source377/MANIFEST.json b/research/e8-retimed-nine-composition/source377/MANIFEST.json new file mode 100644 index 0000000000..2a709aaa9e --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/MANIFEST.json @@ -0,0 +1,166 @@ +{ + "schema": "independent-nine-stage-source-manifest/1", + "files": { + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "README.md": "a62afee2856e1eb096250efd3202a429cd4118e7d9a114e7b9c67e3c168df3ab", + "README.txt": "ffe26cdb8a7e083f2f745b6cf18916a6af4f1635bc5b1577f30fb1ca4e575e07", + "verify.py": "f99a2601b4864bb596955933b41f45a04e9c9b300b23e4aae2cb2934ec5d8c74", + "work/complex-nine-native/PROOF.txt": "ea0edb8cfb6b2f2c1adb2de12cc0aa5fb7c57e649033528565af3e52087beda7", + "work/native358/vendor/complex-reserve/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "work/native358/vendor/complex-reserve/MANIFEST.json": "3d0d867b84b86dd9f0850cedce9a6de83f2313a604bdef58f7235af30f94bcbd", + "work/native358/vendor/complex-reserve/NOTICE.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "work/native358/vendor/complex-reserve/SOURCE.json": "e69f2a72785302f892263cf765c84d07e083d9ad05730748f9c3374aade11e53", + "work/native358/vendor/complex-reserve/admit.py": "1b9b069fbdef37b7e3fbc586aad9578ba85948e9f80877733af387573f3fa723", + "work/native358/vendor/complex-reserve/finite_guard.py": "bef59dddd391bcb49ed16ec6384517b8b7a2e21415cc810f9c2f59f440370983", + "work/native358/vendor/complex-reserve/price.py": "90cfb8d102adf0b5f93b71b05af5c078076f56873a868a66865575a5ea85d573", + "work/native358/vendor/complex-reserve/upstream/pr352/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "work/native358/vendor/complex-reserve/upstream/pr352/MANIFEST.sha256": "4b76fb09595321986da04017db16cf6aa36bcd6a048cdee2ec8b656de811e488", + "work/native358/vendor/complex-reserve/upstream/pr352/NOTICE.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "work/native358/vendor/complex-reserve/upstream/pr352/README.md": "c5349ae6637e846fefe132756968376d52c5e3f76241e96214f59e65cdb7ad16", + "work/native358/vendor/complex-reserve/upstream/pr352/SOURCE-pr346.json": "2ad0b2138d2aa8cd5c6ab6995fa8c6c167a822b668ef56a9cc39c5765d1134b3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/addcomp.py": "82e5ef0c7b6cf84c53bf6039330930242c9a5c8e8ea13183b2805cf9577f7129", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/build_v5.py": "c0867d68b863ca7d8cdd7002ffed263cbd5525fea4522267b5f640e4eff5597b", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/decomp.py": "699c424170b41d3711da6a283f58cac824402ca373764365fd05c8e645ed07f5", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/gather.py": "8c7d2a34fdcbe75d8ed8299e399d578b32adf44402c773fd905aa7c88e2b460d", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/interface.py": "3b3e2fb894f871a9b6145844faaff34a05add59ae0eb8882c8feb2b914265b8a", + "work/native358/vendor/complex-reserve/upstream/pr352/code/builders/twin.py": "cfd261d82a31dd9024f1fa191eac2f5d893a7b51833b912459de46a1e9aac003", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/columns_h.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/legality_h.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/sub.hpp": "59c1a64f9df61fc50f47d5a78c8f9351875bf6b352db1c9d109c7c90542a4f19", + "work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/verifyT.cpp": "1a5aea81aab652622e6547d901ead6aaf54fdca231da897dd99474c9f64a33bf", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/certify_complex.py": "7e480b7761fa700944a7dca41ccbefd530203b5e9168b6b37fe879b7e6da57fa", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/NOTICE": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/FINITE_BRIDGE.txt": "66d8f4ea8752abd89952d6674a636575a0db16e18b1c16e293f48f64242f0c46", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/compact-control-layout.tex": "2bc28e50f3eb092195294cafa81213e520f6d42e7935e9905ad8a6199e2a7c87", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/compact-control-movement.tex": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/copied-centers-assembly.tex": "00117892971ae766188ace0af03030c44164fda105e42b70d84f52c3339a7dcb", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/copied-centers-lemma.tex": "d0ce6d3d504996aadb098227885224e48df46101daec8893523a0a8b7364d8fe", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/endpoint-gauge-complex.tex": "dfee33b0281e5551bb6927f757ff0240abade60ae1800f715afd88853ae0191e", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/general-clifford-frames.tex": "c9bb9655b594583c6b4bab8cb485233f1d1e588f83858cf1e4c3530cee8fed54", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/retained/stopped-product-complex.tex": "4738089103a4b263b3b0ef458f5ef35519c696f1ea871ae79e508d3720f5870a", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/source-pins.json": "0d76527bf9c259b9532466a7b056ad6ff118867a96e044ff8e1a24aca12e1dbb", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Cert.lean": "5c24746a6330907b9b37d6064095035a58575d64ce793d6d7c9881121fdc3980", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Net.lean": "cf7d7d330b1bffe2e66712c873e647b13dc32db1ccfc0e0f4cd62ee6caf584f0", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Live.lean": "6d0649eb62589e66057f044e1e2103fc42f3f57a1498f82a26565bd8eb4026d0", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Phases.lean": "71dc3dda23dfe510d5d53cbada3a6c540cd1dc2825503fda618a5bd6cfc3e812", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__Fourier__Main.lean": "2e8e88efd4dcbdf0b1a6e39ce7eea8c5fd5ffee2faf360a8c0c9cba84c0e4ef3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Geom.lean": "c302f5834287421f11f3b0da7112fcde876cbc702896f2af4145b2d72ee393a2", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__InvThm.lean": "ade7e7873da75ca63a4b5ce2f562dde9c12bfbb69d87d7ae831039ff790e5adb", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetCert.lean": "22ae34809466b4ac2a2c5cdde526f51ff246f5189f7c142b38aa4c0dcffb04a4", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetDef.lean": "6e17a68b1e988969f6eb77000028f7ed877e687b8ad3976ec1707fcfe1d2f520", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetStage.lean": "c122bc01392a6fdcc0bee918fed81804d3c9b1d3e071016dab65a4ed804ef0b6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Phased.lean": "0de429c80231334f1ce92575c1e8ac382ca2d5e7d956767b547639a8941d9a8c", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__WinB.lean": "c33ec3fce09c0971c32ddcbb86d9383ffbe4c6d05cf36f20460005e6547bb845", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__B2Gp193Main.lean": "cb61f304da51f1dd0a2ec25bca4b63eb095eeb2863289e1e2bdee7c82beff48b", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Glue.lean": "d5314f2b93a7f0e1c949fb502331825bfc6d9d8762d35f865443e7c95b6c7ef7", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__InstB2Gp193.lean": "9587ddb9961f44938032b609307ab91c0b0e757e3991f1ad95480dd50fd4f72b", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Cert.lean": "d92ee6889be4753fc99f467bd84039743325123a1165128378b9c906a04f2703", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Price.lean": "0299bcd0fe255960eec682eef0f045f7e5cb1e4711af2aab4393526eae2caea3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193ScalOK.lean": "479434815822e98f015e335361089c3788d00dc3dd39c2944f75410aa0c158fe", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__RateB2Gp193x.lean": "6b40cac1481c931d47b1a092e382d04716ede0e785c492a2f2983e886a257c3f", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Raw.lean": "aba94a004c94dcae7cf3047c88a6da9561555f4ebe8ab92e299e6ce09ee7aa66", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__SolutionB2Gp193x.lean": "45c768c9d71a7cc18bd6db74cb036db880d89580ca60557bb4a492280296b169", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Adapt.lean": "feec0a3828867968a5c7c2c30b86ed70449abc3c660a60ada67203a75bae2ef7", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Letters.lean": "34906dbf5ae16b5174db00b4881a5cc1d2e583b8c8806db6523a5e2f86565f09", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Level.lean": "80fb3daa9a45de0ed6da570eb4476b9104734be65d0116f58bcfcbcd67f771d0", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__ORIGIN.md": "6ba897a9495ddadcf8558b93133fdfaf66fc35ce7fa2c53e2d5667335c315e0b", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gx.py": "6f3dc8bb639933227a8dae181ec4a542e85c7276be9c9e330f49518e7b630b95", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxconv.py": "dab7fec9f44c2d368ed334055d7126e202017feb46e41a8d86e2d998720f67c2", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/NOTICE": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8.lean": "842b217147cf84e8042d6ef1c33104d5444b6587b594664bc9eb89b237ab4ad0", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8Main.lean": "987103107d5586c096016f0a702d0de35b74398dbb50ac66f5886a43a5ca0d05", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/ChallengeB2Ge8x.lean": "a59db9d54b83adc73391916f7c1ef5e381ff073027781c26cb350f43b79839e3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Cert.lean": "13a243c7d7be31ae429d19b5ecd5d428d60c41b7cca8a330f0c4179b110ba7ea", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Price.lean": "cd250dd72406dde37765c501f666ceeedcc18f831070b26369bcb154c1f99a8e", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8ScalOK.lean": "6bd5e68effe8913a3f73e25ea59142cd9928ddf81e94250a6ea28aa7317388b3", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8/S0.lean": "36de82f6969c23082876a4d6848428623d1c65d2df3fc917f23ecba003189dd2", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8.lean": "5c7fb23df2c10b690f638a19bf066905b5b620b8a2ad0ffde76cc9348d8aa2b4", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8End.lean": "6ea83365afe01664b2132a630511b4de65f938dc328744ce7f77a01fad97f32d", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Hist.lean": "cce81699abe1f85a870dcf64edd395d2cf5a586da7700af565b557093095ab51", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Par.lean": "a343219b419f30f8ac4dd3a0a98bf53550c5fec6b2cbd245320a95977c319016", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Scal0.lean": "78036e5443775ade5bde46a77ba3e0433fe22160da11b5b6c96c7f1075ecfbbd", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg0.lean": "f6b248dc4c3b2c94db95989b6bd5ad3c3f0d7ece3a511e5b69069550b821b138", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg1.lean": "79d16ccceb61391446ea97f77fddadafa9150e9dea97919e775f6c78daa71839", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8SegF.lean": "924340aebc6f68b5a6526311ce33341af0a0a5a8375416762f08c1914ec08abe", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab0.lean": "650600b631a21221956f9abbab9abebcc9cca628512d3e9a017e2373e2649b17", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab1.lean": "60036fa4deeb19d39fc0dddf31359d2b6d2407ff66070f145b111bff16190eb0", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab2.lean": "c8a248da3eb770ba55ef267d118b29d49983311087ef789398d555e2c44b3a41", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab3.lean": "41975d430ec0095ad465a36d4903e90c01bc891d3abe5e2c372ef786c029a7ed", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8YChk.lean": "a290360c175544cb85edffe1b92fcf7d447cba09128e19de8dc87e0a1ff0c524", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/InstB2Ge8.lean": "c1fee298187ea19b5d70fcfccef7d4fd4161be70c0adda19a89ca9933a759954", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8.lean": "7b6e59724c0f140e714afba237d5a1a91b22da70abc096ce274690140b39a3a6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8x.lean": "7c56d865ed6bfcb6919dabc1a6e53f8744ff4824a2f78335787485f3090970d1", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/SolutionB2Ge8x.lean": "dd52f1fe0a372480edaf5e6c64903d6257c410e43d406f8acb6bf8f60a1ee28f", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/comparator/B2Ge8x.json": "ddad06c37f9268986f3ec8ce43da5230ee2bd887da2480328413a0dc58f2a926", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/certificate/gcert1-e8-r783.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/e8/replay.py": "be41ee310f28121c3e424cc8637d8fa02ef7c47fc8945e9bbd3856138fd800d6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/foldgen.py": "a0f16e2c9e078ffbfb2174281ee93a48c18593aefb880318fc105ec85a205932", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/foldlib.py": "7a3c38a698c129e13a767da75926a1305eb0c031b908450afc6feb185505c59a", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/gen_rates.py": "ef8c869e4cf8da33a4c10b96f7f6faafd46e15d66766238070a60315aa169994", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/gen_sharp.py": "1b5eb3730cb16cf516e760879951fdfb9b065efc55f78c29a5c6404fcca57a78", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/templates/ChallengeB2L16x.lean.txt": "0488b7a2442c795414f103df912d1e6cc66d37b5be270940ea9564b7f2b666be", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gen/templates/SolutionB2L16x.lean.txt": "d414a890dfe126916374c1afc804b90e5081b7760f894b9ccdcf23d83a12f9ee", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gsmirror.py": "0e22bbe5924284e2fb916337ccefc8e41f6e54469749986ad15b3b81cfaec534", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxgen.py": "ce9151054370c2210ed08f54c249a19dcb6946d182cdf934dee1a3781b53040f", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxpaths.py": "f00802d48ef3fedb00278f0b1c7bde074cc49dd30f202d7f32a9d2aebb3be443", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxrate.py": "514a5719f970fe36b1273cf59df0396db0e042dd7864c2eea53ab2a2fd1e2ad6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/gxunit.py": "3cc09a9c1a2db681c0f2016bc821af5b674d34834dbd6f195b9d482ce7c0ff58", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check.py": "b6172d58749c0b3b9138570c74827bcb23bf5db4ff9643740768cd7782ac4ca6", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check_e8.py": "ad8fe9811c6ea0d89c795caef48686cfca600f5d540ebfd5d1251d6777cec7cf", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/pins-e8.json": "bf66f785878f636616ceab193e5a222143945ea06fc2f13dfb99b204ebba82ff", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/portable_complex.py": "44e8ae8a5b915358a97dbed5fe4e70195ed3581fd45a216df48fc82a029db87d", + "work/native358/vendor/complex-reserve/upstream/pr352/code/complex/regress_pr346.py": "29479da1547cd39cf20fe387cde4cad847a2880266db9d0ef3fb474f68591feb", + "work/native358/vendor/complex-reserve/upstream/pr352/code/export_p10.py": "1161d23b459f7d981d6716073745909126d5465018cbbea7e6e6a9e4e5d68add", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "work/native358/vendor/complex-reserve/upstream/pr352/code/pricing/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "work/native358/vendor/complex-reserve/upstream/pr352/code/provenance.py": "9f5c05aa4d172478f2ab67e7bb83cacebfccc10ecba650c23539cdcee18f2139", + "work/native358/vendor/complex-reserve/upstream/pr352/code/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-RECORDS.bin.gz": "caabc13126e8f87d08f7697f51512cb3431ff52861f4190149251d8e19224430", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-frames.json.gz": "35070b83d12ebc60003ed344315328713134a43bdb04217c2c5cbc39e101391f", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/BASE-states.json.gz": "1e37ae5001447dd78a8287d8aa23d73a1d5862c4017f44db49af327f58d7cf22", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/FINAL-NEW-FRAMES.json": "e7fe9d0686829ad5acf7930698b3c81a866ae834422aa3c9a12057dfae627175", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/FINAL-RECORDS.bin.gz": "fc4f1986da4585dc1721bcd954a95b3ffb2b562cc7031f40242de81664e3acb6", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/RECORD-SHA256SUMS": "21f732671eb34468be2252d4dfb81bdec4e7d7cd6564b93a482c2dd925e9c3b2", + "work/native358/vendor/complex-reserve/upstream/pr352/data/bit/labels.json": "e037cd3d19d68e08523d09fce1c5f92206567784eb59f1924d93a837e4302fce", + "work/native358/vendor/complex-reserve/upstream/pr352/receipts/complex-guard-e8.json": "f94a5dca42cbb88e9650f8f8a3ffbd1153636dfc0a48da5f7a7fca908c0650ad", + "work/native358/vendor/complex-reserve/upstream/pr352/receipts/kappa.json": "36316b6cfe423b56cda1fd52843e56c997d060e33d26b732b3ecf4de3ae83aaa", + "work/native358/vendor/complex-reserve/upstream/pr352/receipts/official-five-stage-columns.json": "32e291f249b4eab8d65664d10c94208fe2154bdb4a45aaff84e9e8da5295a29f", + "work/native358/vendor/complex-reserve/upstream/pr352/receipts/official-legality.json": "7e675b7720f056548c1ee9f9de523eea10e6b014ddf90b7a630fd96163acbce6", + "work/native358/vendor/complex-reserve/upstream/pr352/requirements.txt": "ca0825e0ae3db2855af7535ebdc4775beadbb6f07f8d3a84f0f4fd5b95ba5eae", + "work/native358/vendor/complex-reserve/upstream/pr352/verify.sh": "1a05c0b31ea37b2b5a4b84f6f9f504af8dd4220e13a6d9d86f64b2a731a903c7", + "work/native358/vendor/complex-reserve/verify.py": "aa6f05c39404b4038c31c72f9fe7a8e137df911f6cb6fc668e316be37c40b126", + "work/odd-stages/RECIPE-9.json": "abda2e4c73ecb48d29c30c12bc9a5c2db71d11a35667b4298788ec9154eeec7b", + "work/odd-stages/audit_nine_template.py": "30c33508d02aeb8823dc477e8027bf6d44740aea0d3a3970fd2490aaf3b072d0", + "work/odd-stages/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "work/odd-stages/complex_candidate.py": "e4faf656403720f78223934bec90c667086453d449323c85fa839d19829b4517", + "work/odd-stages/data_phases.py": "671d6f8144c6d31e1766c6a0e144172da661a63f86b3d4d17fe2710f3ef752c4", + "work/odd-stages/global_nine.py": "7e33e6ca88b11e28544bf7d43b02252208d4355369a14adb2aa8baa15773e42a", + "work/odd-stages/outer_fixed.py": "0dc5b5a23bba5b4532cd11a290019d66d56ead611dddd3c40e2c9d0df64da198", + "work/odd-stages/verify_clifford_frames.py": "5d8cf110150c66f2e2df58ea4e24096f335740e2ae726a4778347d98053cfa76", + "work/pr361/code/engines/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "work/pr361/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "work/pr361/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "work/pr361/complex/gcert1-e8-r783.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa" + } +} diff --git a/research/e8-retimed-nine-composition/source377/README.md b/research/e8-retimed-nine-composition/source377/README.md new file mode 100644 index 0000000000..27f614ff95 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/README.md @@ -0,0 +1,111 @@ +# Compressed nine-stage complex component + +This research package raises the **conditional complex coarse saving** from +`876248285600677/10^18` to **`999240641319551/10^18`** (about 14.04%) +using the same pinned E8 local word. It supplies a compressed nine-stage +construction, exact phase corrections, whole-block banks with paid padding, +a finite execution template and two independent rational pricing checks. + +**This is a complex-side component result.** The frozen #361 bit supplier still +gives final `kappa = 804849251275843/10^18`. The component value exceeds +`2^-10`, but the combined integer-multiplication exponent does not. + +## Reproduce offline + +Python 3.11 or later, standard library only, with assertions enabled: + +```sh +python3 -B research/nine-stage-complex-e8/verify.py --work /tmp/nine-stage-e8-check +``` + +Choose a work path that does **not** already exist and is outside this package. +The verifier checks all input hashes, copies inputs to that directory and +rebuilds its evidence without network access or pre-existing PASS receipts. +Typical runtime is about three minutes. Its final receipt is `VERIFICATION.json`. + +The eight checks cover source integrity; fresh local scalar/frame admission; +data, banks and profile; exact Clifford adapters; data and cover phases; +the global template and finite invoice; independently decoded template pricing; +and the numerical outer assembly with the fixed bit value. + +## Construction and evidence + +The local E8 word has dimension 9, 120 ports, 783 helpers and copied-rank loss +72. Four data pairs and nine local stages are routed through dimension 73. +Each bank contains eight entire rank-9 residuals and one paid rank-1 padding +factor. Eight replicas give 7,680 data families and 7,047 bank families, for +14,727 live recursive families. Including reused private work gives 15,520 +physical streams per cover. + +The implementation includes the exact Clifford phases omitted by a +rank-only calculation: endpoint translations, the final `X_q` correction, +and the all-live-family cover correction `X_delta(g)`. It checks 946 local +frames, 3,120 directed transitions and 240 endpoint adapters, with exact +Gaussian arithmetic fixing global scalar phase. The fresh local invocation +replays all 1,023 dirty live input columns. The global finite template has +72 local invocations and 1,242,936 local events. + +The paid profile is: + +| Child rank | Calls | +| ---: | ---: | +| 1 | 157599 | +| 2 | 43488 | +| 3 | 37296 | +| 4 | 10080 | +| 5 | 15480 | +| 6 | 23832 | +| 7 | 3096 | +| 8 | 7488 | +| 9 | 576 | +| 16 | 3840 | +| 32 | 3840 | +| 48 | 3840 | + +Thus `rank_mass = 1072575` and `73 * 14727 - rank_mass = 2496`. +Both rational moment engines admit the stated complex saving and reject the +next `10^-18` grid point. The largest child has rank 48, so the argument uses +**two-level halving**, `73^2 > 2 * 48^2`, with its depth and finite-work +overcharges explicitly included. It does not assert the false one-level +half-shrink inequality. + +Relevant files: + +- [Construction argument and assumptions](work/complex-nine-native/PROOF.txt). +- [Exact local Clifford arithmetic](work/odd-stages/clifford_exact.py) and + [adapter verification](work/odd-stages/verify_clifford_frames.py). +- [Data and cover phases](work/odd-stages/data_phases.py). +- [Global template and invoice](work/odd-stages/global_nine.py). +- [Independent template decoder and pricing](work/odd-stages/audit_nine_template.py). +- [Fixed-bit outer check](work/odd-stages/outer_fixed.py). + +Phase, padding, bridge and terminal-exchange omission controls are included. +The unchanged-bit outer check has 47 strict numerical constraints and rejects +the next final-kappa grid point. That check is a consistency check, not a new +bit-side construction certificate. + +## Scope and provenance + +The construction retains the pinned local E8 invocation theorem, general +Clifford/compiler interfaces, complete-stream tape primitives, common fine-grid +precision, row allowance and analytic recurrence interfaces. This package does +not build a new Lean kernel proof, enumerate the astronomical cover, regenerate +the E8 certificate producer, or establish an unconditional multiplication +theorem. The finite template and the written argument have the scope stated in +their receipts and proof. + +The unchanged E8 certificate is pinned at SHA256 +`4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa`, +from Jacob Sussman's E8 source at +`9c94857bbaee886f8649edee0bc2d3c738f9555e`, preserved through the fixed +[#352](https://github.com/CrocSwap/integer-mult-bounds/pull/352) source and +local finite-invoice audit. The unchanged bit comparison is frozen at +[#361](https://github.com/CrocSwap/integer-mult-bounds/pull/361), head +`2eef66d847be4441e4f3af681ee7e94dd9b19316`. + +Dependency licenses, notices, assistance disclosures and source manifests are +preserved in `work/native358/vendor/complex-reserve/`. They retain the local +E8, five-stage, completed-bank, compiler and analytic-framework credits. +The new nine-stage construction, verification code and argument were prepared +by Zhihao Chen with OpenAI Codex assistance. Apache-2.0; inherited notices and +licenses continue to apply. diff --git a/research/e8-retimed-nine-composition/source377/README.txt b/research/e8-retimed-nine-composition/source377/README.txt new file mode 100644 index 0000000000..24c828ce46 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/README.txt @@ -0,0 +1,10 @@ +Independent compressed nine-stage complex research component + +Run: python3 -B verify.py --work /new/empty/path +Python 3.11+ standard library only. Typical runtime about three minutes. + +The driver copies pinned inputs into the new work directory, verifies the frozen source package, and regenerates local admission, exact Clifford recipes, global phase corrections, global IR, finite invoice, independent IR pricing and numerical outer checks. No network, repository state or saved PASS receipt is required. + +The conditional complex coarse value is 0.000999240641319551. The unchanged bit side still binds final kappa at 0.000804849251275843. This is not a new integer-multiplication record or a 1% final-kappa improvement. Retained analytic interfaces, lack of a new Lean kernel proof, and the precise theorem scope are explicit in work/complex-nine-native/PROOF.txt and verification receipts. + +Fixed-source credits and licenses are preserved verbatim in work/native358/vendor/complex-reserve. Independent added code and proof: OpenAI Codex assistance, 2026-10-11. diff --git a/research/e8-retimed-nine-composition/source377/verify.py b/research/e8-retimed-nine-composition/source377/verify.py new file mode 100644 index 0000000000..7889e68d55 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/verify.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +"""Replay the independent nine-stage component from pinned sources only.""" +import argparse,hashlib,json,shutil,subprocess,sys,time +from pathlib import Path +assert __debug__, 'Run without -O' +assert sys.version_info>=(3,11) +ROOT=Path(__file__).resolve().parent +sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest() +read=lambda p:json.loads(Path(p).read_text()) +ap=argparse.ArgumentParser();ap.add_argument('--work',type=Path,required=True);a=ap.parse_args();wd=a.work.resolve();assert not wd.exists() and not wd.is_relative_to(ROOT) +expected=read(ROOT/'MANIFEST.json');actual={p.relative_to(ROOT).as_posix():sha(p) for p in ROOT.rglob('*') if p.is_file() and p.name!='MANIFEST.json'} +# Nested vendor MANIFEST.json files are themselves pinned, too. +actual={p.relative_to(ROOT).as_posix():sha(p) for p in ROOT.rglob('*') if p.is_file() and p!=ROOT/'MANIFEST.json'} +assert actual==expected['files'] and not any(p.is_symlink() for p in ROOT.rglob('*')) +wd.mkdir();shutil.copytree(ROOT/'work',wd/'work');logs=wd/'logs';logs.mkdir();done=[];started=time.monotonic() +def run(name,argv): + t=time.monotonic();log=logs/(name+'.log');print(name,flush=True) + with log.open('w') as f:r=subprocess.run([sys.executable,'-B']+argv,cwd=wd,stdout=f,stderr=subprocess.STDOUT) + assert r.returncode==0,(name,r.returncode,str(log)) + done.append(dict(stage=name,returncode=0,seconds=time.monotonic()-t,log_sha256=sha(log))) +try: + run('frozen-source-integrity',['-c',"import runpy; x=runpy.run_path('work/native358/vendor/complex-reserve/verify.py'); print(x['integrity']())"]) + run('fresh-local-admission',['work/native358/vendor/complex-reserve/admit.py','--source','work/native358/vendor/complex-reserve/upstream/pr352','--output','work/complex-nine-native/local-admission']) + for name,script in [('finite-data-banks-profile','complex_candidate.py'),('exact-clifford-recipes','verify_clifford_frames.py'),('exact-data-and-cover-phases','data_phases.py'),('global-template-and-invoice','global_nine.py'),('independent-template-two-moments','audit_nine_template.py'),('fixed-bit-outer-check','outer_fixed.py')]:run(name,['work/odd-stages/'+script]) + out=wd/'work/complex-nine-native';price=read(out/'INDEPENDENT-TEMPLATE-AUDIT.json');outer=read(out/'OUTER-FIXED-BIT.json');invoice=read(out/'GLOBAL-REVIEW.json') + assert price['coarse_complex']=='999240641319551/1000000000000000000' and outer['kappa']=='804849251275843/1000000000000000000' + assert invoice['cover_correction_calls']==14727 and invoice['finite_invoice']['halving_degree']==2 + receipts={p.relative_to(out).as_posix():sha(p) for p in out.rglob('*') if p.is_file()} + result=dict(status='PASS_PORTABLE_NINE_STAGE_COMPLEX_FINITE_COMPONENT',source_manifest_sha256=sha(ROOT/'MANIFEST.json'),fresh_stages=done,complex_coarse=price['coarse_complex'],fixed_bit_kappa=outer['kappa'],new_final_kappa_claim=False,final_kappa_one_percent_milestone_reached=False,proof='work/complex-nine-native/PROOF.txt',receipt_sha256=receipts,seconds=time.monotonic()-started,scope='The explicit proof retains local E8, Clifford/compiler, common-grid and row/analytic interfaces. No Lean kernel build, astronomical cover enumeration, certificate-producer regeneration or improved bit-side theorem is claimed.') + (wd/'VERIFICATION.json').write_text(json.dumps(result,indent=2));print(result['status'],flush=True) +except BaseException as e: + (wd/'FAILURE.json').write_text(json.dumps(dict(error=str(e),completed=done),indent=2));raise diff --git a/research/e8-retimed-nine-composition/source377/work/complex-nine-native/PROOF.txt b/research/e8-retimed-nine-composition/source377/work/complex-nine-native/PROOF.txt new file mode 100644 index 0000000000..278c379c21 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/complex-nine-native/PROOF.txt @@ -0,0 +1,161 @@ +Independent compressed nine-stage complex component + +Claim and retained assumptions + +The fixed E8 local invocation has h=9, v=120, R=783 and copied rank loss +cst=72. The construction below has m=73, live stock 14727 per complete +orthogonal cover, and paid profile + 1:157599, 2:43488, 3:37296, 4:10080, 5:15480, 6:23832, + 7:3096, 8:7488, 9:576, 16:3840, 32:3840, 48:3840. +It is a conditional complex component, not an integer multiplication bound. +The local E8 invocation theorem, general Clifford rank-zero compiler, +complete-stream tape primitives, common fine-grid precision, and retained +analytic recurrence interfaces are assumptions retained from the fixed local +source package. The new finite construction and its charges are supplied +here. No new Lean kernel proof is asserted. Final bit-side admission and +outer assembly are separate obligations. + +Exact operator convention + +For q in F2^m, let X_q be translation by q and + C_q = ((1+i) I + (1-i) X_q)/2. +Then C_q^2=X_q and C_q fixes the uniform vector. Write C_all for the product +over the coordinate vectors. An invertible binary matrix G acts by the +literal address permutation P_G. All products of C_q are commuting exact +Gaussian-dyadic operators. Their multiplier on Fourier character y is +i^(sum epsilon_q * parity(q.y)). Modulo 4, parity expands as its linear sum +minus twice its pair sum, so this multiplier is an exact Z4 quadratic form. +Equality of these forms proves equality including the scalar phase. + +For arbitrary local subspaces U, including degenerate ones, use the +deterministic canonical representative from clifford_exact.py. A basis G +whose first columns span U gives K_G = D_Q P_G, with +Q=I+G^(-T)G^(-1), and T_U=K_G C_[dim U] K_G^(-1). +Its preimage Lagrangian is {(u,u+w): u in U, w in U^perp}. Thus a nested +transition has Fourier rank equal to the dimension difference. The supplied +compiler produces two explicit monomial operators around one rank-r C child. +Its equality is checked both as a signed Pauli tableau and on a nonzero +exact Gaussian state vector, which fixes the otherwise missing global phase. +All 946 local frames, all 3120 used directed transitions, and all 240 old/new +source/target adapters are checked. No rank-only replacement is made. + +Compressed window and data routes + +Use V=F2^9 direct_sum (F2^8)^8 with the ordinary dot product. Let E_s be the +first s exterior eight-dimensional blocks, for 0<=s<=8. The exact window +representative of local U is T_U tensor C_Es. A nested transition cancels +the common exterior tensor factor exactly and keeps its original rank. +Conjugating the whole window by any cover permutation preserves this fact. +The old/new endpoint adapters are the checked local adapters tensored with +identity, followed by the declared address conjugation. This proves the +window lift directly; a divisibility assumption m=multiple_of_h is not used. + +Every supplied port q has odd weight and a zero coordinate. The explicit +orthogonal matrix U_q in data_phases.py maps e0 to q: swap e0 with a zero +coordinate e_j when necessary, then use the even-vector transvection +x -> x + ((q+e_j).x)(q+e_j). Its remaining columns are an orthonormal basis +of q^perp. For s>0, rho_s,q exchanges that complement in the local block +with exterior block s and fixes q and all other exterior coordinates. +It is a symmetric orthogonal involution. The stage data owners are +g=d*rho_s,q, with rho_0,q=I, so the right factors are bijections of O(73,2). + +Use canonical data levels X_s=C_[0,9+8s), Y_s=X_s C_q^(-1), and initially +X_(-1)=C_q, Y_(-1)=I. The routed stage starts at level s-1 and ends at level s. +Their binary preimages agree with the window endpoints. Exact phase +polynomials determine the translation that reconciles each endpoint, and +the template applies that translation. There are 3840 nonzero such +translations across the 120 port types and nine stages, before replica +multiplicity. These operators are not silently identified from equal +binary matrices. + +Four-pair scalar chain and idle children + +Starting with F_0 (Y_0 += X_0), for j=0,1,2,3 apply B_j (X_j -= Y_j), +then for j<3 apply X_j += X_(j+1), Y_(j+1) -= Y_j, apply F_j, and undo +that bridge. The last pair has B_3,F_3 without a following bridge. +Afterwards apply, in descending j=2,1,0, X_(j+1)+=X_j and Y_j-=Y_(j+1). +Finally exchange each pair by newX=oldY, newY=-oldX. The complete signed +integer scalar matrix is the identity; omission of every bridge fails. + +Before a bridge, advance the idle pair to the active pair's level. The +two advances for the newly used pairs have ranks (16,8), (32,8), (48,8). +The final advances have ranks 48,32,16,0. Each rank occurs on both members +of the pair, each of 120 ports, and each of eight replicas. A nested idle +transition is factored in the explicit orthonormal basis U_q direct_sum I. +Its exact Z4 phase is reconciled by the stored translation after that child. + +The final Y endpoint is C_all C_q^(-1). A source began at C_q, so its +unadjusted exchange route would be C_all C_q^(-2)=C_all X_q. Applying the +literal X_q to each final Y before the signed exchange removes this factor. +The corresponding 120 omission controls fail. This correction is charged. + +Banks and arbitrary correlated dirt + +There are eight replicas of each of the four data pairs, hence 7680 data +families. Each stage has 783 independent bank families. Number a local +helper occurrence by z=783*replica+helper. It uses bank floor(z/8) and slot +z mod 8, with its nine-dimensional residual assigned to coordinates +[9*slot,9*slot+9). A paid coordinate C child at coordinate 72 completes +each bank. All eight whole residuals and this padding fill dimension 73. +Thus there are 9*783=7047 bank families and live stock 14727. + +Let Pi_slot swap the first nine coordinates with the assigned block. The +local invocation at class d uses the bank class g=d*Pi_slot^(-1). Its +residual at that owner is P_g C_block P_g^(-1). Right multiplication is a +bijection. Local helpers sharing one bank have distinct slots, hence +different right factors and different actual bank classes for every d. +All data and private families are disjoint from banks. The checker verifies +these injections for all 72 invocation/replica templates and 56376 residual +assignments. A complete cover sweep for one replica finishes before the +next begins. The local dirty invocation is block diagonal on helpers at +its endpoint and permits arbitrary correlated helper values. Therefore +overlap between different invocations does not impose a cleanliness or +independence assumption. At each bank class, the eight residuals and the +padding are coordinate factors in one common conjugated basis, and their +exact product is P_g C_all P_g^(-1). + +One more exact correction is essential. Orthogonality alone does not imply +that P_g commutes with C_all as an exact operator. In fact + P_g C_all P_g^(-1) = C_all X_delta(g), + delta(g)_i = (weight(row_i(g))-1)/2 mod 2. +The quadratic terms cancel by row orthogonality and the remaining even +linear terms give the displayed translation. Both sides fix the uniform +vector, fixing the global scalar. Apply X_delta(g) to EVERY final live +family in cover class g, after the bank padding and signed data exchange. +The template includes and charges all 14727 corrections per cover. This +identity is also checked on every orthogonal matrix in dimensions 1..5. + +Finite work and recurrence charges + +The source emitter is regenerated and revalidated in both orientations. +It accounts for 1242936 local events over 72 invocations, with all copied +center and dirty-tableau lifetimes intact. Forward and backward scalar +words freshly replay all 1023 independent dirty live columns. Only the +private work starts at zero. Work comprises 783 tableau streams, nine +reserved center streams (eight used), and one coefficient stream. Each +invocation completes and erases its private work before the next. Physical +stock is therefore 15520 per cover; scalar-only work is excluded from the +recursion-volume denominator. + +GLOBAL-REVIEW.json records the complete recomputed finite overcharge, with +64*(73+1)^3 compiler groups per rank-zero adapter, source-counted scalar +primitives, and overcharges for all data routes, bank selectors, phases, +padding, bridges, exchanges and cover corrections. The O(73,2) order is +2^(36^2)*product(2^(2i)-1,i=1..36); its bit length is 2628. The recomputed +router fits 2^30000, the literal charge fits 2^100000, and the precision +guard fits C0=2^210000. No even-dimensional orthogonal-order formula is used. + +Largest child 48 does not satisfy one-layer halving. Instead +73^2=5329>2*48^2=4608, so two nested children have width strictly below +half the parent, including floors. The general depth is bounded by +2*ceil(log2 e), with direct small leaves. For B=s+E the completed-child +semantic induction has 2B(73-48)-s-E=49B>0. The resulting conservative +complete-row coefficient is 2*2642+9909+252=15445<20161, retaining the +external bit/base-row allowance as an explicit interface assumption. +The inherited bad-branch envelope is priced conservatively as before. + +Two independent rational moment engines admit +b=999240641319551/10^18 and exclude b+10^-18 for the source-bound profile. +The rank mass is 1072575, and 73*14727-1072575=2496=8*(8*120-9*72). +This complex component exceeds 1/1024 but does not improve the current +bit bottleneck. No improved final kappa or 1% final-kappa milestone follows. diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/LICENSE b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/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-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/MANIFEST.json b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/MANIFEST.json new file mode 100644 index 0000000000..fb122f82af --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/MANIFEST.json @@ -0,0 +1,147 @@ +{ + "files": { + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "NOTICE.md": "380ce615ddb67da3680fa188a0ba0daf578b983d58c2496cd20dd06f32e4ef57", + "SOURCE.json": "e69f2a72785302f892263cf765c84d07e083d9ad05730748f9c3374aade11e53", + "admit.py": "1b9b069fbdef37b7e3fbc586aad9578ba85948e9f80877733af387573f3fa723", + "finite_guard.py": "bef59dddd391bcb49ed16ec6384517b8b7a2e21415cc810f9c2f59f440370983", + "price.py": "90cfb8d102adf0b5f93b71b05af5c078076f56873a868a66865575a5ea85d573", + "upstream/pr352/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "upstream/pr352/MANIFEST.sha256": "4b76fb09595321986da04017db16cf6aa36bcd6a048cdee2ec8b656de811e488", + "upstream/pr352/NOTICE.md": "967e6d7e76e216e4898cf543c75b527e8d397ec1ddba3800cb20701f24c89524", + "upstream/pr352/README.md": "c5349ae6637e846fefe132756968376d52c5e3f76241e96214f59e65cdb7ad16", + "upstream/pr352/SOURCE-pr346.json": "2ad0b2138d2aa8cd5c6ab6995fa8c6c167a822b668ef56a9cc39c5765d1134b3", + "upstream/pr352/code/builders/addcomp.py": "82e5ef0c7b6cf84c53bf6039330930242c9a5c8e8ea13183b2805cf9577f7129", + "upstream/pr352/code/builders/build_v5.py": "c0867d68b863ca7d8cdd7002ffed263cbd5525fea4522267b5f640e4eff5597b", + "upstream/pr352/code/builders/decomp.py": "699c424170b41d3711da6a283f58cac824402ca373764365fd05c8e645ed07f5", + "upstream/pr352/code/builders/gather.py": "8c7d2a34fdcbe75d8ed8299e399d578b32adf44402c773fd905aa7c88e2b460d", + "upstream/pr352/code/builders/interface.py": "3b3e2fb894f871a9b6145844faaff34a05add59ae0eb8882c8feb2b914265b8a", + "upstream/pr352/code/builders/twin.py": "cfd261d82a31dd9024f1fa191eac2f5d893a7b51833b912459de46a1e9aac003", + "upstream/pr352/code/checkers/columns_h.cpp": "26f5c9be3a7f545d50be458e3d17403921b5542a7dcd2986c848664a774977a8", + "upstream/pr352/code/checkers/exactnd_h.py": "28a0d8ee29ac75b8a789705454987f07d618f135ed1f1bd45b97f18bcc4163e3", + "upstream/pr352/code/checkers/json.hpp": "aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63", + "upstream/pr352/code/checkers/legality_h.cpp": "5661d0b91e07d95736bde4c1824f27bebaecce0a84e38403f5391ebc51a52056", + "upstream/pr352/code/checkers/sub.hpp": "59c1a64f9df61fc50f47d5a78c8f9351875bf6b352db1c9d109c7c90542a4f19", + "upstream/pr352/code/checkers/verifyT.cpp": "1a5aea81aab652622e6547d901ead6aaf54fdca231da897dd99474c9f64a33bf", + "upstream/pr352/code/complex/certify_complex.py": "7e480b7761fa700944a7dca41ccbefd530203b5e9168b6b37fe879b7e6da57fa", + "upstream/pr352/code/complex/code/complex_basis.py": "52d68781eaf6d9decf02446a532a7336fcf15924a9f6781ba0833d038decb9f8", + "upstream/pr352/code/complex/code/complex_gx.py": "ccc924537db0c0d55f0c1934e79b8cf4d85b4fb336473d7b42d69e12557aa9f2", + "upstream/pr352/code/complex/code/complex_labels.py": "e000ee131389fec427388b85f632879cbaaf10e5e5d979a47d6307d64ce58982", + "upstream/pr352/code/complex/code/complex_scalars.py": "38e985ebe8c8e7f8c83c03828abde0c80be418caf95e97afdf2d0c357c0ed919", + "upstream/pr352/code/complex/code/complex_splice.py": "aaf46c8e5c68875b8315892e924e082b2f219f8d042dd14937e7cd2f72456dce", + "upstream/pr352/code/complex/code/p10pins.py": "93b78a2e038b23264d04836928c78b6ebf33b87ff3dcc0e43ba0f1748fadd143", + "upstream/pr352/code/complex/code/scatter.py": "dfd1afbbb3ff86f54db6a0313916403ec8ee6f939caa62f3edcc9d7a151bff95", + "upstream/pr352/code/complex/inputs/complex/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "upstream/pr352/code/complex/inputs/complex/NOTICE": "9419dd03a2f52cf8bdfc4d18216ce29f263ab583b27f01ced8e420985bcb7c81", + "upstream/pr352/code/complex/inputs/complex/retained/FINITE_BRIDGE.txt": "66d8f4ea8752abd89952d6674a636575a0db16e18b1c16e293f48f64242f0c46", + "upstream/pr352/code/complex/inputs/complex/retained/compact-control-layout.tex": "2bc28e50f3eb092195294cafa81213e520f6d42e7935e9905ad8a6199e2a7c87", + "upstream/pr352/code/complex/inputs/complex/retained/compact-control-movement.tex": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "upstream/pr352/code/complex/inputs/complex/retained/copied-centers-assembly.tex": "00117892971ae766188ace0af03030c44164fda105e42b70d84f52c3339a7dcb", + "upstream/pr352/code/complex/inputs/complex/retained/copied-centers-lemma.tex": "d0ce6d3d504996aadb098227885224e48df46101daec8893523a0a8b7364d8fe", + "upstream/pr352/code/complex/inputs/complex/retained/endpoint-gauge-complex.tex": "dfee33b0281e5551bb6927f757ff0240abade60ae1800f715afd88853ae0191e", + "upstream/pr352/code/complex/inputs/complex/retained/general-clifford-frames.tex": "c9bb9655b594583c6b4bab8cb485233f1d1e588f83858cf1e4c3530cee8fed54", + "upstream/pr352/code/complex/inputs/complex/retained/stopped-product-complex.tex": "4738089103a4b263b3b0ef458f5ef35519c696f1ea871ae79e508d3720f5870a", + "upstream/pr352/code/complex/inputs/complex/source-pins.json": "0d76527bf9c259b9532466a7b056ad6ff118867a96e044ff8e1a24aca12e1dbb", + "upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Cert.lean": "5c24746a6330907b9b37d6064095035a58575d64ce793d6d7c9881121fdc3980", + "upstream/pr352/code/complex/inputs/complex/sources/Work__Bridge__Net.lean": "cf7d7d330b1bffe2e66712c873e647b13dc32db1ccfc0e0f4cd62ee6caf584f0", + "upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Live.lean": "6d0649eb62589e66057f044e1e2103fc42f3f57a1498f82a26565bd8eb4026d0", + "upstream/pr352/code/complex/inputs/complex/sources/Work__Carrier__Phases.lean": "71dc3dda23dfe510d5d53cbada3a6c540cd1dc2825503fda618a5bd6cfc3e812", + "upstream/pr352/code/complex/inputs/complex/sources/Work__Fourier__Main.lean": "2e8e88efd4dcbdf0b1a6e39ce7eea8c5fd5ffee2faf360a8c0c9cba84c0e4ef3", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Geom.lean": "c302f5834287421f11f3b0da7112fcde876cbc702896f2af4145b2d72ee393a2", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__InvThm.lean": "ade7e7873da75ca63a4b5ce2f562dde9c12bfbb69d87d7ae831039ff790e5adb", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetCert.lean": "22ae34809466b4ac2a2c5cdde526f51ff246f5189f7c142b38aa4c0dcffb04a4", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetDef.lean": "6e17a68b1e988969f6eb77000028f7ed877e687b8ad3976ec1707fcfe1d2f520", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__NetStage.lean": "c122bc01392a6fdcc0bee918fed81804d3c9b1d3e071016dab65a4ed804ef0b6", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__Phased.lean": "0de429c80231334f1ce92575c1e8ac382ca2d5e7d956767b547639a8941d9a8c", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Chain__WinB.lean": "c33ec3fce09c0971c32ddcbb86d9383ffbe4c6d05cf36f20460005e6547bb845", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__B2Gp193Main.lean": "cb61f304da51f1dd0a2ec25bca4b63eb095eeb2863289e1e2bdee7c82beff48b", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Glue.lean": "d5314f2b93a7f0e1c949fb502331825bfc6d9d8762d35f865443e7c95b6c7ef7", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__InstB2Gp193.lean": "9587ddb9961f44938032b609307ab91c0b0e757e3991f1ad95480dd50fd4f72b", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Cert.lean": "d92ee6889be4753fc99f467bd84039743325123a1165128378b9c906a04f2703", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193Price.lean": "0299bcd0fe255960eec682eef0f045f7e5cb1e4711af2aab4393526eae2caea3", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__P193ScalOK.lean": "479434815822e98f015e335361089c3788d00dc3dd39c2944f75410aa0c158fe", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__RateB2Gp193x.lean": "6b40cac1481c931d47b1a092e382d04716ede0e785c492a2f2983e886a257c3f", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__Raw.lean": "aba94a004c94dcae7cf3047c88a6da9561555f4ebe8ab92e299e6ce09ee7aa66", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GCert__Data__SolutionB2Gp193x.lean": "45c768c9d71a7cc18bd6db74cb036db880d89580ca60557bb4a492280296b169", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Adapt.lean": "feec0a3828867968a5c7c2c30b86ed70449abc3c660a60ada67203a75bae2ef7", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Letters.lean": "34906dbf5ae16b5174db00b4881a5cc1d2e583b8c8806db6523a5e2f86565f09", + "upstream/pr352/code/complex/inputs/complex/sources/Work__GFrame__Engine__Level.lean": "80fb3daa9a45de0ed6da570eb4476b9104734be65d0116f58bcfcbcd67f771d0", + "upstream/pr352/code/complex/inputs/complex/sources/tools__gx__ORIGIN.md": "6ba897a9495ddadcf8558b93133fdfaf66fc35ce7fa2c53e2d5667335c315e0b", + "upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gx.py": "6f3dc8bb639933227a8dae181ec4a542e85c7276be9c9e330f49518e7b630b95", + "upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxconv.py": "dab7fec9f44c2d368ed334055d7126e202017feb46e41a8d86e2d998720f67c2", + "upstream/pr352/code/complex/inputs/complex/sources/tools__gx__gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "upstream/pr352/code/complex/inputs/e8/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "upstream/pr352/code/complex/inputs/e8/NOTICE": "557c9ad4660eebd14a00583736c4d12d2c45f3fc9bc148845f9f3efec72c9434", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8.lean": "842b217147cf84e8042d6ef1c33104d5444b6587b594664bc9eb89b237ab4ad0", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/B2Ge8Main.lean": "987103107d5586c096016f0a702d0de35b74398dbb50ac66f5886a43a5ca0d05", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/ChallengeB2Ge8x.lean": "a59db9d54b83adc73391916f7c1ef5e381ff073027781c26cb350f43b79839e3", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Cert.lean": "13a243c7d7be31ae429d19b5ecd5d428d60c41b7cca8a330f0c4179b110ba7ea", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8Price.lean": "cd250dd72406dde37765c501f666ceeedcc18f831070b26369bcb154c1f99a8e", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/E8ScalOK.lean": "6bd5e68effe8913a3f73e25ea59142cd9928ddf81e94250a6ea28aa7317388b3", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8.lean": "5c7fb23df2c10b690f638a19bf066905b5b620b8a2ad0ffde76cc9348d8aa2b4", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8/S0.lean": "36de82f6969c23082876a4d6848428623d1c65d2df3fc917f23ecba003189dd2", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8End.lean": "6ea83365afe01664b2132a630511b4de65f938dc328744ce7f77a01fad97f32d", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Hist.lean": "cce81699abe1f85a870dcf64edd395d2cf5a586da7700af565b557093095ab51", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Par.lean": "a343219b419f30f8ac4dd3a0a98bf53550c5fec6b2cbd245320a95977c319016", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Scal0.lean": "78036e5443775ade5bde46a77ba3e0433fe22160da11b5b6c96c7f1075ecfbbd", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg0.lean": "f6b248dc4c3b2c94db95989b6bd5ad3c3f0d7ece3a511e5b69069550b821b138", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Seg1.lean": "79d16ccceb61391446ea97f77fddadafa9150e9dea97919e775f6c78daa71839", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8SegF.lean": "924340aebc6f68b5a6526311ce33341af0a0a5a8375416762f08c1914ec08abe", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab0.lean": "650600b631a21221956f9abbab9abebcc9cca628512d3e9a017e2373e2649b17", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab1.lean": "60036fa4deeb19d39fc0dddf31359d2b6d2407ff66070f145b111bff16190eb0", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab2.lean": "c8a248da3eb770ba55ef267d118b29d49983311087ef789398d555e2c44b3a41", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8Tab3.lean": "41975d430ec0095ad465a36d4903e90c01bc891d3abe5e2c372ef786c029a7ed", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/Gen/E8YChk.lean": "a290360c175544cb85edffe1b92fcf7d447cba09128e19de8dc87e0a1ff0c524", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/InstB2Ge8.lean": "c1fee298187ea19b5d70fcfccef7d4fd4161be70c0adda19a89ca9933a759954", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8.lean": "7b6e59724c0f140e714afba237d5a1a91b22da70abc096ce274690140b39a3a6", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/RateB2Ge8x.lean": "7c56d865ed6bfcb6919dabc1a6e53f8744ff4824a2f78335787485f3090970d1", + "upstream/pr352/code/complex/inputs/e8/Work/GCert/Data/SolutionB2Ge8x.lean": "dd52f1fe0a372480edaf5e6c64903d6257c410e43d406f8acb6bf8f60a1ee28f", + "upstream/pr352/code/complex/inputs/e8/comparator/B2Ge8x.json": "ddad06c37f9268986f3ec8ce43da5230ee2bd887da2480328413a0dc58f2a926", + "upstream/pr352/code/complex/inputs/e8/tools/certificate/gcert1-e8-r783.json.gz": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "upstream/pr352/code/complex/inputs/e8/tools/e8/replay.py": "be41ee310f28121c3e424cc8637d8fa02ef7c47fc8945e9bbd3856138fd800d6", + "upstream/pr352/code/complex/inputs/e8/tools/gen/foldgen.py": "a0f16e2c9e078ffbfb2174281ee93a48c18593aefb880318fc105ec85a205932", + "upstream/pr352/code/complex/inputs/e8/tools/gen/foldlib.py": "7a3c38a698c129e13a767da75926a1305eb0c031b908450afc6feb185505c59a", + "upstream/pr352/code/complex/inputs/e8/tools/gen/gen_rates.py": "ef8c869e4cf8da33a4c10b96f7f6faafd46e15d66766238070a60315aa169994", + "upstream/pr352/code/complex/inputs/e8/tools/gen/gen_sharp.py": "1b5eb3730cb16cf516e760879951fdfb9b065efc55f78c29a5c6404fcca57a78", + "upstream/pr352/code/complex/inputs/e8/tools/gen/templates/ChallengeB2L16x.lean.txt": "0488b7a2442c795414f103df912d1e6cc66d37b5be270940ea9564b7f2b666be", + "upstream/pr352/code/complex/inputs/e8/tools/gen/templates/SolutionB2L16x.lean.txt": "d414a890dfe126916374c1afc804b90e5081b7760f894b9ccdcf23d83a12f9ee", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gsmirror.py": "0e22bbe5924284e2fb916337ccefc8e41f6e54469749986ad15b3b81cfaec534", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxbind.py": "9c9dcfac47f0535bf3aa8ebf7c662cdef0ebda50a9f0a9282b8f3cf34809f835", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxcore.py": "eb972c06fe8c322db2d9a8d9a7d05596e8f40c4ca8e5f42eb6df3c7361b5d517", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxgen.py": "ce9151054370c2210ed08f54c249a19dcb6946d182cdf934dee1a3781b53040f", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxpaths.py": "f00802d48ef3fedb00278f0b1c7bde074cc49dd30f202d7f32a9d2aebb3be443", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxrate.py": "514a5719f970fe36b1273cf59df0396db0e042dd7864c2eea53ab2a2fd1e2ad6", + "upstream/pr352/code/complex/inputs/e8/tools/gx/gxunit.py": "3cc09a9c1a2db681c0f2016bc821af5b674d34834dbd6f195b9d482ce7c0ff58", + "upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check.py": "b6172d58749c0b3b9138570c74827bcb23bf5db4ff9643740768cd7782ac4ca6", + "upstream/pr352/code/complex/inputs/e8/tools/gx/regen_check_e8.py": "ad8fe9811c6ea0d89c795caef48686cfca600f5d540ebfd5d1251d6777cec7cf", + "upstream/pr352/code/complex/pins-e8.json": "bf66f785878f636616ceab193e5a222143945ea06fc2f13dfb99b204ebba82ff", + "upstream/pr352/code/complex/portable_complex.py": "44e8ae8a5b915358a97dbed5fe4e70195ed3581fd45a216df48fc82a029db87d", + "upstream/pr352/code/complex/regress_pr346.py": "29479da1547cd39cf20fe387cde4cad847a2880266db9d0ef3fb474f68591feb", + "upstream/pr352/code/export_p10.py": "1161d23b459f7d981d6716073745909126d5465018cbbea7e6e6a9e4e5d68add", + "upstream/pr352/code/pricing/base_two_moment.py": "aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098", + "upstream/pr352/code/pricing/certify_bit.py": "fc03e8f7bf73d7d70346b87c835d44508b0581c9ff9aec708fbbd4f0121e0394", + "upstream/pr352/code/pricing/cost.py": "d55d2b865d1c3d35e343e1a38c592b9172ed8e2596d1107e34d92e2a80c7d03f", + "upstream/pr352/code/pricing/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482", + "upstream/pr352/code/pricing/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "upstream/pr352/code/pricing/prime_new.py": "7bd5cb48537621f1217d174274d42483da4e2d02feec238643c798c36b30366a", + "upstream/pr352/code/pricing/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab", + "upstream/pr352/code/pricing/tile_check.py": "38c3f78daac118395565a65fa3543b1c349638ff2519ce7fda0dad2d788e90ae", + "upstream/pr352/code/provenance.py": "9f5c05aa4d172478f2ab67e7bb83cacebfccc10ecba650c23539cdcee18f2139", + "upstream/pr352/code/stage_cohort.py": "6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a", + "upstream/pr352/data/bit/BASE-RECORDS.bin.gz": "caabc13126e8f87d08f7697f51512cb3431ff52861f4190149251d8e19224430", + "upstream/pr352/data/bit/BASE-frames.json.gz": "35070b83d12ebc60003ed344315328713134a43bdb04217c2c5cbc39e101391f", + "upstream/pr352/data/bit/BASE-states.json.gz": "1e37ae5001447dd78a8287d8aa23d73a1d5862c4017f44db49af327f58d7cf22", + "upstream/pr352/data/bit/FINAL-NEW-FRAMES.json": "e7fe9d0686829ad5acf7930698b3c81a866ae834422aa3c9a12057dfae627175", + "upstream/pr352/data/bit/FINAL-RECORDS.bin.gz": "fc4f1986da4585dc1721bcd954a95b3ffb2b562cc7031f40242de81664e3acb6", + "upstream/pr352/data/bit/RECORD-SHA256SUMS": "21f732671eb34468be2252d4dfb81bdec4e7d7cd6564b93a482c2dd925e9c3b2", + "upstream/pr352/data/bit/labels.json": "e037cd3d19d68e08523d09fce1c5f92206567784eb59f1924d93a837e4302fce", + "upstream/pr352/receipts/complex-guard-e8.json": "f94a5dca42cbb88e9650f8f8a3ffbd1153636dfc0a48da5f7a7fca908c0650ad", + "upstream/pr352/receipts/kappa.json": "36316b6cfe423b56cda1fd52843e56c997d060e33d26b732b3ecf4de3ae83aaa", + "upstream/pr352/receipts/official-five-stage-columns.json": "32e291f249b4eab8d65664d10c94208fe2154bdb4a45aaff84e9e8da5295a29f", + "upstream/pr352/receipts/official-legality.json": "7e675b7720f056548c1ee9f9de523eea10e6b014ddf90b7a630fd96163acbce6", + "upstream/pr352/requirements.txt": "ca0825e0ae3db2855af7535ebdc4775beadbb6f07f8d3a84f0f4fd5b95ba5eae", + "upstream/pr352/verify.sh": "1a05c0b31ea37b2b5a4b84f6f9f504af8dd4220e13a6d9d86f64b2a731a903c7", + "verify.py": "aa6f05c39404b4038c31c72f9fe7a8e137df911f6cb6fc668e316be37c40b126" + } +} diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/NOTICE.md b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/NOTICE.md new file mode 100644 index 0000000000..d0a70f4c5c --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/NOTICE.md @@ -0,0 +1,9 @@ +# Attribution and correction + +Upstream PR352 at 04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2 is preserved byte for byte under upstream/pr352, including its complete NOTICE.md and nested notices. DaysSky prepared its E8 integration with Anthropic Claude assistance. Jacob Sussman authored the E8 complex unit, Lean theorem, generators and independent replay at 9c94857bbaee886f8649edee0bc2d3c738f9555e. All inherited contributors and licenses remain credited by the retained upstream notices. + +This independent wrapper, actual dirty scalar column audit, parity-correct finite invoice, receipt binding and adapter were prepared with substantial OpenAI Codex assistance. Apache-2.0 applies to the new code. + +The upstream portable guard applies the even-dimensional binary orthogonal-group order at odd dimension m=45. This wrapper corrects the cover to |O(45,2)|=|Sp(44,2)|=2^484 product_{i=1}^{22}(2^{2i}-1), a factor (2^44-1)/2 larger. The physical-stock row coefficient becomes 11162 instead of 11119. All retained strict finite bounds still hold, and the paid recursive histogram/coarse saving are unchanged. The complete corrected scalar, adapter, router, physical stock and literal invoice is recomputed from fresh receipts. + +The declarative source is the explicit pinned gcert word. Lean data are regenerated byte for byte; neither certificate-producer regeneration nor a local Lean kernel build is claimed. No unconditional multiplication theorem is asserted. diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/SOURCE.json b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/SOURCE.json new file mode 100644 index 0000000000..0d9bdfc56c --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/SOURCE.json @@ -0,0 +1,38 @@ +{ + "candidate_sha256": "3594f19c4d01cf11fb930c5c61baeed399620acbc5b94096b16bcacb23997dd3", + "certificate_gzip_path": "upstream/pr352/code/complex/inputs/e8/tools/certificate/gcert1-e8-r783.json.gz", + "certificate_gzip_sha256": "4b92f00fc7454b9b15e6d71a3b05062792eacca0a0ca4efee46f87827d57c8aa", + "complex_coarse": "876248285600677/1000000000000000000", + "declarative_source": true, + "declarative_source_scope": "Explicit byte-pinned gcert/1 scalar/frame word; no module/spec-to-certificate regeneration is claimed.", + "e8_source_head": "9c94857bbaee886f8649edee0bc2d3c738f9555e", + "lean_data_regeneration_claim": true, + "ledger": { + "calls": 20830, + "centres": 8, + "copy_calls": 40, + "deficit": 120, + "idle_calls": 960, + "max_child": 20, + "rank_mass": 56715 + }, + "parameters": { + "R": 783, + "W_live": 1263, + "h": 9, + "invocation_live": 1023, + "m": 45, + "v": 120 + }, + "parity_corrected_complete_invoice": true, + "producer_regeneration_claim": false, + "public_head": "04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2", + "public_pr": "https://github.com/CrocSwap/integer-mult-bounds/pull/352", + "scalar_primitive_steps": [ + 68158, + 72856 + ], + "scope": "Fresh explicit E8 scalar/frame word admission, actual arbitrary-dirty scalar column checks and both reflected paid profiles; unchanged upstream generators reproduce 25 Lean data/configuration files, but no Lean kernel build is performed. Correct odd-dimensional orthogonal cover order and full finite invoice replace PR352 even-dimensional undercount. All-size Clifford/selector/common-grid/row/compiler/routing and multiplication interfaces remain conditional inherited dependencies.", + "upstream_lean_rebuilt": false, + "upstream_manifest_sha256": "4b76fb09595321986da04017db16cf6aa36bcd6a048cdee2ec8b656de811e488" +} diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/admit.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/admit.py new file mode 100644 index 0000000000..82d7254876 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/admit.py @@ -0,0 +1,51 @@ +"""Independent E8 dirty scalar words and corrected odd-dimensional cover invoice. +OpenAI Codex-assisted; no Lean build, unconditional theorem, or combined kappa claim. +""" +import sys +sys.dont_write_bytecode=True +assert __debug__ +sys.set_int_max_str_digits(0) +from pathlib import Path +from fractions import Fraction as Q +from math import prod +import os,importlib.util,gzip,json,hashlib,time +import argparse +ap=argparse.ArgumentParser();ap.add_argument('--source',required=True,type=Path);ap.add_argument('--output',required=True,type=Path);args=ap.parse_args();ROOT=args.source.resolve();C=ROOT/'code/complex';OUT=args.output.resolve();assert not OUT.exists() and not OUT.is_relative_to(ROOT);OUT.mkdir(parents=True) +os.environ['CX_PINS']=str(C/'pins-e8.json') +for k in ['CX_SOURCE_PINS','CX_RECORD']:os.environ.pop(k,None) +sha=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest() +def load(name,p): + s=importlib.util.spec_from_file_location(name,p);m=importlib.util.module_from_spec(s);s.loader.exec_module(m);return m +G=load('independent_e8_guard',C/'portable_complex.py');raw=G.run(C,progress=lambda s:print(s,flush=True));(OUT/'UPSTREAM-GUARD.json').write_text(json.dumps(raw,sort_keys=True,indent=2)+'\n') +pins=json.loads((C/'inputs/complex/source-pins.json').read_text());cert=json.loads(gzip.decompress((C/pins['certificate']['path']).read_bytes()));S=G.module(C,'complex_scalars');A=S.flat(cert['A']);B=S.flat(cert['B']);v,R,h=cert['v'],cert['R'],cert['h'];n=2*v+R +# Live columns are arbitrary independent input scalars; only private work is initially zero. +# Set all abstract recursive frame transforms to identity to isolate both literal dirty scalar maps. +scalars={};start=time.monotonic() +for orientation in ['forward','backward']: + reg={('L',i):{i:Q(1)}for i in range(n)};steps=0 + for phase,e in S.inv_schedule(orientation,A,B,cert): + tag=e[0] + if tag=='recursive_center':continue + t=e[1] + if tag=='clear':reg[t]={} + elif tag=='copy':reg[t]=dict(reg.get(e[2],{})) + elif tag=='add': + src=dict(reg.get(e[2],{}));q=Q(e[3],e[4]);target=reg.setdefault(t,{}) + for j,c in src.items(): + z=target.get(j,Q(0))+q*c + if z:target[j]=z + else:target.pop(j,None) + else:raise AssertionError(tag) + steps+=1 + expected={('L',i):{i:Q(1)}for i in range(n)} + for t in range(v): + if orientation=='forward':expected[('L',v+t)][t]=Q(1) + else:expected[('L',t)][v+t]=Q(-1) + assert all(reg[r]==e for r,e in expected.items()),orientation+' actual live scalar map' + assert all(not z for r,z in reg.items()if r[0]!='L'),orientation+' dirty work cleanup' + scalars[orientation]=dict(status='PASS_FULL_ACTUAL_DIRTY_SCALAR_WORD',independent_live_columns=n,source_columns=v,target_columns=v,helper_columns=R,scalar_macros=steps,all_live_rows_correct=True,all_private_work_restored_zero=True,expected_map='Y += X; X and dirty S restored'if orientation=='forward'else 'X -= Y; Y and dirty S restored',recursive_scope='All recursive frame operators specialized to identity; validates literal dirty scalar map and both projection schedules, while upstream splice separately checks exact frame incidence and child ranks.') + print('PASS actual dirty scalar word',orientation,steps,flush=True) +guard_module=load('e8_parity_correct_finite_guard',Path(__file__).with_name('finite_guard.py'));correct=guard_module.finite_guard(raw,cert) +rowphysical=correct['physical_row_overcharge_coefficient'] +rec=dict(status='PASS_E8_INDEPENDENT_DIRTY_SCALARS_AND_CORRECTED_FINITE_GUARD',upstream_head='04b4c3c478b5bd8797d2663d89d8db4dfd0ad9f2',upstream_manifest_sha256=sha(ROOT/'MANIFEST.sha256'),guard_receipt_sha256=sha(OUT/'UPSTREAM-GUARD.json'),certificate_sha256=pins['certificate']['uncompressed_sha256'],scalar_words=scalars,finite_guard=correct,upstream_finding='The upstream m=45 guard uses the even-dimension orthogonal order and undercounts the cover by (2^44-1)/2. Correcting it preserves every retained strict finite guard and changes no coarse saving.',seconds=time.monotonic()-start,scope='Independent audit of supplier words and finite charges only; no Lean build or complete multiplication theorem proof.') +(OUT/'INDEPENDENT-AUDIT.json').write_text(json.dumps(rec,sort_keys=True,indent=2)+'\n');print('PASS corrected complete invoice',correct['group_bits'],rowphysical,flush=True) diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/finite_guard.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/finite_guard.py new file mode 100644 index 0000000000..c8e3e8cee9 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/finite_guard.py @@ -0,0 +1,41 @@ +"""Parity-correct exact binary orthogonal cover invoice for the pinned E8 supplier. +OpenAI Codex assistance; corrects PR352 even-dimension formula at m=45. +""" +import sys +if not __debug__:raise SystemExit('Assertions required') +sys.dont_write_bytecode=True +sys.set_int_max_str_digits(0) +from math import prod +def orth_order(m): + if m%2: + r=m//2;return(1<<(r*r))*prod((1<<(2*i))-1 for i in range(1,r+1)) + return(1<<(m-1+(m//2-1)**2))*prod((1<<(2*i))-1 for i in range(1,m//2)) + +def finite_guard(raw,cert): + enumeration={} + for d in [1,2,3,4,5]: + odd=[x for x in range(1,1</research/w3-p10b-complex-p10` +runs the original and the generalized checks on PR #346's own p = 10 program and pins. They agree byte for byte on +both scalar schedules, both splice programs, the primitive expansions, the ledger, the labels and the precision +guard. The generalized run only adds the keys `centres` and `centre_ranks`. + +## Bit word + +The bit word, its data and its checks are PR #346's, byte-identical (`data/bit/`, `code/builders/`, `code/checkers/`, +`code/pricing/`, steps 1–4 of `verify.sh`). `SOURCE-pr346.json` records the git blob id of every file carried over +unchanged from PR #346 at `11b4de5` (73 files), the 11 edited files and the 32 not carried over (PR #346's p = 10 +complex producer, its modules, program and receipts). Step 0 of `verify.sh` checks the blob ids (`code/provenance.py`). The vendored base snapshot (PR #325 p10b, root 7.70276909563042·10⁻⁴) is +rebuilt through Design T and twin condensation to the hash-checked final word (root 8.01726·10⁻⁴). On that word +`verify.sh` runs: + +- PR #266's official legality and five-stage columns checkers; +- exact rational nondegeneracy and the prime-witness rule on the 320 new frames; +- the width-100 bank tiling. + +`code/pricing/certify_bit.py` then certifies c and runs PR #315's outer assembly with the E8 b. All 47 strict +constraints are positive (including `complex_above_bit` and `leaf_saving_above_bit`), and the adjacent 10⁻¹⁸ κ is +rejected. + +## Verify + + bash research/w3-p10b-e8-complex/verify.sh /tmp/w3-p10b-e8-verify + +About five minutes. It needs Python 3.12+ with `requirements.txt` (numpy, mpmath), g++ (C++17) and Boost headers. The +final line is: + + PASS conditional kappa = 801083628465007/1000000000000000000 = 0.000801083628465007 + +Receipts of this run are in `receipts/`: +- `complex-guard-e8.json`: the full complex guard output; +- `kappa.json`; +- PR #346's official-checker receipts, unchanged. + +## Open obligations + +- **Bit side.** All of PR #346's open obligations remain unchanged: PR #310's native downstream chain; PR #315's + scalar/prime/finite stages, replaced by the official cohort checkers; the inherited row constants 9909 + 252; + every inherited interface of PR #315/#325. +- **Complex side.** + - The generalization of the portable complex checks to table scatter and full-rank totals is new code, checked by + regression against PR #346 and by the E8 run. + - PR #200's complete complex checker and PR #194's contract, which #346 ran on its #202-tree program, work on + that producer's format and are not run on E8. In their place stand Sussman's Lean theorem (checked in his + repository, not rebuilt here), his two checkers, his independent replay, and the byte-for-byte Lean-data + regeneration. +- This is a conditional finite construction, not a formal verification of the multiplication theorem. + +Because the bit side binds, a bit-side improvement on this word now raises κ until it reaches the E8 complex +saving, about 8.76·10⁻⁴. + +## Credits + +- Complex unit, Lean theorem, generators and replay: Jacob Sussman (wht-power-saving-lean). His unit uses devices + from this repository: jamesyc #124 and eumemic #143; Chafik Boukhalfa #200/#233; icekylinx #184, carried in + ikeboy's #191/#193. +- Bit word and package base: LJH-217 (#346), on DreamingOfClouds' #325/#315 and utcorvusvolat-dotcom's w3 work + (#310). +- Official checkers: #266. +- Complex checks: the #315/#304/#256/#233/#202/#200/#194/#184 lineage. + +See `NOTICE.md`. diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/SOURCE-pr346.json b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/SOURCE-pr346.json new file mode 100644 index 0000000000..0de6ddc402 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/SOURCE-pr346.json @@ -0,0 +1,129 @@ +{ + "schema": "pr346-provenance/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/346", + "commit": "11b4de5ff8ed5fccf55d4af1043358d257308e8e", + "source_root": "research/w3-p10b-complex-p10", + "note": "Every file under \"identical\" has, in this package, the git blob id it has in PR #346 at the commit above (check with: git ls-tree -r 11b4de5ff8ed5fccf55d4af1043358d257308e8e -- research/w3-p10b-complex-p10). Files under \"changed\" were edited here; \"removed\" were not carried over.", + "identical": { + "LICENSE": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "code/builders/addcomp.py": "6d5fea18b0f58bf36e012981055261101230096d", + "code/builders/build_v5.py": "f18f96300806f9308cfd24554de41b85860ae514", + "code/builders/decomp.py": "365e5bf2a8204e3512929c2bba57cc9e8f4b66e9", + "code/builders/gather.py": "ef063373c227fe4efdac34bb7bef11f8f7fe611f", + "code/builders/interface.py": "0673ddabe9c7e6ba6221ca05f288a2b330c627f5", + "code/builders/twin.py": "6ec783fd2b0a5592c5733c1882d896fffa63a0a7", + "code/checkers/columns_h.cpp": "07b7fd220c1742eb9c634e8572bef2df8d1f2aa6", + "code/checkers/exactnd_h.py": "fa90b5089f53cbd1f98ec026391cf9375eb6a11d", + "code/checkers/json.hpp": "82d69f7c5d044c9887c96b90c97f5639083ecd14", + "code/checkers/legality_h.cpp": "f4501be83a229cac1f3050993a204d8f75b86108", + "code/checkers/sub.hpp": "70a8a83faf3e28cb3ffe1eaa1d5dd194028712c7", + "code/checkers/verifyT.cpp": "af2f7a3cd7e1780d549c60a74ef86371abcc560c", + "code/complex/code/complex_basis.py": "8c400798a5f25d366747b35cb55e985222039083", + "code/complex/code/complex_gx.py": "0986cc810e1d72ffb2b9ea70d1fe40517bbf2d76", + "code/complex/inputs/complex/LICENSE": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "code/complex/inputs/complex/NOTICE": "63aa295646734f62c4270e653811530f9a570d3a", + "code/complex/inputs/complex/retained/FINITE_BRIDGE.txt": "c1a88436113a1351f80c72bd08f6406ed5faa51d", + "code/complex/inputs/complex/retained/compact-control-layout.tex": "16f4d233471a7d189163ae7e7902becadecbba64", + "code/complex/inputs/complex/retained/compact-control-movement.tex": "06b6a9ef24245ac7b724c53a204635415b402357", + "code/complex/inputs/complex/retained/copied-centers-assembly.tex": "b0c69166c3048d27518355995e3e5b622722c696", + "code/complex/inputs/complex/retained/copied-centers-lemma.tex": "8933aaf508aa9d4c75ba1290913e02f6868d351d", + "code/complex/inputs/complex/retained/endpoint-gauge-complex.tex": "907a0ceda8df0317ddc7f2b71df5af2aa4d47dfc", + "code/complex/inputs/complex/retained/general-clifford-frames.tex": "0367eeb005298601f28a673861d6f71bf1d0ebbb", + "code/complex/inputs/complex/retained/stopped-product-complex.tex": "4a9037137cd3158dbeca6d9e3b1881a599ebfcb5", + "code/complex/inputs/complex/sources/Work__Bridge__Cert.lean": "f7bdc3d903341a9546056cde124d642e2677318b", + "code/complex/inputs/complex/sources/Work__Bridge__Net.lean": "204f6d9cf902c85900f237bd99a23774e9a3f81b", + "code/complex/inputs/complex/sources/Work__Carrier__Live.lean": "b8306527d64ae06271c6aa55c5e0b3ded85c651c", + "code/complex/inputs/complex/sources/Work__Carrier__Phases.lean": "305da15b5d129959a0696e2031289eea91ec1813", + "code/complex/inputs/complex/sources/Work__Fourier__Main.lean": "9aa06b5bf28a2380ef9d54a0785ac2369f6012e4", + "code/complex/inputs/complex/sources/Work__GCert__Chain__Geom.lean": "eb4490af8b0f5b97984d9dbdf345d86fe65d02c7", + "code/complex/inputs/complex/sources/Work__GCert__Chain__InvThm.lean": "d69fcb4992778bcd2d12596e365ee8483aa538a2", + "code/complex/inputs/complex/sources/Work__GCert__Chain__NetCert.lean": "6336ba076607f4229c58e51b01f35b8457effb88", + "code/complex/inputs/complex/sources/Work__GCert__Chain__NetDef.lean": "c13042eb43328f9771a5f85e83edb59810f3a006", + "code/complex/inputs/complex/sources/Work__GCert__Chain__NetStage.lean": "670f4c6a84b3453dd0b1bc0879fff3ecd9410919", + "code/complex/inputs/complex/sources/Work__GCert__Chain__Phased.lean": "e68c42377f4fd0d0352ba697357d05f60333c8dc", + "code/complex/inputs/complex/sources/Work__GCert__Chain__WinB.lean": "951edde5cf5fdfb1dd5f7902499f3ccab961bf4a", + "code/complex/inputs/complex/sources/Work__GCert__Data__B2Gp193Main.lean": "d7ecfebcea804af8209a0db3d89caa9ed364ea7a", + "code/complex/inputs/complex/sources/Work__GCert__Data__Glue.lean": "c6cbac38e3a2fbabac74610519e26fcc065f7ff5", + "code/complex/inputs/complex/sources/Work__GCert__Data__InstB2Gp193.lean": "9b9925ce268a9f757fd44913140a57df95315769", + "code/complex/inputs/complex/sources/Work__GCert__Data__P193Cert.lean": "3c3250279e66b56c9fee8a12c265ae2780ce4761", + "code/complex/inputs/complex/sources/Work__GCert__Data__P193Price.lean": "eeed011d64482adbdf0d6ff48a7c395a7252d57a", + "code/complex/inputs/complex/sources/Work__GCert__Data__P193ScalOK.lean": "3539192ac1d3a51641f7ba08fa06a8659b12bc0b", + "code/complex/inputs/complex/sources/Work__GCert__Data__RateB2Gp193x.lean": "df563cde73a8f942e9c90189261dd6e8482d40f1", + "code/complex/inputs/complex/sources/Work__GCert__Data__Raw.lean": "499fa67e88ebfe0ad777081cb61def3f74de81ba", + "code/complex/inputs/complex/sources/Work__GCert__Data__SolutionB2Gp193x.lean": "0392e1f05bb89cca472c976391a649418dde186e", + "code/complex/inputs/complex/sources/Work__GFrame__Engine__Adapt.lean": "24e261ad0862ba778f0e7f00d48756865b7f4eb8", + "code/complex/inputs/complex/sources/Work__GFrame__Engine__Letters.lean": "2eca6e713bfd47449b872a0462857806861be9d5", + "code/complex/inputs/complex/sources/Work__GFrame__Engine__Level.lean": "6bd7cfa0c3f34bbd04fc445eceae0cc4d4c567fc", + "code/complex/inputs/complex/sources/tools__gx__ORIGIN.md": "e28b355d0a271da6c8c7da8b6d68451817378bf1", + "code/complex/inputs/complex/sources/tools__gx__gx.py": "6d14c0a976146eb881c1e3897b2476f8633d4e9c", + "code/complex/inputs/complex/sources/tools__gx__gxbind.py": "fcb625619cb07a9be9594422357786ca6e3c4add", + "code/complex/inputs/complex/sources/tools__gx__gxconv.py": "49ebb65973a2403bb22aa32692762cd0522a0287", + "code/complex/inputs/complex/sources/tools__gx__gxcore.py": "3e3f0a3076f3c326e7833c74eceecb3436dd3185", + "code/export_p10.py": "f492305d64e2354ed2959f8bd19ad670f50db238", + "code/pricing/base_two_moment.py": "14a90fa0e788217856f070382c9e61bd7c603c61", + "code/pricing/certify_bit.py": "b8a6c4be5931daa83921e23ee5ad3ab263ca8ce8", + "code/pricing/cost.py": "677584c1c6b0e959c19f58521b68d4b3e847f97e", + "code/pricing/moment.py": "7d697cb45203fe72d97037403d6da41f71f3b7fd", + "code/pricing/outer.py": "43007488ad2c43187c77cc6798beff8b1cd76ad2", + "code/pricing/prime_new.py": "372ce0958a23c0312209a0a0c6ea11af34e8a92d", + "code/pricing/prime_witnesses.py": "7f16d930302ae879c562dd58e085d9747fcac077", + "code/pricing/tile_check.py": "1e537bd2e48b93bbfdcbdec42672075a2441b584", + "code/stage_cohort.py": "f6d7afe3e623208c4207b6a683a1e3e49249e31c", + "data/bit/BASE-RECORDS.bin.gz": "087f8261242e0e897907b8d4a86a7e1d100df172", + "data/bit/BASE-frames.json.gz": "42ad5869ca5927c51daaa0af887c58960a4b37e3", + "data/bit/BASE-states.json.gz": "427bc873b9ac858dd42c41b7a0cf8523e7dc3d09", + "data/bit/FINAL-NEW-FRAMES.json": "a508432521da48acfe249be0690405b24a955ed0", + "data/bit/FINAL-RECORDS.bin.gz": "884af231daea2b9d5fdb7d44b28e3126c42c9fab", + "data/bit/RECORD-SHA256SUMS": "6525e19277a941f45d75ab9235c72fd9a0ac0bc8", + "data/bit/labels.json": "b2974963e69f9462817c1db422575843f15a412d", + "receipts/official-five-stage-columns.json": "34918d43331b6585f2df68f27a0de4a806d4e1f5", + "receipts/official-legality.json": "1f400bd50f802ffd9dcd89a522e8ff29ec29c174" + }, + "changed": { + "NOTICE.md": "6d5643cc768697bae1e5c42668492ee446eb4fb0", + "README.md": "4de9dab5f7ef1d4d0855b44f9bfa59f29abd9bc7", + "code/complex/certify_complex.py": "d29a2e4e6f0e6b3c30c1ec59ae9f3fdef98f3d8b", + "code/complex/code/complex_labels.py": "bf144bc76410bf868028cb2374ddbf77eab4186a", + "code/complex/code/complex_scalars.py": "8289132f0db52cc5d4d44598c445273a22cece55", + "code/complex/code/complex_splice.py": "bb6fb13fde2cf7f32c4d1b05c31dbfcb53f0047e", + "code/complex/code/p10pins.py": "d9063dd4b736ea486b8dcb1f059cc441a216cc89", + "code/complex/inputs/complex/source-pins.json": "b4fe17102a50e62710634e24af6d542367f06cb8", + "code/complex/portable_complex.py": "f2b639da7b4cf06fdcfbe67809ea07577bedf945", + "receipts/kappa.json": "cf7e59c10041610cd4dc89f9beb2e3630c8a9521", + "verify.sh": "93efd88caac9bcc44916aa3ee8d0e39858939fd9" + }, + "removed": [ + "code/complex/inputs/complex/NOTICE-PR304", + "code/complex/inputs/complex/centre-mw/NOTICE", + "code/complex/inputs/complex/centre-mw/centre46_graph.diff", + "code/complex/inputs/complex/centre-mw/exact_result.json", + "code/complex/inputs/complex/centre-mw/pmod46_ptc1_final.json", + "code/complex/inputs/complex/centre-mw/qmod_q1_snap1.json", + "code/complex/inputs/complex/centre-mw/tmod_final.json", + "code/complex/inputs/complex/gcert1-p10-L10f.json.gz", + "code/complex/pins-p10f.json", + "data/complex/bit_qmod_p10.json", + "data/complex/gcert1-p10-L10f.json.gz", + "data/complex/pm_p10b.json", + "data/complex/tmod_t2_p10.json", + "producer/admit_p.py", + "producer/aligned_word_p.py", + "producer/anneal_pmod.py", + "producer/basecost.py", + "producer/certify_complex.py", + "producer/compmap.py", + "producer/contract_p.py", + "producer/gcert_emit.py", + "producer/graph_centre46.diff", + "producer/localscan.py", + "producer/make_layer_p.py", + "producer/modules_centre_root.diff", + "producer/normalize_scatter.py", + "producer/run_one.sh", + "receipts/complex-admission-L10e.txt", + "receipts/complex-admission-L10f.txt", + "receipts/complex-guard-L10e.json", + "receipts/complex-guard-L10f.json", + "receipts/kappa-L10f.json" + ] +} diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/addcomp.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/addcomp.py new file mode 100644 index 0000000000..6d5fea18b0 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/addcomp.py @@ -0,0 +1,12 @@ +import numpy as np, json, sys +d=sys.argv[1] +s=json.load(open(d+'/249-states.json')) +v=s['v']; ZERO=s['ZERO'] +rec=np.fromfile(d+'/249-records.bin',dtype='1 else ''+os.environ.get('W3WORK','work')+'/agentA/T/out' +LIMIT=int(sys.argv[2]) if len(sys.argv)>2 else 10**9 +os.makedirs(OUT,exist_ok=True) +s,fr,dim,rec=load_snapshot(''+os.environ.get('W3WORK','work')+'/snap') +v=s['v'];n=s['n']; ZERO=s['ZERO']; FULL=s['FULL'] +FR=fr['frames'] +info=pickle.load(open(''+os.environ.get('W3WORK','work')+'/agentA/T/info.pkl','rb')) +part=pickle.load(open(''+os.environ.get('W3WORK','work')+'/agentA/interface.pkl','rb')) +P=lambda p:p//2 +cube_of=[tuple(sorted(P(p) for p in lab[i])) for i in range(v)] +bits=lambda i: tuple(p%2 for p in lab[i]) +init={r:s['initial'][str(r)] for r in range(n)} +NR=len(rec) +HH=20 +chi=np.zeros((v,HH),dtype=np.int64) +for i in range(v): + for p in lab[i]: chi[i,p]=1 +icache={} +def items_in(fid): + if fid in icache: return icache[fid] + if dim[fid]==0 or dim[fid]>3: icache[fid]=None; return None + A=np.array(FR[str(fid)]['A'],dtype=np.int64) + I=frozenset(np.nonzero(np.all(chi@A.T==0,axis=1))[0].tolist()); icache[fid]=I if I else None; return icache[fid] +byset={} +for k_ in FR: + f=int(k_) + if 1<=dim[f]<=2: + I=items_in(f) + if I and len(I)==dim[f]: byset.setdefault(I,f) +newframes={} +nextid=max(int(k) for k in FR)+1 +from fractions import Fraction +def kernel_int(B): + M=[[Fraction(x) for x in b] for b in B]; m=len(M); piv=[]; r=0 + for c in range(HH): + pr=next((i for i in range(r,m) if M[i][c]!=0),None) + if pr is None: continue + M[r],M[pr]=M[pr],M[r]; pv=M[r][c]; M[r]=[x/pv for x in M[r]] + for i in range(m): + if i!=r and M[i][c]!=0: + f_=M[i][c]; M[i]=[a-f_*b for a,b in zip(M[i],M[r])] + piv.append(c); r+=1 + if r==m: break + out=[] + for fc in [c for c in range(HH) if c not in piv]: + x=[Fraction(0)]*HH; x[fc]=Fraction(1) + for i,pc in enumerate(piv): x[pc]=-M[i][fc] + den=1 + for q in x: den=den*q.denominator//math.gcd(den,q.denominator) + out.append([int(q*den) for q in x]) + return out +def frame_for(itemset): + global nextid + I=frozenset(itemset) + if I in byset: return byset[I] + B=[chi[i].tolist() for i in sorted(I)] + fid=nextid; nextid+=1 + newframes[fid]={'B':B,'A':kernel_int(B),'dim':len(B)} + dim[fid]=len(B); byset[I]=fid; icache[fid]=I + return fid +# ---------------- roles +role={} +for cube,C in info.items(): + for x in C['X']: role[x]=('X',cube) + for pl,(r,last,e) in C['BH'].items(): role[r]=('BH',cube) + for r in C['single']: role[r]=('S',cube) + for r in C['carrier']: role[r]=('C',cube) + for r in C['death']: role[r]=('D',cube) + for r in C['upper']: role[r]=('U',cube) + for r in C['other']: role[r]=('Y' if v<=r<2*v else 'M',cube) +moves=collections.defaultdict(list) +for k in np.nonzero(rec[:,0]==0)[0]: moves[int(rec[k,1])].append(int(k)) +# special cubes: Y or X reading BH at planes -> skip +skipc=set(); xplane_keep=set() +for k in np.nonzero(rec[:,0]==1)[0]: + a,b,f=int(rec[k,1]),int(rec[k,2]),int(rec[k,4]) + if 1<=dim[f]<=3: + ra=role.get(a,('?',None)); rb=role.get(b,('?',None)) + if rb[0]=='BH' and ra[0]=='X': xplane_keep.add(a) # v5: keep this X's plane visit +# single -> target (delivery ADD) +sdeliv={} +for k in np.nonzero(rec[:,0]==1)[0]: + a,b=int(rec[k,1]),int(rec[k,2]) + if v<=a<2*v and role.get(b,('?',))[0]=='S' and dim[int(rec[k,4])]==HH-1: sdeliv[b]=a-v +# X-X forward mix ADDs +xx={} +for k in np.nonzero(rec[:,0]==1)[0]: + a,b=int(rec[k,1]),int(rec[k,2]) + if a new record (replace in place) +insert_before=collections.defaultdict(list) # k -> records to emit before k +newblock=[] +fwd=[] # new forward gates for inversion (a,b,f) +unused=set() +def MOVE(r,old,new): + assert dim[new]>=dim[old], (r,old,new) + return [0,r,old,new,dim[new]-dim[old],0] +def ADD(a,b,f,c=1,z=40): return [1,a,b,c,f,z] +def xor(a,b): return tuple(p^q for p,q in zip(a,b)) +allb=[(i,j,k) for i in (0,1) for j in (0,1) for k in (0,1)] +cubeframes_of={} +def is_cubeframe(fid,cube): + I=items_in(fid) + return bool(I) and all(cube_of[i]==cube for i in I) +stats=collections.Counter() +GPOOL=[] +for cube in todo: GPOOL.extend(sorted(info[cube]['death'])) +GPOOL_SET=set(GPOOL) +used_ids=set() +def take_id(own): + while own: + r=own.pop() + if r not in used_ids: used_ids.add(r); return r + while GPOOL: + r=GPOOL.pop() + if r not in used_ids: used_ids.add(r); return r + raise Exception('global pool empty') +for cube in todo: + C=info[cube]; byb=C['byb']; Xb=lambda b: byb[b] + cubeset=set(C['items']) + regs=set(C['X'])|{r for pl,(r,l,e) in C['BH'].items()}|set(C['single'])|set(C['carrier'])|set(C['death']) + # ---- mix pairs + mixpairs=[] + for b in allb: + if b[1]==0: + A_,B_=Xb(b),Xb(xor(b,(0,1,1))) + k=xx[frozenset((A_,B_))] + car=int(rec[k,1]); pas=int(rec[k,2]) + early=dim[int(rec[k,4])]==2 + Mf=int(rec[k,4]) if early else frame_for((A_,B_)) + mixpairs.append(dict(A=car,B=pas,k=k,early=early,M=Mf,bA=bits(car),bB=bits(pas))) + mixof={} + for mp in mixpairs: mixof[frozenset((mp['A'],mp['B']))]=mp + # ---- planes and BHs + planes=[] + for pl,(r,last,e) in C['BH'].items(): + fl=part[r]['frames']; pids=[f for f in fl if dim[f]==3] + bs=[bits(i) for i in pl] + if len({b[0] for b in bs})==1 or len({b[1]^b[2] for b in bs})==1: dirn=(0,1,1) + elif len({b[1] for b in bs})==1 or len({b[0]^b[2] for b in bs})==1: dirn=(1,0,1) + else: dirn=(1,1,0) + # split into 2 edges along dirn + its=sorted(pl); e1=None + edges=[] + rest=set(its) + while rest: + a=min(rest); bb=[i for i in rest if xor(bits(a),bits(i))==dirn][0] + edges.append(frozenset((a,bb))); rest-={a,bb} + planes.append(dict(items=pl,BH=r,pids=pids,first=pids[0],dirn=dirn,edges=edges)) + # ---- tetra edges (non-mix): each in 2 planes + tedges={} + for p in planes: + if p['dirn']!=(0,1,1): + for e in p['edges']: tedges.setdefault(e,[]).append(p) + assert len(tedges)==8 and all(len(x)==2 for x in tedges.values()), (cube,len(tedges)) + medges={} + for p in planes: + if p['dirn']==(0,1,1): + for e in p['edges']: medges.setdefault(e,[]).append(p) + assert len(medges)==4 and all(len(x)==2 for x in medges.values()) + # ---- singles matching: single for target t holds item s=t^011; edge {s, t^101} or {s, t^110} + singles=[] + for r,d in C['single'].items(): + t=sdeliv[r]; c=d['exit_content']; assert len(c)==1 + sitem=c[0]; tb=bits(t); assert xor(tb,(0,1,1))==bits(sitem), (r,t,sitem) + cands=[frozenset((sitem,byb[xor(tb,(1,0,1))])),frozenset((sitem,byb[xor(tb,(1,1,0))]))] + singles.append((r,t,sitem,cands)) + # bipartite matching singles <-> tedges + match={} + def try_assign(i,used): + r,t,si,cands=singles[i] + for e in cands: + if e in used: continue + used.add(e) + if e not in match or try_assign(match[e],used): match[e]=i; return True + return False + for i in range(len(singles)): assert try_assign(i,set()), 'no matching' + # ---- carriers + carriers=[] + for r in C['carrier']: + d=part[r]; c=d['exit_content'] + if len(c)==1: carriers.append((r,'line',c[0])) + elif len(c)==2: + e=frozenset(c); diff=xor(bits(c[0]),bits(c[1])) + if diff==(0,1,1): carriers.append((r,'M',e)) + else: + assert e in tedges, ('carrier pair not a T edge',cube,c) + carriers.append((r,'T',e)) + elif len(c)==3: carriers.append((r,'drop',None)) # p10 port: dead 3-item chain partial, register continues as a gauge + else: raise Exception(('carrier content',len(c))) + # ---- id pool for leftovers + pool=list(C['death']) + # ---- assign pair-holders + # tetra edges: L_a, L_b ; send L for item min->face plane? choose: arrival to plane p from edge e + arrivals=collections.defaultdict(list) # plane index -> list of (regid placeholder, source kind, edge, item) + T_regs={} + for e,pls in tedges.items(): + a,b=sorted(e) + # pls: two planes; L_a -> pls[0], L_b -> pls[1] + T_regs[e]=dict(La=a,Lb=b,pa=pls[0],pb=pls[1]) + plane_index={id(p):i for i,p in enumerate(planes)} + for e,tr in T_regs.items(): + arrivals[plane_index[id(tr['pa'])]].append(('L',e,tr['La'])) + arrivals[plane_index[id(tr['pb'])]].append(('L',e,tr['Lb'])) + for e,pls in medges.items(): + for p in pls: arrivals[plane_index[id(p)]].append(('M',e,None)) + # decide BH vs LO per plane, assign ids + regid={} # (kind,e,item/planeidx) -> role id + recyc={} # plane index -> carrier id + pair_carriers=[(r,kind,c) for (r,kind,c) in carriers if kind in ('M','T')] + for (r,kind,c) in pair_carriers: + last=part[r]['frames'][-1] + for pi,p in enumerate(planes): + if last in p['pids'] and c in p['edges'] and pi not in recyc: + recyc[pi]=(r,kind,c); break + recycled_carriers={x[0] for x in recyc.values()} + carriers=[x for x in carriers if x[0] not in recycled_carriers] + for pi,p in enumerate(planes): + arr=arrivals[pi]; assert len(arr)==2 + bh,lo=arr[0],arr[1] + if pi in recyc: + ce=recyc[pi][2] + if bh[1]==ce: bh,lo=lo,bh + assert lo[1]==ce + key_bh=(bh[0],bh[1],bh[2] if bh[0]=='L' else pi); key_lo=(lo[0],lo[1],lo[2] if lo[0]=='L' else pi) + regid[key_bh]=p['BH'] + if pi in recyc: regid[key_lo]=recyc[pi][0]; p['lo_carrier']=recyc[pi][0] + else: regid[key_lo]=take_id(pool) + p['bh_key']=key_bh; p['lo_key']=key_lo + # ---- remove old records of cube-layer regs within the cube layer + # deaths: all records removed (MOVEs, ADDs) -> handled via role-level removal below + # BH: MOVEs into cube frames up to and including first plane id + for p in planes: + r=p['BH'] + for k in moves[r]: + nf=int(rec[k,3]) + if is_cubeframe(nf,cube): + remove[k]=True + if nf==p['first']: break + # singles: remove MOVEs into cube frames; modify exit MOVE + for r,t,si,c in singles: + ex=part[r]['exit']; k=ex[2] + for kk in moves[r]: + if kkE (k_A), B: line->E (k_B), mix at E (mp['k']) + kA=part[A_]['exit'][2]; kB=part[B_]['exit'][2] + E=int(rec[kA,3]); assert int(rec[mp['k'],4])==E + # carrier: emit mix at M then MOVE M->E in place of kA + mixrec=rec[mp['k']].tolist(); mixrec[4]=mp['M'] + insert_before[kA].append(mixrec) + rr=rec[kA].tolist(); rr[2]=mp['M']; rr[4]=dim[rr[3]]-dim[rr[2]]; modify[kA]=rr + remove[mp['k']]=True + # passive: remove its MOVE to E; its next MOVE (from E) gets source M + remove[kB]=True + nxt=[kk for kk in moves[B_] if kk>kB] + assert nxt, 'passive no next move' + k2=nxt[0]; rr=rec[k2].tolist(); assert rr[2]==int(rec[kB,3]), ('passive next move',rr) + # any ADDs of passive at E between? check later in verification + rr[2]=mp['M']; rr[4]=dim[rr[3]]-dim[rr[2]]; modify[k2]=rr + # ---- deaths & cube-internal ADD removal + for r in C['death']: + for kk in moves[r]: remove[kk]=True + stats['cubes']+=1 +unused=GPOOL_SET-used_ids +print('new frames',len(newframes),'unused ids',len(unused), dict(stats)) +# ---------------- ADD removal (forward cube-layer gates) for transformed cubes +tset=set(todo) +cl_regs=set() +for cube in todo: + C=info[cube] + cl_regs|=set(C['X'])|{r for pl,(r,l,e) in C['BH'].items()}|set(C['single'])|set(C['carrier'])|set(C['death']) +deaths=set(); +for cube in todo: deaths|=set(info[cube]['death']) +fwd_removed=np.zeros(NR,bool) +for k in np.nonzero(rec[:,0]==1)[0]: + a,b,f=int(rec[k,1]),int(rec[k,2]),int(rec[k,4]) + if dim[f]==HH: continue + if a in deaths or b in deaths: + if v<=a<2*v and dim[f]==0 and int(rec[k,5])==4: continue # comp read handled separately + fwd_removed[k]=True; continue + if 1<=dim[f]<=3: + ra=role.get(a,('?',None)); rb=role.get(b,('?',None)) + if ra[1] in tset or rb[1] in tset: + # keep interface ADDs + if ra[0] in ('U','Y','M'): continue + if ra[0]=='X' and rb[0]=='X': continue # mix handled separately + if ra[0]=='X' and a in xplane_keep and rb[0]=='BH': continue # v5: special X reads its plane block + fwd_removed[k]=True +# LIFO matching of inverses +stack=collections.defaultdict(list); inv_of={} +for k in range(NR): + if rec[k,0]!=1: continue + a,b,f=int(rec[k,1]),int(rec[k,2]),int(rec[k,4]) + if v<=a<2*v: continue + if dim[f]!=HH: stack[(a,b)].append(k) + else: + if stack[(a,b)]: inv_of[stack[(a,b)].pop()]=k +nomatch=sum(1 for k in np.nonzero(fwd_removed)[0] if k not in inv_of) +print('removed forward ADDs',int(fwd_removed.sum()),'without inverse',nomatch) +for k in np.nonzero(fwd_removed)[0]: + remove[k]=True + if k in inv_of: remove[inv_of[k]]=True +# deaths: also remove any FULL ADDs involving them that remain +for k in np.nonzero(rec[:,0]==1)[0]: + a,b,f=int(rec[k,1]),int(rec[k,2]),int(rec[k,4]) + if (a in deaths or b in deaths) and dim[f]==HH: remove[k]=True +# comp reads: remove all frame-0 cat4 reads from sigma0 helpers (regenerated later) +comp=(rec[:,0]==1)&(rec[:,5]==4)&(rec[:,1]>=v)&(rec[:,1]<2*v) +for k in np.nonzero(comp)[0]: + if dim[int(rec[k,4])]==0 and dim[init[int(rec[k,2])]]==0: remove[k]=True +# ---------------- assemble +out=[] +out.extend(newblock) +for k in range(NR): + if k in insert_before: out.extend(insert_before[k]) + if remove[k] and k not in modify: continue + out.append(modify.get(k, rec[k].tolist())) +# inverses of new forward gates, appended at the end +for (o,a,b,c,f,z) in reversed(fwd): + out.append([1,a,b,-c,FULL,41]) +out=np.array(out,dtype=np.int32) +print('records',NR,'->',len(out)) +# states +newinit=dict(s['initial']); +for r in unused: newinit[str(r)]=FULL +st=dict(s); st['initial']=newinit; st['record_count']=len(out) +json.dump(st,open(OUT+'/249-states.json','w')) +out.tofile(OUT+'/249-records.bin') +# frames +fr2={'h':fr['h'],'frames':dict(FR)} +for fid,ff in newframes.items(): fr2['frames'][str(fid)]=ff +json.dump(fr2,open(OUT+'/frames.json','w')) +with open(OUT+'/frames.txt','w') as fo: + fo.write('%d\n'%len(fr2['frames'])) + for k_,ff in fr2['frames'].items(): + fo.write('%s %d\n'%(k_,len(ff['B']))) + for row in ff['B']: fo.write(' '.join(map(str,row))+'\n') +with open(OUT+'/states.txt','w') as fo: + fo.write('%d %d %d %d\n'%(n,v,ZERO,FULL)) + for r in range(n): fo.write('%d %d\n'%(int(newinit[str(r)]),int(s['final'][str(r)]))) + for t in range(v): fo.write(' '.join(map(str,s['source_covectors'][t]))+'\n') +pickle.dump(dict(todo=todo,unused=sorted(unused),newframes=list(newframes)),open(OUT+'/plan.pkl','wb')) +print('done') diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/decomp.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/decomp.py new file mode 100644 index 0000000000..365e5bf2a8 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/decomp.py @@ -0,0 +1,6 @@ +import json +import os +lab=[tuple(l) for l in json.load(open(os.environ.get('W3LABELS','labels.json')))['lab']] +idx={l:i for i,l in enumerate(lab)} +def comps(*a): raise NotImplementedError +def name(*a): raise NotImplementedError diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/gather.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/gather.py new file mode 100644 index 0000000000..ef063373c2 --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/gather.py @@ -0,0 +1,58 @@ +# Gather per-cube structural info for the cube-layer redesign. +import os +import json, collections, sys, math, pickle +import numpy as np +sys.path.insert(0,''+os.environ.get('W3WORK','work')+'/eval'); sys.path.insert(0,''+os.environ.get('W3WORK','work')+'/agentA') +from cost import load_snapshot +from decomp import lab, idx +s,fr,dim,rec=load_snapshot(''+os.environ.get('W3WORK','work')+'/snap') +v=s['v'];n=s['n']; R=n+1 +F=fr['frames'] +P=lambda p:p//2 +cube_of=[tuple(sorted(P(p) for p in lab[i])) for i in range(v)] +bits=lambda i: tuple(p%2 for p in lab[i]) +part=pickle.load(open(''+os.environ.get('W3WORK','work')+'/agentA/interface.pkl','rb')) +init={r:s['initial'][str(r)] for r in range(n)} +ZERO=s['ZERO']; FULL=s['FULL'] +HH=20 +chi=np.zeros((v,HH),dtype=np.int64) +for i in range(v): + for p in lab[i]: chi[i,p]=1 +icache={} +def items_in(fid): + if fid in icache: return icache[fid] + if dim[fid]==0 or dim[fid]>3: icache[fid]=None; return None + A=np.array(F[str(fid)]['A'],dtype=np.int64) + I=frozenset(np.nonzero(np.all(chi@A.T==0,axis=1))[0].tolist()); icache[fid]=I if I else None; return icache[fid] +cubes=collections.defaultdict(set) +for r,d in part.items(): cubes[d['cube']].add(r) +# classify participants +info={} +cnt=collections.Counter() +for cube,regs in cubes.items(): + items=sorted(i for i in range(v) if cube_of[i]==cube) + byb={bits(i):i for i in items} + C=dict(items=items,byb=byb,BH={},single={},carrier=[],death=[],upper=[],other=[],X={}) + for r in regs: + d=part[r]; e=d['exit'] + if r3: icache[fid]=None; return None + A=np.array(F[str(fid)]['A'],dtype=np.int64) + I=frozenset(np.nonzero(np.all(chi@A.T==0,axis=1))[0].tolist()) + icache[fid]=I if I else None + return icache[fid] +def cubeframe(fid): + I=items_in(fid) + if not I: return None + cs={cube_of[i] for i in I} + return next(iter(cs)) if len(cs)==1 else None +init={r:s['initial'][str(r)] for r in range(n)} +fin={r:s['final'][str(r)] for r in range(n)} +# simulate contents; track per register its frame and content at each move +Wd=(v+63)//64 +val=np.zeros((R,Wd),np.uint64) +for i in range(v): val[i,i//64]|=np.uint64(1)< dict(cube, entry_frame, entry_from_zero, frames list, exit (frame,dim,k), exit_content) +for r in range(n): + c=cubeframe(init[r]) + if c is not None: part[r]=dict(cube=c,entry=init[r],fromzero=False,frames=[init[r]],exit=None,firstk=0) +for k in range(len(rec)): + o,a,b,c,f,z=map(int,rec[k]) + if o==0: + r=a; newf=c + cq=cubeframe(newf) + if r in part and part[r]['exit'] is None: + if cq==part[r]['cube']: + part[r]['frames'].append(newf) + else: + part[r]['exit']=(newf,dim[newf],k); part[r]['exit_content']=its(r) + elif r not in part and cq is not None and dim[cur[r]]==0: + part[r]=dict(cube=cq,entry=newf,fromzero=True,frames=[newf],exit=None,firstk=k) + cur[r]=newf + elif o==1: + if c&1: val[a]^=val[b] + elif o==2: val[n]=val[a] + elif o==3: val[n]=0 +pickle.dump(part,open(''+os.environ.get('W3WORK','work')+'/agentA/interface.pkl','wb')) +stat=collections.Counter() +for r,d in part.items(): + kind='X' if r4')]+=1 +for k,c in sorted(stat.items(), key=lambda x:-x[1])[:40]: print(c,k) diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/twin.py b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/twin.py new file mode 100644 index 0000000000..6ec783fd2b --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/builders/twin.py @@ -0,0 +1,160 @@ +# Twin condensation of M-type plane leftovers on top of a Design-T word. +# For each plane where BH and LO are both M-starters (0->M->P) and LO goes P->FULL after BH += LO: +# LO (pivot) enters at the common line E = M_bh ∩ M_lo (sigma=1); BH visits E first and absorbs LO there; +# the absorption is inverted at FULL at the very end. LO's dirt then cancels (it enters BH twice). +import sys, json, collections, pickle, math, os +import numpy as np +from fractions import Fraction +sys.path.insert(0,''+os.environ.get('W3WORK','work')+'/eval'); sys.path.insert(0,''+os.environ.get('W3WORK','work')+'/agentA') +from cost import load_snapshot +from decomp import lab +HH=20 +IN=sys.argv[1]; OUT=sys.argv[2] +os.makedirs(OUT,exist_ok=True) +s,fr,dim,rec=load_snapshot(IN) +v=s['v']; n=s['n']; ZERO=s['ZERO']; FULL=s['FULL'] +FR=fr['frames'] +init={r:s['initial'][str(r)] for r in range(n)} +NR=len(rec) +moves=collections.defaultdict(list) +for k in np.nonzero(rec[:,0]==0)[0]: moves[int(rec[k,1])].append(int(k)) +adds_dst=collections.defaultdict(list); adds_src=collections.defaultdict(list) +for k in np.nonzero(rec[:,0]==1)[0]: + adds_dst[int(rec[k,1])].append(int(k)); adds_src[int(rec[k,2])].append(int(k)) +def chain(r): return [init[r]]+[int(rec[k,3]) for k in moves[r]] +chi=np.zeros((v,HH),dtype=np.int64) +for i in range(v): + for p in lab[i]: chi[i,p]=1 +G=None +def gnorm(w): + s1=sum(x*x for x in w); s2=sum(w) + return Fraction(s1)-Fraction(s2*s2,9) +def kernel_int(Bm): + M=[[Fraction(x) for x in b] for b in Bm]; m=len(M); piv=[]; r=0 + for c in range(HH): + pr=next((i for i in range(r,m) if M[i][c]!=0),None) + if pr is None: continue + M[r],M[pr]=M[pr],M[r]; pv=M[r][c]; M[r]=[x/pv for x in M[r]] + for i in range(m): + if i!=r and M[i][c]!=0: + f_=M[i][c]; M[i]=[a-f_*b for a,b in zip(M[i],M[r])] + piv.append(c); r+=1 + if r==m: break + out=[] + for fc in [c for c in range(HH) if c not in piv]: + x=[Fraction(0)]*HH; x[fc]=Fraction(1) + for i,pc in enumerate(piv): x[pc]=-M[i][fc] + den=1 + for q in x: den=den*q.denominator//math.gcd(den,q.denominator) + out.append([int(q*den) for q in x]) + return out +def intersect_line(a1,a2,b1,b2): + # solve al*chi[a1]+be*chi[a2]-ga*chi[b1]-de*chi[b2]=0 + Mx=np.stack([chi[a1],chi[a2],-chi[b1],-chi[b2]],axis=1).astype(object) + # nullspace over Q + M=[[Fraction(int(x)) for x in row] for row in Mx] + rows=len(M); cols=4; piv=[]; r=0 + for c in range(cols): + pr=next((i for i in range(r,rows) if M[i][c]!=0),None) + if pr is None: continue + M[r],M[pr]=M[pr],M[r]; pv=M[r][c]; M[r]=[x/pv for x in M[r]] + for i in range(rows): + if i!=r and M[i][c]!=0: + f_=M[i][c]; M[i]=[a-f_*b for a,b in zip(M[i],M[r])] + piv.append(c); r+=1 + free=[c for c in range(cols) if c not in piv] + if len(free)!=1: return None + fc=free[0]; x=[Fraction(0)]*cols; x[fc]=Fraction(1) + for i,pc in enumerate(piv): x[pc]=-M[i][fc] + w=[x[0]*int(chi[a1,j])+x[1]*int(chi[a2,j]) for j in range(HH)] + den=1 + for q in w: den=den*q.denominator//math.gcd(den,q.denominator) + wi=[int(q*den) for q in w] + gg=0 + for q in wi: gg=math.gcd(gg,abs(q)) + wi=[q//gg for q in wi] + return wi +# detect eligible planes +elig=[] +for k in np.nonzero((rec[:,0]==1)&(rec[:,5]==40))[0]: + a,b,f=int(rec[k,1]),int(rec[k,2]),int(rec[k,4]) + if dim[f]!=3 or a<2*v or b<2*v or a>=n or b>=n: continue + ca,cb=chain(a),chain(b) + if len(ca)<3 or len(cb)!=4: continue + if not (ca[0]==ZERO and dim[ca[1]]==2 and ca[2]==f): continue + if not (cb[0]==ZERO and dim[cb[1]]==2 and cb[2]==f and cb[3]==FULL): continue + if ca[1]==cb[1]: continue + xa=[int(rec[kk,2]) for kk in adds_dst[a] if int(rec[kk,4])==ca[1]] + xb=[int(rec[kk,2]) for kk in adds_dst[b] if int(rec[kk,4])==cb[1]] + if len(xa)!=2 or len(xb)!=2 or max(xa+xb)>=v: continue + # LO consumers: only BH at P (forward); BH must not be read before this merge + lo_src=[kk for kk in adds_src[b] if 0',len(out)) diff --git a/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/columns_h.cpp b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/columns_h.cpp new file mode 100644 index 0000000000..07b7fd220c --- /dev/null +++ b/research/e8-retimed-nine-composition/source377/work/native358/vendor/complex-reserve/upstream/pr352/code/checkers/columns_h.cpp @@ -0,0 +1,42 @@ +#include "json.hpp" +#include +#include +using boost::multiprecision::cpp_int; +#include +#include +#include +#include +#include +#include +#include +using J=nlohmann::json; +struct E{int kind,dst,src,c;}; +void need(bool x,const char*s){if(!x)throw std::runtime_error(s);} +int main(int argc,char**argv){try{ +need(argc==3,"usage RAW6_RECORDS OUTPUT");std::string pre=argv[1];int v=VPORTS,r=RHELP,loc=2*v+r,global=4*v+r,temp=global; +struct Raw{int op,a,b,c,f,z;};std::ifstream f(pre,std::ios::binary|std::ios::ate);size_t sz=f.tellg();need(sz%sizeof(Raw)==0,"stream alignment");std::vectorp(sz/sizeof(Raw));f.seekg(0);f.read((char*)p.data(),sz);std::vectore;std::mapH;for(auto q:p){if(q.op==0){if(q.f)H[q.f]++;}else if(q.op==1)e.push_back({0,q.a,q.b,q.c});else if(q.op==2){H[q.z]++;e.push_back({1,loc,q.a,0});}else if(q.op==3)e.push_back({2,loc,q.a,0});else need(false,"opcode");} +J prefix=J::array();cpp_int largestF=0,largestB=0;for(int rev=0;rev<2;rev++){std::vectornorms(loc+1,1);cpp_int maxrow=1;bool isopen=false;for(size_t z=0;zmaxrow)maxrow=norms[q.dst];}else if(k==1){need(!isopen,"boundcopy");norms[loc]=norms[q.src];isopen=true;}else {need(isopen,"bounderase");norms[loc]=0;isopen=false;}}need(!isopen,"prefix copy closure");if(rev)largestB=maxrow;else largestF=maxrow;prefix.push_back({{"reverse",bool(rev)},{"cancellation_free_signed_row_l1_upper",maxrow.convert_to()},{"bits",boost::multiprecision::msb(maxrow)+1}});} +cpp_int payload=64*largestF*largestF*largestF*largestB*largestB;need(payload<(cpp_int(1)<<104),"payloadfiniteprefix2^104"); +long long copies=0,adds=0,odd=0;bool open=false;int center=-1;long long reverseCopies=0; +for(auto q:e){need(q.kind>=0&&q.kind<=2,"kind");need(q.dst>=0&&q.dst<=loc,"local dst");if(q.kind==0){need(q.src>=0&&q.src<=loc&&q.dst!=q.src,"source distinct");need(q.dst!=loc,"copy immutable");need(q.src!=loc||open,"temp not open");if(open)need(q.dst!=center,"source changes inside copied-center block");adds++;odd+=q.c&1;} +else if(q.kind==1){need(!open&&q.dst==loc&&q.src>=0&&q.srca((size_t)(global+1)*words);auto row=[&](int i){return a.data()+(size_t)i*words;};for(int i=0;i=v&&i<2*v&&w==(size_t)(i-v)/64)want^=1ull<<((i-v)%64);need(x[w]==want,"local defining-decoder full formal column");}}} +if(stage==1||stage==2||stage==4){int b=stage==1?0:stage==2?1:2;for(auto q:bridges[b])for(int i=0;i(std::chrono::steady_clock::now()-t0).count()<<"s\n";} +for(int bank=0;bank<4;bank+=2)for(int i=0;i()},{"payload_prefix_bits",boost::multiprecision::msb(payload)+1},{"new_Q_categories",{28,29}},{"local_raw_H",H},{"negative_controls",controls},{"seconds",std::chrono::duration(std::chrono::steady_clock::now()-t0).count()}};std::ofstream(argv[2])< +// 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