universal-physics-tensor 0.45.2 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -27
- package/dist/atlas/applicability.d.ts +108 -0
- package/dist/atlas/applicability.d.ts.map +1 -0
- package/dist/atlas/applicability.js +301 -0
- package/dist/atlas/applicability.js.map +1 -0
- package/dist/atlas/association.d.ts +92 -0
- package/dist/atlas/association.d.ts.map +1 -0
- package/dist/atlas/association.js +112 -0
- package/dist/atlas/association.js.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts +47 -0
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -0
- package/dist/atlas/benchmark/backend-shapes.js +58 -0
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -0
- package/dist/atlas/benchmark/baselines.d.ts +64 -0
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -0
- package/dist/atlas/benchmark/baselines.js +112 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -0
- package/dist/atlas/benchmark/leakage.d.ts +56 -0
- package/dist/atlas/benchmark/leakage.d.ts.map +1 -0
- package/dist/atlas/benchmark/leakage.js +100 -0
- package/dist/atlas/benchmark/leakage.js.map +1 -0
- package/dist/atlas/benchmark/loader.d.ts +56 -0
- package/dist/atlas/benchmark/loader.d.ts.map +1 -0
- package/dist/atlas/benchmark/loader.js +104 -0
- package/dist/atlas/benchmark/loader.js.map +1 -0
- package/dist/atlas/benchmark/run-atlas.d.ts +72 -0
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -0
- package/dist/atlas/benchmark/run-atlas.js +210 -0
- package/dist/atlas/benchmark/run-atlas.js.map +1 -0
- package/dist/atlas/benchmark/stats.d.ts +90 -0
- package/dist/atlas/benchmark/stats.d.ts.map +1 -0
- package/dist/atlas/benchmark/stats.js +159 -0
- package/dist/atlas/benchmark/stats.js.map +1 -0
- package/dist/atlas/benchmark/study.d.ts +120 -0
- package/dist/atlas/benchmark/study.d.ts.map +1 -0
- package/dist/atlas/benchmark/study.js +192 -0
- package/dist/atlas/benchmark/study.js.map +1 -0
- package/dist/atlas/benchmark/types.d.ts +79 -0
- package/dist/atlas/benchmark/types.d.ts.map +1 -0
- package/dist/atlas/benchmark/types.js +46 -0
- package/dist/atlas/benchmark/types.js.map +1 -0
- package/dist/atlas/composition-table.d.ts +55 -0
- package/dist/atlas/composition-table.d.ts.map +1 -0
- package/dist/atlas/composition-table.js +133 -0
- package/dist/atlas/composition-table.js.map +1 -0
- package/dist/atlas/conventions.d.ts +63 -0
- package/dist/atlas/conventions.d.ts.map +1 -0
- package/dist/atlas/conventions.js +93 -0
- package/dist/atlas/conventions.js.map +1 -0
- package/dist/atlas/coverage.d.ts +93 -0
- package/dist/atlas/coverage.d.ts.map +1 -0
- package/dist/atlas/coverage.js +69 -0
- package/dist/atlas/coverage.js.map +1 -0
- package/dist/atlas/derivation.d.ts +137 -0
- package/dist/atlas/derivation.d.ts.map +1 -0
- package/dist/atlas/derivation.js +190 -0
- package/dist/atlas/derivation.js.map +1 -0
- package/dist/atlas/derive-evidence.d.ts +218 -0
- package/dist/atlas/derive-evidence.d.ts.map +1 -0
- package/dist/atlas/derive-evidence.js +225 -0
- package/dist/atlas/derive-evidence.js.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts +63 -0
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges-closure.js +324 -0
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -0
- package/dist/atlas/diffusion/bridges.d.ts +36 -0
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -0
- package/dist/atlas/diffusion/bridges.js +226 -0
- package/dist/atlas/diffusion/bridges.js.map +1 -0
- package/dist/atlas/diffusion/dimensions.d.ts +21 -0
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -0
- package/dist/atlas/diffusion/dimensions.js +21 -0
- package/dist/atlas/diffusion/dimensions.js.map +1 -0
- package/dist/atlas/diffusion/index.d.ts +16 -0
- package/dist/atlas/diffusion/index.d.ts.map +1 -0
- package/dist/atlas/diffusion/index.js +23 -0
- package/dist/atlas/diffusion/index.js.map +1 -0
- package/dist/atlas/diffusion/models.d.ts +24 -0
- package/dist/atlas/diffusion/models.d.ts.map +1 -0
- package/dist/atlas/diffusion/models.js +139 -0
- package/dist/atlas/diffusion/models.js.map +1 -0
- package/dist/atlas/diffusion/numerics.d.ts +181 -0
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -0
- package/dist/atlas/diffusion/numerics.js +251 -0
- package/dist/atlas/diffusion/numerics.js.map +1 -0
- package/dist/atlas/error-algebra.d.ts +52 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -0
- package/dist/atlas/error-algebra.js +55 -0
- package/dist/atlas/error-algebra.js.map +1 -0
- package/dist/atlas/export.d.ts +48 -0
- package/dist/atlas/export.d.ts.map +1 -0
- package/dist/atlas/export.js +106 -0
- package/dist/atlas/export.js.map +1 -0
- package/dist/atlas/families.d.ts +14 -0
- package/dist/atlas/families.d.ts.map +1 -0
- package/dist/atlas/families.js +20 -0
- package/dist/atlas/families.js.map +1 -0
- package/dist/atlas/index.d.ts +90 -0
- package/dist/atlas/index.d.ts.map +1 -0
- package/dist/atlas/index.js +69 -0
- package/dist/atlas/index.js.map +1 -0
- package/dist/atlas/link-prediction.d.ts +71 -0
- package/dist/atlas/link-prediction.d.ts.map +1 -0
- package/dist/atlas/link-prediction.js +128 -0
- package/dist/atlas/link-prediction.js.map +1 -0
- package/dist/atlas/model.d.ts +70 -0
- package/dist/atlas/model.d.ts.map +1 -0
- package/dist/atlas/model.js +26 -0
- package/dist/atlas/model.js.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts +71 -0
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-coarse.js +146 -0
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts +70 -0
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-exact.js +227 -0
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts +118 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -0
- package/dist/atlas/oscillators/bridges-limits.js +342 -0
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -0
- package/dist/atlas/oscillators/dimensions.d.ts +34 -0
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -0
- package/dist/atlas/oscillators/dimensions.js +34 -0
- package/dist/atlas/oscillators/dimensions.js.map +1 -0
- package/dist/atlas/oscillators/index.d.ts +38 -0
- package/dist/atlas/oscillators/index.d.ts.map +1 -0
- package/dist/atlas/oscillators/index.js +37 -0
- package/dist/atlas/oscillators/index.js.map +1 -0
- package/dist/atlas/oscillators/models.d.ts +25 -0
- package/dist/atlas/oscillators/models.d.ts.map +1 -0
- package/dist/atlas/oscillators/models.js +160 -0
- package/dist/atlas/oscillators/models.js.map +1 -0
- package/dist/atlas/oscillators/rejections.d.ts +21 -0
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -0
- package/dist/atlas/oscillators/rejections.js +54 -0
- package/dist/atlas/oscillators/rejections.js.map +1 -0
- package/dist/atlas/path-bound.d.ts +143 -0
- package/dist/atlas/path-bound.d.ts.map +1 -0
- package/dist/atlas/path-bound.js +268 -0
- package/dist/atlas/path-bound.js.map +1 -0
- package/dist/atlas/poster/associations.d.ts +66 -0
- package/dist/atlas/poster/associations.d.ts.map +1 -0
- package/dist/atlas/poster/associations.js +90 -0
- package/dist/atlas/poster/associations.js.map +1 -0
- package/dist/atlas/poster/derivations.d.ts +156 -0
- package/dist/atlas/poster/derivations.d.ts.map +1 -0
- package/dist/atlas/poster/derivations.js +430 -0
- package/dist/atlas/poster/derivations.js.map +1 -0
- package/dist/atlas/poster/statements.d.ts +198 -0
- package/dist/atlas/poster/statements.d.ts.map +1 -0
- package/dist/atlas/poster/statements.js +365 -0
- package/dist/atlas/poster/statements.js.map +1 -0
- package/dist/atlas/public.d.ts +26 -0
- package/dist/atlas/public.d.ts.map +1 -0
- package/dist/atlas/public.js +21 -0
- package/dist/atlas/public.js.map +1 -0
- package/dist/atlas/regime.d.ts +171 -0
- package/dist/atlas/regime.d.ts.map +1 -0
- package/dist/atlas/regime.js +309 -0
- package/dist/atlas/regime.js.map +1 -0
- package/dist/atlas/serialize.d.ts +50 -0
- package/dist/atlas/serialize.d.ts.map +1 -0
- package/dist/atlas/serialize.js +180 -0
- package/dist/atlas/serialize.js.map +1 -0
- package/dist/atlas/statement.d.ts +165 -0
- package/dist/atlas/statement.d.ts.map +1 -0
- package/dist/atlas/statement.js +176 -0
- package/dist/atlas/statement.js.map +1 -0
- package/dist/atlas/types.d.ts +308 -0
- package/dist/atlas/types.d.ts.map +1 -0
- package/dist/atlas/types.js +61 -0
- package/dist/atlas/types.js.map +1 -0
- package/dist/atlas/waves/bridges-closure.d.ts +39 -0
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -0
- package/dist/atlas/waves/bridges-closure.js +223 -0
- package/dist/atlas/waves/bridges-closure.js.map +1 -0
- package/dist/atlas/waves/bridges.d.ts +49 -0
- package/dist/atlas/waves/bridges.d.ts.map +1 -0
- package/dist/atlas/waves/bridges.js +265 -0
- package/dist/atlas/waves/bridges.js.map +1 -0
- package/dist/atlas/waves/index.d.ts +16 -0
- package/dist/atlas/waves/index.d.ts.map +1 -0
- package/dist/atlas/waves/index.js +23 -0
- package/dist/atlas/waves/index.js.map +1 -0
- package/dist/atlas/waves/models.d.ts +29 -0
- package/dist/atlas/waves/models.d.ts.map +1 -0
- package/dist/atlas/waves/models.js +127 -0
- package/dist/atlas/waves/models.js.map +1 -0
- package/dist/atlas/waves/numerics.d.ts +149 -0
- package/dist/atlas/waves/numerics.d.ts.map +1 -0
- package/dist/atlas/waves/numerics.js +218 -0
- package/dist/atlas/waves/numerics.js.map +1 -0
- package/dist/atlas/witness-artifact.d.ts +65 -0
- package/dist/atlas/witness-artifact.d.ts.map +1 -0
- package/dist/atlas/witness-artifact.js +78 -0
- package/dist/atlas/witness-artifact.js.map +1 -0
- package/dist/atlas/witness-numeric.d.ts +81 -0
- package/dist/atlas/witness-numeric.d.ts.map +1 -0
- package/dist/atlas/witness-numeric.js +105 -0
- package/dist/atlas/witness-numeric.js.map +1 -0
- package/dist/atlas/witness-result.d.ts +77 -0
- package/dist/atlas/witness-result.d.ts.map +1 -0
- package/dist/atlas/witness-result.js +39 -0
- package/dist/atlas/witness-result.js.map +1 -0
- package/dist/atlas/witness-specs.d.ts +110 -0
- package/dist/atlas/witness-specs.d.ts.map +1 -0
- package/dist/atlas/witness-specs.js +372 -0
- package/dist/atlas/witness-specs.js.map +1 -0
- package/dist/atlas/witness-symbolic.d.ts +79 -0
- package/dist/atlas/witness-symbolic.d.ts.map +1 -0
- package/dist/atlas/witness-symbolic.js +140 -0
- package/dist/atlas/witness-symbolic.js.map +1 -0
- package/dist/atlas/witnesses/quantum-support.d.ts +50 -0
- package/dist/atlas/witnesses/quantum-support.d.ts.map +1 -0
- package/dist/atlas/witnesses/quantum-support.js +48 -0
- package/dist/atlas/witnesses/quantum-support.js.map +1 -0
- package/dist/bridges/be11-decoherence-confrontation.js.map +1 -1
- package/dist/bridges/be21-kss-confrontation.js.map +1 -1
- package/dist/bridges/be23-planckian-confrontation.js.map +1 -1
- package/dist/bridges/be35-bootstrap-confrontation.js.map +1 -1
- package/dist/bridges/be36-gw170817-confrontation.js.map +1 -1
- package/dist/bridges/be37-cassini-confrontation.js.map +1 -1
- package/dist/bridges/be48-collapse-confrontation.js.map +1 -1
- package/dist/bridges/be51-lensing-confrontation.js.map +1 -1
- package/dist/bridges/be52-mercury-confrontation.js.map +1 -1
- package/dist/bridges/be55-quantum-hall-confrontation.js.map +1 -1
- package/dist/bridges/be56-casimir-confrontation.js.map +1 -1
- package/dist/bridges/be58-johnson-nyquist-confrontation.js.map +1 -1
- package/dist/bridges/be59-ac-josephson-confrontation.js.map +1 -1
- package/dist/bridges/be60-fractional-qh-confrontation.js.map +1 -1
- package/dist/bridges/be61-wiedemann-franz-confrontation.js.map +1 -1
- package/dist/bridges/be62-bcs-gap-confrontation.js.map +1 -1
- package/dist/bridges/be63-chandrasekhar-mass-confrontation.js.map +1 -1
- package/dist/bridges/be64-eddington-luminosity-confrontation.js.map +1 -1
- package/dist/bridges/be65-jeans-mass-confrontation.js.map +1 -1
- package/dist/bridges/bridge-equations.d.ts +2 -1
- package/dist/bridges/bridge-equations.d.ts.map +1 -1
- package/dist/bridges/bridge-equations.js +3 -2
- package/dist/bridges/bridge-equations.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/equations/_be-helpers.d.ts +2 -2
- package/dist/bridges/equations/_be-helpers.js +2 -2
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +88 -58
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.js +102 -62
- package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts +9 -8
- package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.js +9 -8
- package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +10 -0
- package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
- package/dist/bridges/gravitational-lensing.js.map +1 -1
- package/dist/bridges/index.d.ts +125 -7
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +483 -20
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +10 -0
- package/dist/bridges/perihelion-precession.d.ts.map +1 -1
- package/dist/bridges/perihelion-precession.js.map +1 -1
- package/dist/bridges/rhs-registry.js +2 -2
- package/dist/canonical/canonical-equation.d.ts +15 -0
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/entries/_l1-build.d.ts +1 -1
- package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +23 -0
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +93 -0
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/residual.d.ts +28 -0
- package/dist/canonical/residual.d.ts.map +1 -0
- package/dist/canonical/residual.js +31 -0
- package/dist/canonical/residual.js.map +1 -0
- package/dist/cli/command.d.ts +8 -0
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js +10 -0
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts +3 -0
- package/dist/cli/commands/atlas.d.ts.map +1 -0
- package/dist/cli/commands/atlas.js +158 -0
- package/dist/cli/commands/atlas.js.map +1 -0
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/coverage.js +3 -3
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +3 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +161 -27
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/path.d.ts +3 -0
- package/dist/cli/commands/path.d.ts.map +1 -0
- package/dist/cli/commands/path.js +145 -0
- package/dist/cli/commands/path.js.map +1 -0
- package/dist/cli/commands/recover.d.ts.map +1 -1
- package/dist/cli/commands/recover.js +25 -6
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +14 -0
- package/dist/cli/commands/regime.d.ts.map +1 -0
- package/dist/cli/commands/regime.js +189 -0
- package/dist/cli/commands/regime.js.map +1 -0
- package/dist/cli/errors.d.ts.map +1 -1
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +5 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +22 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output.d.ts +6 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +16 -0
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +18 -0
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +0 -0
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +2 -2
- package/dist/composition/canonical-graph.js +2 -2
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +80 -1
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +64 -0
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +29 -0
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +46 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
- package/dist/composition/edges/catalog-quantum.js +9 -0
- package/dist/composition/edges/catalog-quantum.js.map +1 -1
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
- package/dist/composition/edges/catalog-tranche.js +18 -0
- package/dist/composition/edges/catalog-tranche.js.map +1 -1
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +13 -0
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +25 -0
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz.d.ts +118 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +189 -6
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +4 -2
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +2 -1
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/poster-source.d.ts +153 -0
- package/dist/composition/poster-source.d.ts.map +1 -0
- package/dist/composition/poster-source.js +183 -0
- package/dist/composition/poster-source.js.map +1 -0
- package/dist/composition/probe/backend-protocol.d.ts +34 -1
- package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
- package/dist/composition/probe/backend-protocol.js +9 -2
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.d.ts.map +1 -1
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +2 -2
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +1 -1
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.d.ts +52 -2
- package/dist/composition/uncertainty.d.ts.map +1 -1
- package/dist/composition/uncertainty.js +38 -2
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/core/flux-rules.d.ts.map +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/dimensional/ast-types.d.ts +31 -1
- package/dist/dimensional/ast-types.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.d.ts +1 -1
- package/dist/dimensional/bridge-check.js +1 -1
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/connection.d.ts +2 -0
- package/dist/dimensional/connection.d.ts.map +1 -1
- package/dist/dimensional/connection.js +2 -0
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +5 -3
- package/dist/dimensional/curvature-composite.d.ts.map +1 -1
- package/dist/dimensional/curvature-composite.js +1 -0
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.d.ts +2 -0
- package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
- package/dist/dimensional/curvature-invariants.js +2 -0
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/einstein-equation.d.ts +3 -3
- package/dist/dimensional/einstein-equation.js +3 -3
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/metric.d.ts +5 -2
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +5 -2
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +3 -2
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +23 -4
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +104 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +51 -24
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +3 -3
- package/dist/numerical/gl4-integrator.js +3 -3
- package/dist/numerical/killing.d.ts +47 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js +41 -3
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.d.ts +2 -2
- package/dist/numerical/klein-gordon.js +2 -2
- package/dist/numerical/lowering.d.ts +2 -2
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +5 -3
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +15 -13
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +15 -13
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.js +90 -40
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/package.json +121 -104
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 4, S4.5 — the numerics behind the wave family's witnesses.
|
|
3
|
+
*
|
|
4
|
+
* Each function evaluates one claim at a RESOLUTION, so the numeric witness
|
|
5
|
+
* runner can record how the error shrinks under refinement. No function
|
|
6
|
+
* asserts an order; the runner reports the ratio (Phase 4 design note §2.3).
|
|
7
|
+
*
|
|
8
|
+
* @module atlas/waves/numerics
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* WS1 — the displacement at the midpoint `x = ½, t = tEnd` of a string of unit
|
|
12
|
+
* length with fixed ends, from a leapfrog solution of `μ y_tt = F y_xx` written
|
|
13
|
+
* in the string's OWN variables, starting from `y = sin(πx)` at rest.
|
|
14
|
+
*
|
|
15
|
+
* The comparison target, `sin(πx) cos(π c t)` with `c = √(F/μ)`, is the 1-D
|
|
16
|
+
* wave equation's solution, so the pair tests the restriction's dictionary.
|
|
17
|
+
* The Courant number `cΔt/Δx` is held at 1/2.
|
|
18
|
+
*
|
|
19
|
+
* @param cells - spatial intervals (made even so the midpoint is a node).
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export function stringLeapfrogMidpoint(cells, f) {
|
|
23
|
+
const nx = 2 * Math.ceil(cells / 2);
|
|
24
|
+
const dx = 1 / nx;
|
|
25
|
+
// Courant 1/2 from the string's own coefficients: Δt = ½ Δx √(μ/F).
|
|
26
|
+
const dtMax = 0.5 * dx * Math.sqrt(f.mu / f.tension);
|
|
27
|
+
const steps = Math.ceil(f.tEnd / dtMax);
|
|
28
|
+
const dt = f.tEnd / steps;
|
|
29
|
+
const r2 = (f.tension * dt * dt) / (f.mu * dx * dx);
|
|
30
|
+
let prev = new Float64Array(nx + 1);
|
|
31
|
+
let cur = new Float64Array(nx + 1);
|
|
32
|
+
let next = new Float64Array(nx + 1);
|
|
33
|
+
for (let i = 0; i <= nx; i++)
|
|
34
|
+
prev[i] = Math.sin(Math.PI * i * dx);
|
|
35
|
+
// First step from rest: y¹ = y⁰ + ½ r² δ²y⁰ (second-order start).
|
|
36
|
+
for (let i = 1; i < nx; i++) {
|
|
37
|
+
cur[i] = prev[i] + 0.5 * r2 * (prev[i + 1] - 2 * prev[i] + prev[i - 1]);
|
|
38
|
+
}
|
|
39
|
+
for (let n = 1; n < steps; n++) {
|
|
40
|
+
for (let i = 1; i < nx; i++) {
|
|
41
|
+
next[i] = 2 * cur[i] - prev[i] + r2 * (cur[i + 1] - 2 * cur[i] + cur[i - 1]);
|
|
42
|
+
}
|
|
43
|
+
[prev, cur, next] = [cur, next, prev];
|
|
44
|
+
}
|
|
45
|
+
return cur[nx / 2];
|
|
46
|
+
}
|
|
47
|
+
/** The two profiles of WS2: deliberately different, so neither direction is trivial. */
|
|
48
|
+
const profileRight = (s) => Math.exp(-s * s);
|
|
49
|
+
const profileLeft = (s) => 0.5 * Math.exp(-((s - 1) * (s - 1)) / 0.5);
|
|
50
|
+
/**
|
|
51
|
+
* The d'Alembert form `u = f(x − ct) + g(x + ct)` with the WS2 profiles.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export function dalembert(x, t, c) {
|
|
56
|
+
return profileRight(x - c * t) + profileLeft(x + c * t);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* WS2 — the finite-difference residual `|u_tt − c² u_xx|` of the d'Alembert
|
|
60
|
+
* form at one point, step `h = h0/resolution` in both variables. Exactly zero
|
|
61
|
+
* in the limit; the runner records how fast the estimate gets there.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export function dalembertResidual(resolution, f) {
|
|
66
|
+
const h = f.h0 / resolution;
|
|
67
|
+
const u = (x, t) => dalembert(x, t, f.c);
|
|
68
|
+
const utt = (u(f.x, f.t + h) - 2 * u(f.x, f.t) + u(f.x, f.t - h)) / (h * h);
|
|
69
|
+
const uxx = (u(f.x + h, f.t) - 2 * u(f.x, f.t) + u(f.x - h, f.t)) / (h * h);
|
|
70
|
+
return Math.abs(utt - f.c * f.c * uxx);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The adiabatic equation of state `p(ρ) = p₀ (ρ/ρ₀)^γ` — the SECOND premise of
|
|
74
|
+
* the sound-speed hyperedge — and its derivative at `ρ`.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
export function adiabaticSlope(rho, f) {
|
|
79
|
+
return (f.gamma * f.p0 * Math.pow(rho / f.rho0, f.gamma - 1)) / f.rho0;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* WS3 — the pressure perturbation at `x = ¼, t = tEnd` from a staggered
|
|
83
|
+
* leapfrog solution of the LINEARIZED EULER equations
|
|
84
|
+
* `∂ρ′/∂t = −ρ₀ ∂v/∂x`, `ρ₀ ∂v/∂t = −∂p′/∂x`, closed by the ADIABATIC EOS
|
|
85
|
+
* `p′ = (dp/dρ)|ρ₀ ρ′`, on a periodic unit domain from `p′ = sin 2πx` at rest.
|
|
86
|
+
*
|
|
87
|
+
* Both premises enter in their own form: the Euler pair steps `ρ′` and `v`,
|
|
88
|
+
* and the only link from `ρ′` to `p′` is {@link adiabaticSlope}. The
|
|
89
|
+
* comparison target `sin(2πx) cos(2π c t)` with `c² = γ p₀/ρ₀` is the SOUND
|
|
90
|
+
* model's solution, so the pair tests the hyperedge's derivation.
|
|
91
|
+
*
|
|
92
|
+
* @param cells - grid intervals (made a multiple of 4 so `x = ¼` is a node).
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
export function acousticLeapfrogQuarter(cells, f) {
|
|
96
|
+
const nx = 4 * Math.ceil(cells / 4);
|
|
97
|
+
const dx = 1 / nx;
|
|
98
|
+
const slope = adiabaticSlope(f.rho0, f);
|
|
99
|
+
const cMax = Math.sqrt(slope);
|
|
100
|
+
const dtMax = (0.5 * dx) / cMax;
|
|
101
|
+
const steps = Math.ceil(f.tEnd / dtMax);
|
|
102
|
+
const dt = f.tEnd / steps;
|
|
103
|
+
// ρ′ at nodes i·Δx; v at half-nodes (i + ½)Δx, periodic.
|
|
104
|
+
const rho = new Float64Array(nx);
|
|
105
|
+
const v = new Float64Array(nx);
|
|
106
|
+
for (let i = 0; i < nx; i++)
|
|
107
|
+
rho[i] = Math.sin(2 * Math.PI * i * dx) / slope;
|
|
108
|
+
const pressure = (i) => slope * rho[(i + nx) % nx];
|
|
109
|
+
// Half step from rest: v^{1/2} = −(Δt/2ρ₀) ∂p′/∂x.
|
|
110
|
+
for (let i = 0; i < nx; i++)
|
|
111
|
+
v[i] = (-(0.5 * dt) / f.rho0) * ((pressure(i + 1) - pressure(i)) / dx);
|
|
112
|
+
for (let n = 0; n < steps; n++) {
|
|
113
|
+
for (let i = 0; i < nx; i++) {
|
|
114
|
+
const dv = (v[i] - v[(i - 1 + nx) % nx]) / dx;
|
|
115
|
+
rho[i] = rho[i] - dt * f.rho0 * dv;
|
|
116
|
+
}
|
|
117
|
+
if (n < steps - 1) {
|
|
118
|
+
for (let i = 0; i < nx; i++)
|
|
119
|
+
v[i] = v[i] - (dt / f.rho0) * ((pressure(i + 1) - pressure(i)) / dx);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return pressure(nx / 4);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Speed of sound from the adiabatic (Laplace) and isothermal (Newton) closures.
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
export function soundSpeeds(p0, rho0, gamma) {
|
|
130
|
+
return { adiabatic: Math.sqrt((gamma * p0) / rho0), isothermal: Math.sqrt(p0 / rho0) };
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Relative phase-velocity error of the Klein–Gordon mode against the
|
|
134
|
+
* dispersion-free wave: `√(1 + (ω₀/(c k))²) − 1`.
|
|
135
|
+
*
|
|
136
|
+
* This is the exact quantity the approximation bound of `ab-klein-gordon-wave`
|
|
137
|
+
* is stated in; it is increasing in `ω₀/(c k)`, so its value at the edge of the
|
|
138
|
+
* declared range is the supremum over the range.
|
|
139
|
+
*
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
export function kleinGordonPhaseError(omega0, c, k) {
|
|
143
|
+
const ratio = omega0 / (c * k);
|
|
144
|
+
return Math.sqrt(1 + ratio * ratio) - 1;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* WS4 — the Klein–Gordon phase velocity `√(c² + ω₀²/k²)` at wavenumber
|
|
148
|
+
* `k = k₀ · resolution`. It tends to the wave speed `c` as `k` grows: the
|
|
149
|
+
* dispersion-free limit, approached from above.
|
|
150
|
+
*
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
export function kleinGordonPhaseVelocity(resolution, omega0, c, k0) {
|
|
154
|
+
const k = k0 * resolution;
|
|
155
|
+
return Math.sqrt(c * c + (omega0 * omega0) / (k * k));
|
|
156
|
+
}
|
|
157
|
+
// ── Sprint 4 closure: Klein–Gordon limits, weak damping ────────────────────
|
|
158
|
+
/**
|
|
159
|
+
* The relative error of the non-relativistic kinetic frequency: the
|
|
160
|
+
* Klein–Gordon mode's `ω − ω₀ = ω₀(√(1 + x²) − 1)` against the free
|
|
161
|
+
* Schrödinger particle's `ω₀ x²/2` under `ħ/m ↦ c²/ω₀`, with `x = c k/ω₀`.
|
|
162
|
+
* Equals `|(√(1 + x²) − 1)/(x²/2) − 1|`, increasing in x.
|
|
163
|
+
*
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
export function kgNonrelativisticError(x) {
|
|
167
|
+
if (x === 0)
|
|
168
|
+
return 0;
|
|
169
|
+
return Math.abs((Math.sqrt(1 + x * x) - 1) / ((x * x) / 2) - 1);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* WS6 — `u(tEnd)` of the SPATIALLY UNIFORM Klein–Gordon field on a periodic
|
|
173
|
+
* grid, stepped by leapfrog in the full PDE `u_tt = c² u_xx − ω₀² u` from
|
|
174
|
+
* `u = 1` at rest, with `steps` time steps. The uniform mode's Laplacian
|
|
175
|
+
* vanishes, so the field should follow the oscillator solution `cos(ω₀ t)`.
|
|
176
|
+
*
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
export function kgUniformModeValue(steps, c, omega0, tEnd, cells = 16) {
|
|
180
|
+
const dt = tEnd / steps;
|
|
181
|
+
const dx = 1 / cells;
|
|
182
|
+
let prev = new Float64Array(cells).fill(1);
|
|
183
|
+
let cur = new Float64Array(cells);
|
|
184
|
+
let next = new Float64Array(cells);
|
|
185
|
+
const lap = (a, i) => (a[(i + 1) % cells] - 2 * a[i] + a[(i - 1 + cells) % cells]) / (dx * dx);
|
|
186
|
+
for (let i = 0; i < cells; i++) {
|
|
187
|
+
cur[i] = prev[i] + 0.5 * dt * dt * (c * c * lap(prev, i) - omega0 * omega0 * prev[i]);
|
|
188
|
+
}
|
|
189
|
+
for (let n = 1; n < steps; n++) {
|
|
190
|
+
for (let i = 0; i < cells; i++) {
|
|
191
|
+
next[i] = 2 * cur[i] - prev[i] + dt * dt * (c * c * lap(cur, i) - omega0 * omega0 * cur[i]);
|
|
192
|
+
}
|
|
193
|
+
[prev, cur, next] = [cur, next, prev];
|
|
194
|
+
}
|
|
195
|
+
return cur[0];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Relative phase-velocity error of a stiff string against the flexible string:
|
|
199
|
+
* `√(1 + β) − 1` with `β = EI k²/F`. Increasing in β, so its value at the
|
|
200
|
+
* domain edge is the supremum over the domain.
|
|
201
|
+
*
|
|
202
|
+
* @internal
|
|
203
|
+
*/
|
|
204
|
+
export function stiffStringPhaseError(F, EI, k) {
|
|
205
|
+
return Math.sqrt(1 + (EI * k * k) / F) - 1;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* WS7 — the stiff string's phase velocity `√(F/μ + (EI/μ)k²)` at wavenumber
|
|
209
|
+
* `k = k₀/resolution`: it tends to the flexible-string speed `√(F/μ)` as the
|
|
210
|
+
* wavelength grows.
|
|
211
|
+
*
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
export function stiffStringPhaseVelocity(resolution, F, mu, EI, k0) {
|
|
215
|
+
const k = k0 / resolution;
|
|
216
|
+
return Math.sqrt(F / mu + (EI / mu) * k * k);
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=numerics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numerics.js","sourceRoot":"","sources":["../../../src/atlas/waves/numerics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa,EAAE,CAAgB;IACpE,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAClB,oEAAoE;IACpE,MAAM,KAAK,GAAG,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IACxC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAEpD,IAAI,IAAI,GAAG,IAAI,YAAY,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC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AAG,UAAU,CAAC;IAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 4, S4.3 — the witness-results ARTIFACT: its shape, the run that
|
|
3
|
+
* produces it, and the one reader that turns it into passing witness ids.
|
|
4
|
+
*
|
|
5
|
+
* Design note: `docs/planning/Atlas-Phase-4-Design.md` §3.
|
|
6
|
+
*
|
|
7
|
+
* **The load-bearing invariant: no test writes the artifact.** The Lead runs
|
|
8
|
+
* `scripts/emit-witness-results.mjs`, which calls {@link runWitnessRegistry}
|
|
9
|
+
* and writes `data/atlas/witness-results.json`. `tests/atlas/witness-results.test.ts`
|
|
10
|
+
* deep-equals the committed file against a fresh in-process run — the
|
|
11
|
+
* `atlas-json` pattern. A test that wrote the artifact would certify whatever
|
|
12
|
+
* the last run happened to produce, which is the opposite of a check.
|
|
13
|
+
*
|
|
14
|
+
* **The artifact is deterministic by construction.** `elapsedMs` is dropped:
|
|
15
|
+
* wall-clock time differs on every run, and a pin that deep-equals it could
|
|
16
|
+
* never pass twice. Everything kept is a function of the specs and the peer.
|
|
17
|
+
*
|
|
18
|
+
* @module atlas/witness-artifact
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
import type { Convergence } from './witness-numeric.js';
|
|
22
|
+
import type { UnresolvedReason, WitnessStatus } from './witness-result.js';
|
|
23
|
+
import type { SymbolicSimplifier } from './witness-symbolic.js';
|
|
24
|
+
import type { RegisteredWitness } from './witness-specs.js';
|
|
25
|
+
/** One row of the artifact. @internal */
|
|
26
|
+
export interface WitnessResultRecord {
|
|
27
|
+
readonly recordId: string;
|
|
28
|
+
readonly witnessId: string;
|
|
29
|
+
readonly kind: 'symbolic' | 'numeric';
|
|
30
|
+
readonly status: WitnessStatus;
|
|
31
|
+
/** Present iff `status === 'unresolved'`. */
|
|
32
|
+
readonly reason?: UnresolvedReason;
|
|
33
|
+
readonly detail: string;
|
|
34
|
+
/** Numeric witnesses only, and only when a number was produced. */
|
|
35
|
+
readonly convergence?: Convergence;
|
|
36
|
+
}
|
|
37
|
+
/** The committed artifact, `data/atlas/witness-results.json`. @internal */
|
|
38
|
+
export interface WitnessResultsArtifact {
|
|
39
|
+
readonly schemaVersion: '0';
|
|
40
|
+
readonly results: readonly WitnessResultRecord[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Run every registered witness and assemble the artifact.
|
|
44
|
+
*
|
|
45
|
+
* @param registry - the witnesses to run; defaults to {@link WITNESS_REGISTRY}.
|
|
46
|
+
* @param simplifier - forwarded to `runSymbolicWitness`. Omit it for the real
|
|
47
|
+
* peer (resolved through `isSimplifierAvailable()`); pass `null` to run every
|
|
48
|
+
* symbolic witness as peer-absent.
|
|
49
|
+
* @returns the artifact; never throws, because neither runner does.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export declare function runWitnessRegistry(registry?: readonly RegisteredWitness[], simplifier?: SymbolicSimplifier | null): Promise<WitnessResultsArtifact>;
|
|
53
|
+
/**
|
|
54
|
+
* The ids of witnesses of `recordId` that the artifact records as `'checked'`
|
|
55
|
+
* — the value to pass as `deriveEvidence`'s `passingWitnessIds` for the
|
|
56
|
+
* artifact-governed kinds.
|
|
57
|
+
*
|
|
58
|
+
* Only `'checked'` counts. An `'unresolved'` row (peer absent, timeout, an
|
|
59
|
+
* irreducible difference) is not a pass, and admitting it would hand
|
|
60
|
+
* `symbolically-checked` to a claim nobody examined.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export declare function artifactPassingWitnessIds(artifact: WitnessResultsArtifact, recordId: string): ReadonlySet<string>;
|
|
65
|
+
//# sourceMappingURL=witness-artifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 4, S4.3 — the witness-results ARTIFACT: its shape, the run that
|
|
3
|
+
* produces it, and the one reader that turns it into passing witness ids.
|
|
4
|
+
*
|
|
5
|
+
* Design note: `docs/planning/Atlas-Phase-4-Design.md` §3.
|
|
6
|
+
*
|
|
7
|
+
* **The load-bearing invariant: no test writes the artifact.** The Lead runs
|
|
8
|
+
* `scripts/emit-witness-results.mjs`, which calls {@link runWitnessRegistry}
|
|
9
|
+
* and writes `data/atlas/witness-results.json`. `tests/atlas/witness-results.test.ts`
|
|
10
|
+
* deep-equals the committed file against a fresh in-process run — the
|
|
11
|
+
* `atlas-json` pattern. A test that wrote the artifact would certify whatever
|
|
12
|
+
* the last run happened to produce, which is the opposite of a check.
|
|
13
|
+
*
|
|
14
|
+
* **The artifact is deterministic by construction.** `elapsedMs` is dropped:
|
|
15
|
+
* wall-clock time differs on every run, and a pin that deep-equals it could
|
|
16
|
+
* never pass twice. Everything kept is a function of the specs and the peer.
|
|
17
|
+
*
|
|
18
|
+
* @module atlas/witness-artifact
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
import { runNumericWitness } from './witness-numeric.js';
|
|
22
|
+
import { runSymbolicWitness } from './witness-symbolic.js';
|
|
23
|
+
import { WITNESS_REGISTRY } from './witness-specs.js';
|
|
24
|
+
/**
|
|
25
|
+
* Run every registered witness and assemble the artifact.
|
|
26
|
+
*
|
|
27
|
+
* @param registry - the witnesses to run; defaults to {@link WITNESS_REGISTRY}.
|
|
28
|
+
* @param simplifier - forwarded to `runSymbolicWitness`. Omit it for the real
|
|
29
|
+
* peer (resolved through `isSimplifierAvailable()`); pass `null` to run every
|
|
30
|
+
* symbolic witness as peer-absent.
|
|
31
|
+
* @returns the artifact; never throws, because neither runner does.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export async function runWitnessRegistry(registry = WITNESS_REGISTRY, simplifier) {
|
|
35
|
+
const results = [];
|
|
36
|
+
for (const entry of registry) {
|
|
37
|
+
// Sequential on purpose: the order of the artifact is the order of the
|
|
38
|
+
// registry, and a symbolic run's timeout budget should not compete with
|
|
39
|
+
// its neighbours for the event loop.
|
|
40
|
+
let run;
|
|
41
|
+
let convergence;
|
|
42
|
+
if (entry.kind === 'symbolic') {
|
|
43
|
+
run = await runSymbolicWitness(entry.spec, simplifier);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const numeric = runNumericWitness(entry.spec);
|
|
47
|
+
run = numeric;
|
|
48
|
+
convergence = numeric.convergence;
|
|
49
|
+
}
|
|
50
|
+
results.push({
|
|
51
|
+
recordId: entry.recordId,
|
|
52
|
+
witnessId: run.witnessId,
|
|
53
|
+
kind: run.kind,
|
|
54
|
+
status: run.status,
|
|
55
|
+
...(run.reason === undefined ? {} : { reason: run.reason }),
|
|
56
|
+
detail: run.detail,
|
|
57
|
+
...(convergence === undefined ? {} : { convergence }),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return { schemaVersion: '0', results };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The ids of witnesses of `recordId` that the artifact records as `'checked'`
|
|
64
|
+
* — the value to pass as `deriveEvidence`'s `passingWitnessIds` for the
|
|
65
|
+
* artifact-governed kinds.
|
|
66
|
+
*
|
|
67
|
+
* Only `'checked'` counts. An `'unresolved'` row (peer absent, timeout, an
|
|
68
|
+
* irreducible difference) is not a pass, and admitting it would hand
|
|
69
|
+
* `symbolically-checked` to a claim nobody examined.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export function artifactPassingWitnessIds(artifact, recordId) {
|
|
74
|
+
return new Set(artifact.results
|
|
75
|
+
.filter((r) => r.recordId === recordId && r.status === 'checked')
|
|
76
|
+
.map((r) => r.witnessId));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=witness-artifact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACzC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAAgC,EAChC,QAAgB;IAEhB,OAAO,IAAI,GAAG,CACZ,QAAQ,CAAC,OAAO;SACb,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC;SAChE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 4, S4.2 — the numeric witness runner.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-4-Design.md` §2.3.
|
|
5
|
+
*
|
|
6
|
+
* A numeric witness evaluates a claim at TWO resolutions and reports whether
|
|
7
|
+
* refinement moved the answer toward the target. Two resolutions are the
|
|
8
|
+
* minimum that can say anything at all: one number agreeing with a target is
|
|
9
|
+
* consistent with a scheme that is simply wrong by an amount the tolerance
|
|
10
|
+
* happens to admit.
|
|
11
|
+
*
|
|
12
|
+
* ## The ratio is REPORTED, never compared against an expected order
|
|
13
|
+
*
|
|
14
|
+
* `convergence.ratio = |coarse − target| / |fine − target|` is the factor by
|
|
15
|
+
* which refinement reduced the error. A second-order scheme halving its step
|
|
16
|
+
* should give ≈ 4; a first-order one ≈ 2. **Nothing here asserts which.** The
|
|
17
|
+
* witnesses in hand do not all record their scheme's order, and asserting an
|
|
18
|
+
* order nobody wrote down would be fabrication of exactly the kind this sprint
|
|
19
|
+
* forbids. The number goes into the results artifact; a reviewer reads it.
|
|
20
|
+
*
|
|
21
|
+
* What the runner DOES decide is the weaker, checkable thing: a ratio at or
|
|
22
|
+
* below 1 means refinement did NOT improve the answer, and that earns
|
|
23
|
+
* `'unresolved'` rather than `'checked'` — a fine value that happens to land
|
|
24
|
+
* inside the tolerance while refinement is not converging is agreement by
|
|
25
|
+
* accident, and the tolerance alone cannot tell the two apart.
|
|
26
|
+
*
|
|
27
|
+
* @module atlas/witness-numeric
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
import type { WitnessRunResult } from './witness-result.js';
|
|
31
|
+
/** The two-resolution error record a numeric witness carries. @internal */
|
|
32
|
+
export interface Convergence {
|
|
33
|
+
/** |coarse − target| in the witness's own units. */
|
|
34
|
+
readonly coarse: number;
|
|
35
|
+
/** |fine − target|. */
|
|
36
|
+
readonly fine: number;
|
|
37
|
+
/**
|
|
38
|
+
* `coarse / fine`. Greater than 1 ⇒ refinement helped. `Infinity` when the
|
|
39
|
+
* fine error is exactly zero, which is a legitimate outcome for an exact
|
|
40
|
+
* scheme and must not be reported as a failure.
|
|
41
|
+
*/
|
|
42
|
+
readonly ratio: number;
|
|
43
|
+
}
|
|
44
|
+
/** What a numeric witness asserts, and how to evaluate it. @internal */
|
|
45
|
+
export interface NumericWitnessSpec {
|
|
46
|
+
/** The `Witness.id`. */
|
|
47
|
+
readonly id: string;
|
|
48
|
+
/**
|
|
49
|
+
* Evaluate the claim at a resolution. The meaning of the argument is the
|
|
50
|
+
* witness's own (a step count, a grid size, a truncation order); the runner
|
|
51
|
+
* only requires that `fineResolution` is the more refined of the two.
|
|
52
|
+
*/
|
|
53
|
+
readonly evaluate: (resolution: number) => number;
|
|
54
|
+
/** The value the claim should reproduce. */
|
|
55
|
+
readonly target: number;
|
|
56
|
+
readonly coarseResolution: number;
|
|
57
|
+
readonly fineResolution: number;
|
|
58
|
+
/**
|
|
59
|
+
* Absolute tolerance the FINE evaluation must meet. Required: a default
|
|
60
|
+
* tolerance is a claim about accuracy that the caller, not this module,
|
|
61
|
+
* is entitled to make.
|
|
62
|
+
*/
|
|
63
|
+
readonly tolerance: number;
|
|
64
|
+
}
|
|
65
|
+
/** A result that also carries the two-resolution record, when one was produced. */
|
|
66
|
+
export interface NumericWitnessRunResult extends WitnessRunResult {
|
|
67
|
+
readonly kind: 'numeric';
|
|
68
|
+
/** Absent only when evaluation threw before any number existed. */
|
|
69
|
+
readonly convergence?: Convergence;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Run one numeric witness at two resolutions.
|
|
73
|
+
*
|
|
74
|
+
* @param spec - the claim and its two resolutions.
|
|
75
|
+
* @returns a result carrying `convergence`; **never throws** — an evaluation
|
|
76
|
+
* that throws is `'unresolved'` with `'parse-error'`, because a scheme that
|
|
77
|
+
* blew up has not refuted the physics it was evaluating.
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
export declare function runNumericWitness(spec: NumericWitnessSpec): NumericWitnessRunResult;
|
|
81
|
+
//# sourceMappingURL=witness-numeric.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"witness-numeric.d.ts","sourceRoot":"","sources":["../../src/atlas/witness-numeric.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,uBAAuB;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,wBAAwB;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,mFAAmF;AACnF,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,uBAAuB,CA0EnF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Phase 4, S4.2 — the numeric witness runner.
|
|
3
|
+
*
|
|
4
|
+
* Design note: `docs/planning/Atlas-Phase-4-Design.md` §2.3.
|
|
5
|
+
*
|
|
6
|
+
* A numeric witness evaluates a claim at TWO resolutions and reports whether
|
|
7
|
+
* refinement moved the answer toward the target. Two resolutions are the
|
|
8
|
+
* minimum that can say anything at all: one number agreeing with a target is
|
|
9
|
+
* consistent with a scheme that is simply wrong by an amount the tolerance
|
|
10
|
+
* happens to admit.
|
|
11
|
+
*
|
|
12
|
+
* ## The ratio is REPORTED, never compared against an expected order
|
|
13
|
+
*
|
|
14
|
+
* `convergence.ratio = |coarse − target| / |fine − target|` is the factor by
|
|
15
|
+
* which refinement reduced the error. A second-order scheme halving its step
|
|
16
|
+
* should give ≈ 4; a first-order one ≈ 2. **Nothing here asserts which.** The
|
|
17
|
+
* witnesses in hand do not all record their scheme's order, and asserting an
|
|
18
|
+
* order nobody wrote down would be fabrication of exactly the kind this sprint
|
|
19
|
+
* forbids. The number goes into the results artifact; a reviewer reads it.
|
|
20
|
+
*
|
|
21
|
+
* What the runner DOES decide is the weaker, checkable thing: a ratio at or
|
|
22
|
+
* below 1 means refinement did NOT improve the answer, and that earns
|
|
23
|
+
* `'unresolved'` rather than `'checked'` — a fine value that happens to land
|
|
24
|
+
* inside the tolerance while refinement is not converging is agreement by
|
|
25
|
+
* accident, and the tolerance alone cannot tell the two apart.
|
|
26
|
+
*
|
|
27
|
+
* @module atlas/witness-numeric
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Run one numeric witness at two resolutions.
|
|
32
|
+
*
|
|
33
|
+
* @param spec - the claim and its two resolutions.
|
|
34
|
+
* @returns a result carrying `convergence`; **never throws** — an evaluation
|
|
35
|
+
* that throws is `'unresolved'` with `'parse-error'`, because a scheme that
|
|
36
|
+
* blew up has not refuted the physics it was evaluating.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function runNumericWitness(spec) {
|
|
40
|
+
const started = Date.now();
|
|
41
|
+
const base = { witnessId: spec.id, kind: 'numeric' };
|
|
42
|
+
const elapsed = () => Date.now() - started;
|
|
43
|
+
let coarseValue;
|
|
44
|
+
let fineValue;
|
|
45
|
+
try {
|
|
46
|
+
coarseValue = spec.evaluate(spec.coarseResolution);
|
|
47
|
+
fineValue = spec.evaluate(spec.fineResolution);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
return {
|
|
51
|
+
...base,
|
|
52
|
+
status: 'unresolved',
|
|
53
|
+
reason: 'parse-error',
|
|
54
|
+
detail: `Evaluation threw rather than producing a number: ${String(err)}.`,
|
|
55
|
+
elapsedMs: elapsed(),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (!Number.isFinite(coarseValue) || !Number.isFinite(fineValue)) {
|
|
59
|
+
return {
|
|
60
|
+
...base,
|
|
61
|
+
status: 'unresolved',
|
|
62
|
+
reason: 'parse-error',
|
|
63
|
+
detail: `Evaluation produced a non-finite value (coarse ${coarseValue}, fine ` +
|
|
64
|
+
`${fineValue}). Nothing is concluded from it.`,
|
|
65
|
+
elapsedMs: elapsed(),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const coarse = Math.abs(coarseValue - spec.target);
|
|
69
|
+
const fine = Math.abs(fineValue - spec.target);
|
|
70
|
+
// fine === 0 ⇒ an exact scheme. Infinity is the honest ratio there, and the
|
|
71
|
+
// comparisons below treat it as "refinement helped", which it did.
|
|
72
|
+
const ratio = fine === 0 ? (coarse === 0 ? 1 : Infinity) : coarse / fine;
|
|
73
|
+
const convergence = { coarse, fine, ratio };
|
|
74
|
+
if (fine > spec.tolerance) {
|
|
75
|
+
return {
|
|
76
|
+
...base,
|
|
77
|
+
status: 'refuted',
|
|
78
|
+
convergence,
|
|
79
|
+
detail: `The fine evaluation misses the target by ${fine}, outside the stated ` +
|
|
80
|
+
`tolerance ${spec.tolerance}.`,
|
|
81
|
+
elapsedMs: elapsed(),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (ratio <= 1) {
|
|
85
|
+
return {
|
|
86
|
+
...base,
|
|
87
|
+
status: 'unresolved',
|
|
88
|
+
reason: 'no-convergence',
|
|
89
|
+
convergence,
|
|
90
|
+
detail: `Refinement did not reduce the error (ratio ${ratio}). The fine value is ` +
|
|
91
|
+
'inside tolerance, but agreement that does not improve with refinement is ' +
|
|
92
|
+
'not evidence that the scheme converges to the target.',
|
|
93
|
+
elapsedMs: elapsed(),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...base,
|
|
98
|
+
status: 'checked',
|
|
99
|
+
convergence,
|
|
100
|
+
detail: `Fine error ${fine} is within tolerance ${spec.tolerance}, and refinement ` +
|
|
101
|
+
`reduced the error by a factor of ${ratio}.`,
|
|
102
|
+
elapsedMs: elapsed(),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=witness-numeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"witness-numeric.js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s/planning/Atlas-Phase-4-Design.md` §2.2.
|
|
5
|
+
*
|
|
6
|
+
* **The load-bearing distinction in this file: a check that DID NOT RUN is not
|
|
7
|
+
* a check that FAILED.** Peer absent, budget exhausted, and parser throw are
|
|
8
|
+
* all `'unresolved'`, each carrying the reason it could not answer. Only a
|
|
9
|
+
* check that COMPLETES and finds a disagreement is `'refuted'`.
|
|
10
|
+
*
|
|
11
|
+
* This repo has been bitten by exactly that conflation more than once — a
|
|
12
|
+
* checker that discarded its own stderr manufactured a false negative
|
|
13
|
+
* indistinguishable from a clean pass. Folding "could not run" into "failed"
|
|
14
|
+
* is the same defect with the sign flipped: it turns a missing optional peer
|
|
15
|
+
* into a refutation of the physics.
|
|
16
|
+
*
|
|
17
|
+
* Nothing here throws. A runner that threw would force every caller into a
|
|
18
|
+
* `try`/`catch` whose `catch` arm cannot tell which of the three outcomes it
|
|
19
|
+
* is looking at.
|
|
20
|
+
*
|
|
21
|
+
* @module atlas/witness-result
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* What a witness run concluded.
|
|
26
|
+
*
|
|
27
|
+
* - `'checked'` — the check RAN and the claim held.
|
|
28
|
+
* - `'refuted'` — the check RAN and the claim did not hold.
|
|
29
|
+
* - `'unresolved'` — the check did not run, or ran and could not decide.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export type WitnessStatus = 'checked' | 'refuted' | 'unresolved';
|
|
34
|
+
/**
|
|
35
|
+
* Why a witness is `'unresolved'`. Required on that status so a reader never
|
|
36
|
+
* has to guess which of four very different situations produced it.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export type UnresolvedReason =
|
|
41
|
+
/** The optional peer that performs the check is not installed. */
|
|
42
|
+
'peer-absent'
|
|
43
|
+
/** The wall-clock budget elapsed before an answer arrived. */
|
|
44
|
+
| 'timeout'
|
|
45
|
+
/** The input could not be parsed or evaluated at all. */
|
|
46
|
+
| 'parse-error'
|
|
47
|
+
/** The check ran to completion and neither confirmed nor refuted. */
|
|
48
|
+
| 'not-simplified'
|
|
49
|
+
/** Refinement did not improve the answer, so nothing is concluded. */
|
|
50
|
+
| 'no-convergence';
|
|
51
|
+
/** What one witness run produced. @internal */
|
|
52
|
+
export interface WitnessRunResult {
|
|
53
|
+
/** The `Witness.id` this run corresponds to (`'W7b'`). */
|
|
54
|
+
readonly witnessId: string;
|
|
55
|
+
readonly kind: 'symbolic' | 'numeric';
|
|
56
|
+
readonly status: WitnessStatus;
|
|
57
|
+
/** REQUIRED when `status === 'unresolved'`, absent otherwise. */
|
|
58
|
+
readonly reason?: UnresolvedReason;
|
|
59
|
+
/** Human-readable note — never the discriminator, always the explanation. */
|
|
60
|
+
readonly detail: string;
|
|
61
|
+
/** Milliseconds the runner waited. */
|
|
62
|
+
readonly elapsedMs: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The ids of runs that CHECKED, as `deriveEvidence` wants its
|
|
66
|
+
* `passingWitnessIds` argument.
|
|
67
|
+
*
|
|
68
|
+
* A convenience with one purpose: keep the mapping from run results to
|
|
69
|
+
* "passing" in ONE place. Writing `results.filter(r => r.status !== 'refuted')`
|
|
70
|
+
* at a call site would hand `symbolically-checked` to every unresolved run —
|
|
71
|
+
* the free-tag defect `derive-evidence.ts` documents at length, reintroduced
|
|
72
|
+
* one layer up.
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export declare function passingWitnessIds(results: readonly WitnessRunResult[]): ReadonlySet<string>;
|
|
77
|
+
//# sourceMappingURL=witness-result.d.ts.map
|