@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +714 -2
- package/dist/cache/index.d.ts +191 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +361 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/canonical/jcs.d.ts +78 -0
- package/dist/canonical/jcs.d.ts.map +1 -0
- package/dist/canonical/jcs.js +500 -0
- package/dist/canonical/jcs.js.map +1 -0
- package/dist/canonical/restricted-json.d.ts +7 -0
- package/dist/canonical/restricted-json.d.ts.map +1 -0
- package/dist/canonical/restricted-json.js +318 -0
- package/dist/canonical/restricted-json.js.map +1 -0
- package/dist/canonical/restricted-value.d.ts +59 -0
- package/dist/canonical/restricted-value.d.ts.map +1 -0
- package/dist/canonical/restricted-value.js +156 -0
- package/dist/canonical/restricted-value.js.map +1 -0
- package/dist/canonical/restricted.d.ts +85 -0
- package/dist/canonical/restricted.d.ts.map +1 -0
- package/dist/canonical/restricted.js +163 -0
- package/dist/canonical/restricted.js.map +1 -0
- package/dist/canonical/signature.d.ts +38 -0
- package/dist/canonical/signature.d.ts.map +1 -0
- package/dist/canonical/signature.js +47 -0
- package/dist/canonical/signature.js.map +1 -0
- package/dist/eval/access/delivery.d.ts +63 -0
- package/dist/eval/access/delivery.d.ts.map +1 -0
- package/dist/eval/access/delivery.js +98 -0
- package/dist/eval/access/delivery.js.map +1 -0
- package/dist/eval/access/overlay.d.ts +72 -0
- package/dist/eval/access/overlay.d.ts.map +1 -0
- package/dist/eval/access/overlay.js +402 -0
- package/dist/eval/access/overlay.js.map +1 -0
- package/dist/eval/access/projection.d.ts +159 -0
- package/dist/eval/access/projection.d.ts.map +1 -0
- package/dist/eval/access/projection.js +211 -0
- package/dist/eval/access/projection.js.map +1 -0
- package/dist/eval/access/window.d.ts +128 -0
- package/dist/eval/access/window.d.ts.map +1 -0
- package/dist/eval/access/window.js +254 -0
- package/dist/eval/access/window.js.map +1 -0
- package/dist/eval/access/write.d.ts +113 -0
- package/dist/eval/access/write.d.ts.map +1 -0
- package/dist/eval/access/write.js +119 -0
- package/dist/eval/access/write.js.map +1 -0
- package/dist/eval/addressing.d.ts +131 -0
- package/dist/eval/addressing.d.ts.map +1 -0
- package/dist/eval/addressing.js +270 -0
- package/dist/eval/addressing.js.map +1 -0
- package/dist/eval/budget.d.ts +143 -0
- package/dist/eval/budget.d.ts.map +1 -0
- package/dist/eval/budget.js +387 -0
- package/dist/eval/budget.js.map +1 -0
- package/dist/eval/computed.d.ts +46 -0
- package/dist/eval/computed.d.ts.map +1 -0
- package/dist/eval/computed.js +89 -0
- package/dist/eval/computed.js.map +1 -0
- package/dist/eval/denials.d.ts +64 -0
- package/dist/eval/denials.d.ts.map +1 -0
- package/dist/eval/denials.js +87 -0
- package/dist/eval/denials.js.map +1 -0
- package/dist/eval/engine/cancellation.d.ts +12 -0
- package/dist/eval/engine/cancellation.d.ts.map +1 -0
- package/dist/eval/engine/cancellation.js +56 -0
- package/dist/eval/engine/cancellation.js.map +1 -0
- package/dist/eval/engine/delta.d.ts +104 -0
- package/dist/eval/engine/delta.d.ts.map +1 -0
- package/dist/eval/engine/delta.js +466 -0
- package/dist/eval/engine/delta.js.map +1 -0
- package/dist/eval/engine/deps.d.ts +136 -0
- package/dist/eval/engine/deps.d.ts.map +1 -0
- package/dist/eval/engine/deps.js +345 -0
- package/dist/eval/engine/deps.js.map +1 -0
- package/dist/eval/engine/identity.d.ts +128 -0
- package/dist/eval/engine/identity.d.ts.map +1 -0
- package/dist/eval/engine/identity.js +398 -0
- package/dist/eval/engine/identity.js.map +1 -0
- package/dist/eval/engine/index.d.ts +200 -0
- package/dist/eval/engine/index.d.ts.map +1 -0
- package/dist/eval/engine/index.js +1242 -0
- package/dist/eval/engine/index.js.map +1 -0
- package/dist/eval/engine/measurement.d.ts +23 -0
- package/dist/eval/engine/measurement.d.ts.map +1 -0
- package/dist/eval/engine/measurement.js +42 -0
- package/dist/eval/engine/measurement.js.map +1 -0
- package/dist/eval/engine/naive.d.ts +19 -0
- package/dist/eval/engine/naive.d.ts.map +1 -0
- package/dist/eval/engine/naive.js +59 -0
- package/dist/eval/engine/naive.js.map +1 -0
- package/dist/eval/engine/ops.d.ts +214 -0
- package/dist/eval/engine/ops.d.ts.map +1 -0
- package/dist/eval/engine/ops.js +1422 -0
- package/dist/eval/engine/ops.js.map +1 -0
- package/dist/eval/engine/patches.d.ts +40 -0
- package/dist/eval/engine/patches.d.ts.map +1 -0
- package/dist/eval/engine/patches.js +125 -0
- package/dist/eval/engine/patches.js.map +1 -0
- package/dist/eval/engine/ports.d.ts +71 -0
- package/dist/eval/engine/ports.d.ts.map +1 -0
- package/dist/eval/engine/ports.js +2 -0
- package/dist/eval/engine/ports.js.map +1 -0
- package/dist/eval/engine/session.d.ts +116 -0
- package/dist/eval/engine/session.d.ts.map +1 -0
- package/dist/eval/engine/session.js +653 -0
- package/dist/eval/engine/session.js.map +1 -0
- package/dist/eval/engine/snapshot.d.ts +97 -0
- package/dist/eval/engine/snapshot.d.ts.map +1 -0
- package/dist/eval/engine/snapshot.js +221 -0
- package/dist/eval/engine/snapshot.js.map +1 -0
- package/dist/eval/engine/subscriptions.d.ts +47 -0
- package/dist/eval/engine/subscriptions.d.ts.map +1 -0
- package/dist/eval/engine/subscriptions.js +103 -0
- package/dist/eval/engine/subscriptions.js.map +1 -0
- package/dist/eval/engine/trace.d.ts +77 -0
- package/dist/eval/engine/trace.d.ts.map +1 -0
- package/dist/eval/engine/trace.js +140 -0
- package/dist/eval/engine/trace.js.map +1 -0
- package/dist/eval/error-diagnostic.d.ts +26 -0
- package/dist/eval/error-diagnostic.d.ts.map +1 -0
- package/dist/eval/error-diagnostic.js +63 -0
- package/dist/eval/error-diagnostic.js.map +1 -0
- package/dist/eval/evaluate-expr.d.ts +44 -0
- package/dist/eval/evaluate-expr.d.ts.map +1 -0
- package/dist/eval/evaluate-expr.js +149 -0
- package/dist/eval/evaluate-expr.js.map +1 -0
- package/dist/eval/evaluate.d.ts +282 -0
- package/dist/eval/evaluate.d.ts.map +1 -0
- package/dist/eval/evaluate.js +391 -0
- package/dist/eval/evaluate.js.map +1 -0
- package/dist/eval/evolution/relocate.d.ts +72 -0
- package/dist/eval/evolution/relocate.d.ts.map +1 -0
- package/dist/eval/evolution/relocate.js +427 -0
- package/dist/eval/evolution/relocate.js.map +1 -0
- package/dist/eval/evolution/select.d.ts +11 -0
- package/dist/eval/evolution/select.d.ts.map +1 -0
- package/dist/eval/evolution/select.js +53 -0
- package/dist/eval/evolution/select.js.map +1 -0
- package/dist/eval/evolution/upcast.d.ts +13 -0
- package/dist/eval/evolution/upcast.d.ts.map +1 -0
- package/dist/eval/evolution/upcast.js +88 -0
- package/dist/eval/evolution/upcast.js.map +1 -0
- package/dist/eval/expr/aggregates.d.ts +75 -0
- package/dist/eval/expr/aggregates.d.ts.map +1 -0
- package/dist/eval/expr/aggregates.js +991 -0
- package/dist/eval/expr/aggregates.js.map +1 -0
- package/dist/eval/expr/arithmetic.d.ts +26 -0
- package/dist/eval/expr/arithmetic.d.ts.map +1 -0
- package/dist/eval/expr/arithmetic.js +387 -0
- package/dist/eval/expr/arithmetic.js.map +1 -0
- package/dist/eval/expr/between.d.ts +17 -0
- package/dist/eval/expr/between.d.ts.map +1 -0
- package/dist/eval/expr/between.js +46 -0
- package/dist/eval/expr/between.js.map +1 -0
- package/dist/eval/expr/binder.d.ts +96 -0
- package/dist/eval/expr/binder.d.ts.map +1 -0
- package/dist/eval/expr/binder.js +253 -0
- package/dist/eval/expr/binder.js.map +1 -0
- package/dist/eval/expr/call-dispatch.d.ts +28 -0
- package/dist/eval/expr/call-dispatch.d.ts.map +1 -0
- package/dist/eval/expr/call-dispatch.js +114 -0
- package/dist/eval/expr/call-dispatch.js.map +1 -0
- package/dist/eval/expr/collections.d.ts +20 -0
- package/dist/eval/expr/collections.d.ts.map +1 -0
- package/dist/eval/expr/collections.js +66 -0
- package/dist/eval/expr/collections.js.map +1 -0
- package/dist/eval/expr/compare.d.ts +36 -0
- package/dist/eval/expr/compare.d.ts.map +1 -0
- package/dist/eval/expr/compare.js +115 -0
- package/dist/eval/expr/compare.js.map +1 -0
- package/dist/eval/expr/datasets.d.ts +28 -0
- package/dist/eval/expr/datasets.d.ts.map +1 -0
- package/dist/eval/expr/datasets.js +304 -0
- package/dist/eval/expr/datasets.js.map +1 -0
- package/dist/eval/expr/digest.d.ts +23 -0
- package/dist/eval/expr/digest.d.ts.map +1 -0
- package/dist/eval/expr/digest.js +89 -0
- package/dist/eval/expr/digest.js.map +1 -0
- package/dist/eval/expr/domains.d.ts +19 -0
- package/dist/eval/expr/domains.d.ts.map +1 -0
- package/dist/eval/expr/domains.js +18 -0
- package/dist/eval/expr/domains.js.map +1 -0
- package/dist/eval/expr/host.d.ts +152 -0
- package/dist/eval/expr/host.d.ts.map +1 -0
- package/dist/eval/expr/host.js +36 -0
- package/dist/eval/expr/host.js.map +1 -0
- package/dist/eval/expr/lists.d.ts +24 -0
- package/dist/eval/expr/lists.d.ts.map +1 -0
- package/dist/eval/expr/lists.js +155 -0
- package/dist/eval/expr/lists.js.map +1 -0
- package/dist/eval/expr/member.d.ts +15 -0
- package/dist/eval/expr/member.d.ts.map +1 -0
- package/dist/eval/expr/member.js +32 -0
- package/dist/eval/expr/member.js.map +1 -0
- package/dist/eval/expr/money-ops.d.ts +10 -0
- package/dist/eval/expr/money-ops.d.ts.map +1 -0
- package/dist/eval/expr/money-ops.js +17 -0
- package/dist/eval/expr/money-ops.js.map +1 -0
- package/dist/eval/expr/operands.d.ts +27 -0
- package/dist/eval/expr/operands.d.ts.map +1 -0
- package/dist/eval/expr/operands.js +167 -0
- package/dist/eval/expr/operands.js.map +1 -0
- package/dist/eval/expr/presence.d.ts +27 -0
- package/dist/eval/expr/presence.d.ts.map +1 -0
- package/dist/eval/expr/presence.js +140 -0
- package/dist/eval/expr/presence.js.map +1 -0
- package/dist/eval/expr/records.d.ts +22 -0
- package/dist/eval/expr/records.d.ts.map +1 -0
- package/dist/eval/expr/records.js +101 -0
- package/dist/eval/expr/records.js.map +1 -0
- package/dist/eval/expr/rule-refs.d.ts +25 -0
- package/dist/eval/expr/rule-refs.d.ts.map +1 -0
- package/dist/eval/expr/rule-refs.js +60 -0
- package/dist/eval/expr/rule-refs.js.map +1 -0
- package/dist/eval/expr/sequences.d.ts +26 -0
- package/dist/eval/expr/sequences.d.ts.map +1 -0
- package/dist/eval/expr/sequences.js +151 -0
- package/dist/eval/expr/sequences.js.map +1 -0
- package/dist/eval/expr/value.d.ts +99 -0
- package/dist/eval/expr/value.d.ts.map +1 -0
- package/dist/eval/expr/value.js +14 -0
- package/dist/eval/expr/value.js.map +1 -0
- package/dist/eval/expression.d.ts +142 -0
- package/dist/eval/expression.d.ts.map +1 -0
- package/dist/eval/expression.js +446 -0
- package/dist/eval/expression.js.map +1 -0
- package/dist/eval/firing.d.ts +68 -0
- package/dist/eval/firing.d.ts.map +1 -0
- package/dist/eval/firing.js +222 -0
- package/dist/eval/firing.js.map +1 -0
- package/dist/eval/gate.d.ts +110 -0
- package/dist/eval/gate.d.ts.map +1 -0
- package/dist/eval/gate.js +278 -0
- package/dist/eval/gate.js.map +1 -0
- package/dist/eval/layout-visibility.d.ts +18 -0
- package/dist/eval/layout-visibility.d.ts.map +1 -0
- package/dist/eval/layout-visibility.js +61 -0
- package/dist/eval/layout-visibility.js.map +1 -0
- package/dist/eval/option-availability.d.ts +26 -0
- package/dist/eval/option-availability.d.ts.map +1 -0
- package/dist/eval/option-availability.js +580 -0
- package/dist/eval/option-availability.js.map +1 -0
- package/dist/eval/options-boundary.d.ts +15 -0
- package/dist/eval/options-boundary.d.ts.map +1 -0
- package/dist/eval/options-boundary.js +40 -0
- package/dist/eval/options-boundary.js.map +1 -0
- package/dist/eval/options.d.ts +99 -0
- package/dist/eval/options.d.ts.map +1 -0
- package/dist/eval/options.js +96 -0
- package/dist/eval/options.js.map +1 -0
- package/dist/eval/overrides.d.ts +116 -0
- package/dist/eval/overrides.d.ts.map +1 -0
- package/dist/eval/overrides.js +176 -0
- package/dist/eval/overrides.js.map +1 -0
- package/dist/eval/paths.d.ts +25 -0
- package/dist/eval/paths.d.ts.map +1 -0
- package/dist/eval/paths.js +47 -0
- package/dist/eval/paths.js.map +1 -0
- package/dist/eval/presentation-reads.d.ts +20 -0
- package/dist/eval/presentation-reads.d.ts.map +1 -0
- package/dist/eval/presentation-reads.js +2 -0
- package/dist/eval/presentation-reads.js.map +1 -0
- package/dist/eval/presentation.d.ts +122 -0
- package/dist/eval/presentation.d.ts.map +1 -0
- package/dist/eval/presentation.js +255 -0
- package/dist/eval/presentation.js.map +1 -0
- package/dist/eval/reader/context-value.d.ts +41 -0
- package/dist/eval/reader/context-value.d.ts.map +1 -0
- package/dist/eval/reader/context-value.js +129 -0
- package/dist/eval/reader/context-value.js.map +1 -0
- package/dist/eval/reader/covered.d.ts +53 -0
- package/dist/eval/reader/covered.d.ts.map +1 -0
- package/dist/eval/reader/covered.js +139 -0
- package/dist/eval/reader/covered.js.map +1 -0
- package/dist/eval/reader/declarations.d.ts +182 -0
- package/dist/eval/reader/declarations.d.ts.map +1 -0
- package/dist/eval/reader/declarations.js +153 -0
- package/dist/eval/reader/declarations.js.map +1 -0
- package/dist/eval/reader/member-access.d.ts +87 -0
- package/dist/eval/reader/member-access.d.ts.map +1 -0
- package/dist/eval/reader/member-access.js +212 -0
- package/dist/eval/reader/member-access.js.map +1 -0
- package/dist/eval/reader/memo.d.ts +34 -0
- package/dist/eval/reader/memo.d.ts.map +1 -0
- package/dist/eval/reader/memo.js +67 -0
- package/dist/eval/reader/memo.js.map +1 -0
- package/dist/eval/reader/overlay.d.ts +74 -0
- package/dist/eval/reader/overlay.d.ts.map +1 -0
- package/dist/eval/reader/overlay.js +365 -0
- package/dist/eval/reader/overlay.js.map +1 -0
- package/dist/eval/reader/questions.d.ts +37 -0
- package/dist/eval/reader/questions.d.ts.map +1 -0
- package/dist/eval/reader/questions.js +78 -0
- package/dist/eval/reader/questions.js.map +1 -0
- package/dist/eval/reader/resolve.d.ts +84 -0
- package/dist/eval/reader/resolve.d.ts.map +1 -0
- package/dist/eval/reader/resolve.js +310 -0
- package/dist/eval/reader/resolve.js.map +1 -0
- package/dist/eval/reader/value-read.d.ts +50 -0
- package/dist/eval/reader/value-read.d.ts.map +1 -0
- package/dist/eval/reader/value-read.js +133 -0
- package/dist/eval/reader/value-read.js.map +1 -0
- package/dist/eval/reader/withheld.d.ts +48 -0
- package/dist/eval/reader/withheld.d.ts.map +1 -0
- package/dist/eval/reader/withheld.js +108 -0
- package/dist/eval/reader/withheld.js.map +1 -0
- package/dist/eval/reader-paths.d.ts +24 -0
- package/dist/eval/reader-paths.d.ts.map +1 -0
- package/dist/eval/reader-paths.js +23 -0
- package/dist/eval/reader-paths.js.map +1 -0
- package/dist/eval/reader.d.ts +281 -0
- package/dist/eval/reader.d.ts.map +1 -0
- package/dist/eval/reader.js +560 -0
- package/dist/eval/reader.js.map +1 -0
- package/dist/eval/receipt.d.ts +37 -0
- package/dist/eval/receipt.d.ts.map +1 -0
- package/dist/eval/receipt.js +222 -0
- package/dist/eval/receipt.js.map +1 -0
- package/dist/eval/report/assemble.d.ts +84 -0
- package/dist/eval/report/assemble.d.ts.map +1 -0
- package/dist/eval/report/assemble.js +277 -0
- package/dist/eval/report/assemble.js.map +1 -0
- package/dist/eval/report/fold.d.ts +18 -0
- package/dist/eval/report/fold.d.ts.map +1 -0
- package/dist/eval/report/fold.js +58 -0
- package/dist/eval/report/fold.js.map +1 -0
- package/dist/eval/rule/alternatives.d.ts +23 -0
- package/dist/eval/rule/alternatives.d.ts.map +1 -0
- package/dist/eval/rule/alternatives.js +46 -0
- package/dist/eval/rule/alternatives.js.map +1 -0
- package/dist/eval/rule/behaviour.d.ts +47 -0
- package/dist/eval/rule/behaviour.d.ts.map +1 -0
- package/dist/eval/rule/behaviour.js +249 -0
- package/dist/eval/rule/behaviour.js.map +1 -0
- package/dist/eval/rule/compute.d.ts +46 -0
- package/dist/eval/rule/compute.d.ts.map +1 -0
- package/dist/eval/rule/compute.js +158 -0
- package/dist/eval/rule/compute.js.map +1 -0
- package/dist/eval/rule/create-state.d.ts +42 -0
- package/dist/eval/rule/create-state.d.ts.map +1 -0
- package/dist/eval/rule/create-state.js +134 -0
- package/dist/eval/rule/create-state.js.map +1 -0
- package/dist/eval/rule/diagnostics.d.ts +24 -0
- package/dist/eval/rule/diagnostics.d.ts.map +1 -0
- package/dist/eval/rule/diagnostics.js +45 -0
- package/dist/eval/rule/diagnostics.js.map +1 -0
- package/dist/eval/rule/execution.d.ts +24 -0
- package/dist/eval/rule/execution.d.ts.map +1 -0
- package/dist/eval/rule/execution.js +495 -0
- package/dist/eval/rule/execution.js.map +1 -0
- package/dist/eval/rule/gate.d.ts +12 -0
- package/dist/eval/rule/gate.d.ts.map +1 -0
- package/dist/eval/rule/gate.js +34 -0
- package/dist/eval/rule/gate.js.map +1 -0
- package/dist/eval/rule/item.d.ts +11 -0
- package/dist/eval/rule/item.d.ts.map +1 -0
- package/dist/eval/rule/item.js +265 -0
- package/dist/eval/rule/item.js.map +1 -0
- package/dist/eval/rule/prepare.d.ts +64 -0
- package/dist/eval/rule/prepare.d.ts.map +1 -0
- package/dist/eval/rule/prepare.js +131 -0
- package/dist/eval/rule/prepare.js.map +1 -0
- package/dist/eval/rule/result.d.ts +97 -0
- package/dist/eval/rule/result.d.ts.map +1 -0
- package/dist/eval/rule/result.js +347 -0
- package/dist/eval/rule/result.js.map +1 -0
- package/dist/eval/rule/runner.d.ts +128 -0
- package/dist/eval/rule/runner.d.ts.map +1 -0
- package/dist/eval/rule/runner.js +296 -0
- package/dist/eval/rule/runner.js.map +1 -0
- package/dist/eval/rule/screen.d.ts +32 -0
- package/dist/eval/rule/screen.d.ts.map +1 -0
- package/dist/eval/rule/screen.js +73 -0
- package/dist/eval/rule/screen.js.map +1 -0
- package/dist/eval/rule/state.d.ts +137 -0
- package/dist/eval/rule/state.d.ts.map +1 -0
- package/dist/eval/rule/state.js +2 -0
- package/dist/eval/rule/state.js.map +1 -0
- package/dist/eval/rule/steps.d.ts +44 -0
- package/dist/eval/rule/steps.d.ts.map +1 -0
- package/dist/eval/rule/steps.js +367 -0
- package/dist/eval/rule/steps.js.map +1 -0
- package/dist/eval/rule/visibility.d.ts +18 -0
- package/dist/eval/rule/visibility.d.ts.map +1 -0
- package/dist/eval/rule/visibility.js +79 -0
- package/dist/eval/rule/visibility.js.map +1 -0
- package/dist/eval/seal.d.ts +74 -0
- package/dist/eval/seal.d.ts.map +1 -0
- package/dist/eval/seal.js +154 -0
- package/dist/eval/seal.js.map +1 -0
- package/dist/eval/signature-coverage.d.ts +19 -0
- package/dist/eval/signature-coverage.d.ts.map +1 -0
- package/dist/eval/signature-coverage.js +160 -0
- package/dist/eval/signature-coverage.js.map +1 -0
- package/dist/eval/state/derive.d.ts +72 -0
- package/dist/eval/state/derive.d.ts.map +1 -0
- package/dist/eval/state/derive.js +61 -0
- package/dist/eval/state/derive.js.map +1 -0
- package/dist/eval/state/describe.d.ts +18 -0
- package/dist/eval/state/describe.d.ts.map +1 -0
- package/dist/eval/state/describe.js +19 -0
- package/dist/eval/state/describe.js.map +1 -0
- package/dist/eval/state/field-state.d.ts +471 -0
- package/dist/eval/state/field-state.d.ts.map +1 -0
- package/dist/eval/state/field-state.js +1604 -0
- package/dist/eval/state/field-state.js.map +1 -0
- package/dist/eval/state/measurement.d.ts +136 -0
- package/dist/eval/state/measurement.d.ts.map +1 -0
- package/dist/eval/state/measurement.js +209 -0
- package/dist/eval/state/measurement.js.map +1 -0
- package/dist/eval/state/options.d.ts +21 -0
- package/dist/eval/state/options.d.ts.map +1 -0
- package/dist/eval/state/options.js +3 -0
- package/dist/eval/state/options.js.map +1 -0
- package/dist/eval/state/readiness.d.ts +400 -0
- package/dist/eval/state/readiness.d.ts.map +1 -0
- package/dist/eval/state/readiness.js +1067 -0
- package/dist/eval/state/readiness.js.map +1 -0
- package/dist/eval/state/snapshot.d.ts +130 -0
- package/dist/eval/state/snapshot.d.ts.map +1 -0
- package/dist/eval/state/snapshot.js +35 -0
- package/dist/eval/state/snapshot.js.map +1 -0
- package/dist/eval/state/unavailable-options.d.ts +54 -0
- package/dist/eval/state/unavailable-options.d.ts.map +1 -0
- package/dist/eval/state/unavailable-options.js +82 -0
- package/dist/eval/state/unavailable-options.js.map +1 -0
- package/dist/eval/state/value-state.d.ts +38 -0
- package/dist/eval/state/value-state.d.ts.map +1 -0
- package/dist/eval/state/value-state.js +52 -0
- package/dist/eval/state/value-state.js.map +1 -0
- package/dist/eval/submission/admission.d.ts +50 -0
- package/dist/eval/submission/admission.d.ts.map +1 -0
- package/dist/eval/submission/admission.js +174 -0
- package/dist/eval/submission/admission.js.map +1 -0
- package/dist/eval/submission/authority.d.ts +71 -0
- package/dist/eval/submission/authority.d.ts.map +1 -0
- package/dist/eval/submission/authority.js +118 -0
- package/dist/eval/submission/authority.js.map +1 -0
- package/dist/eval/submission/datasets.d.ts +28 -0
- package/dist/eval/submission/datasets.d.ts.map +1 -0
- package/dist/eval/submission/datasets.js +109 -0
- package/dist/eval/submission/datasets.js.map +1 -0
- package/dist/eval/submission/index.d.ts +15 -0
- package/dist/eval/submission/index.d.ts.map +1 -0
- package/dist/eval/submission/index.js +13 -0
- package/dist/eval/submission/index.js.map +1 -0
- package/dist/eval/submission/refusals.d.ts +103 -0
- package/dist/eval/submission/refusals.d.ts.map +1 -0
- package/dist/eval/submission/refusals.js +15 -0
- package/dist/eval/submission/refusals.js.map +1 -0
- package/dist/eval/submission/signatures.d.ts +7 -0
- package/dist/eval/submission/signatures.d.ts.map +1 -0
- package/dist/eval/submission/signatures.js +215 -0
- package/dist/eval/submission/signatures.js.map +1 -0
- package/dist/eval/submission/writes.d.ts +51 -0
- package/dist/eval/submission/writes.d.ts.map +1 -0
- package/dist/eval/submission/writes.js +203 -0
- package/dist/eval/submission/writes.js.map +1 -0
- package/dist/eval/submission.d.ts +53 -0
- package/dist/eval/submission.d.ts.map +1 -0
- package/dist/eval/submission.js +521 -0
- package/dist/eval/submission.js.map +1 -0
- package/dist/eval/suggestions-to-engine.d.ts +18 -0
- package/dist/eval/suggestions-to-engine.d.ts.map +1 -0
- package/dist/eval/suggestions-to-engine.js +40 -0
- package/dist/eval/suggestions-to-engine.js.map +1 -0
- package/dist/eval/suggestions.d.ts +17 -0
- package/dist/eval/suggestions.d.ts.map +1 -0
- package/dist/eval/suggestions.js +314 -0
- package/dist/eval/suggestions.js.map +1 -0
- package/dist/eval/undecided.d.ts +64 -0
- package/dist/eval/undecided.d.ts.map +1 -0
- package/dist/eval/undecided.js +101 -0
- package/dist/eval/undecided.js.map +1 -0
- package/dist/eval/verdict.d.ts +66 -0
- package/dist/eval/verdict.d.ts.map +1 -0
- package/dist/eval/verdict.js +106 -0
- package/dist/eval/verdict.js.map +1 -0
- package/dist/eval/verify-signature.d.ts +78 -0
- package/dist/eval/verify-signature.d.ts.map +1 -0
- package/dist/eval/verify-signature.js +185 -0
- package/dist/eval/verify-signature.js.map +1 -0
- package/dist/eval/version-dispatch.d.ts +38 -0
- package/dist/eval/version-dispatch.d.ts.map +1 -0
- package/dist/eval/version-dispatch.js +61 -0
- package/dist/eval/version-dispatch.js.map +1 -0
- package/dist/eval/visibility.d.ts +33 -0
- package/dist/eval/visibility.d.ts.map +1 -0
- package/dist/eval/visibility.js +83 -0
- package/dist/eval/visibility.js.map +1 -0
- package/dist/evaluate.d.ts +24 -0
- package/dist/evaluate.d.ts.map +1 -0
- package/dist/evaluate.js +18 -0
- package/dist/evaluate.js.map +1 -0
- package/dist/expr/builtin-docs.d.ts +51 -0
- package/dist/expr/builtin-docs.d.ts.map +1 -0
- package/dist/expr/builtin-docs.js +874 -0
- package/dist/expr/builtin-docs.js.map +1 -0
- package/dist/expr/builtins.d.ts +50 -0
- package/dist/expr/builtins.d.ts.map +1 -0
- package/dist/expr/builtins.js +966 -0
- package/dist/expr/builtins.js.map +1 -0
- package/dist/expr/decimal-precision.d.ts +39 -0
- package/dist/expr/decimal-precision.d.ts.map +1 -0
- package/dist/expr/decimal-precision.js +62 -0
- package/dist/expr/decimal-precision.js.map +1 -0
- package/dist/expr/decimal.d.ts +172 -0
- package/dist/expr/decimal.d.ts.map +1 -0
- package/dist/expr/decimal.js +782 -0
- package/dist/expr/decimal.js.map +1 -0
- package/dist/expr/deprecations.d.ts +34 -0
- package/dist/expr/deprecations.d.ts.map +1 -0
- package/dist/expr/deprecations.js +17 -0
- package/dist/expr/deprecations.js.map +1 -0
- package/dist/expr/diagnostics.d.ts +21 -0
- package/dist/expr/diagnostics.d.ts.map +1 -0
- package/dist/expr/diagnostics.js +231 -0
- package/dist/expr/diagnostics.js.map +1 -0
- package/dist/expr/direction.d.ts +30 -0
- package/dist/expr/direction.d.ts.map +1 -0
- package/dist/expr/direction.js +77 -0
- package/dist/expr/direction.js.map +1 -0
- package/dist/expr/example-expression.d.ts +62 -0
- package/dist/expr/example-expression.d.ts.map +1 -0
- package/dist/expr/example-expression.js +670 -0
- package/dist/expr/example-expression.js.map +1 -0
- package/dist/expr/instant.d.ts +49 -0
- package/dist/expr/instant.d.ts.map +1 -0
- package/dist/expr/instant.js +111 -0
- package/dist/expr/instant.js.map +1 -0
- package/dist/expr/logic.d.ts +17 -0
- package/dist/expr/logic.d.ts.map +1 -0
- package/dist/expr/logic.js +65 -0
- package/dist/expr/logic.js.map +1 -0
- package/dist/expr/messages.d.ts +45 -0
- package/dist/expr/messages.d.ts.map +1 -0
- package/dist/expr/messages.js +280 -0
- package/dist/expr/messages.js.map +1 -0
- package/dist/expr/money.d.ts +38 -0
- package/dist/expr/money.d.ts.map +1 -0
- package/dist/expr/money.js +127 -0
- package/dist/expr/money.js.map +1 -0
- package/dist/expr/ordering.d.ts +56 -0
- package/dist/expr/ordering.d.ts.map +1 -0
- package/dist/expr/ordering.js +167 -0
- package/dist/expr/ordering.js.map +1 -0
- package/dist/expr/pattern.d.ts +44 -0
- package/dist/expr/pattern.d.ts.map +1 -0
- package/dist/expr/pattern.js +458 -0
- package/dist/expr/pattern.js.map +1 -0
- package/dist/expr/plain-date.d.ts +90 -0
- package/dist/expr/plain-date.d.ts.map +1 -0
- package/dist/expr/plain-date.js +230 -0
- package/dist/expr/plain-date.js.map +1 -0
- package/dist/expr/plural-categories.d.ts +8 -0
- package/dist/expr/plural-categories.d.ts.map +1 -0
- package/dist/expr/plural-categories.js +15 -0
- package/dist/expr/plural-categories.js.map +1 -0
- package/dist/expr/plural-keys.d.ts +39 -0
- package/dist/expr/plural-keys.d.ts.map +1 -0
- package/dist/expr/plural-keys.js +46 -0
- package/dist/expr/plural-keys.js.map +1 -0
- package/dist/expr/plural.d.ts +33 -0
- package/dist/expr/plural.d.ts.map +1 -0
- package/dist/expr/plural.js +50 -0
- package/dist/expr/plural.js.map +1 -0
- package/dist/expr/quantity.d.ts +31 -0
- package/dist/expr/quantity.d.ts.map +1 -0
- package/dist/expr/quantity.js +83 -0
- package/dist/expr/quantity.js.map +1 -0
- package/dist/expr/reduce.d.ts +50 -0
- package/dist/expr/reduce.d.ts.map +1 -0
- package/dist/expr/reduce.js +236 -0
- package/dist/expr/reduce.js.map +1 -0
- package/dist/expr/regex.d.ts +108 -0
- package/dist/expr/regex.d.ts.map +1 -0
- package/dist/expr/regex.js +1207 -0
- package/dist/expr/regex.js.map +1 -0
- package/dist/expr/select-locale.d.ts +67 -0
- package/dist/expr/select-locale.d.ts.map +1 -0
- package/dist/expr/select-locale.js +219 -0
- package/dist/expr/select-locale.js.map +1 -0
- package/dist/expr/sequences.d.ts +123 -0
- package/dist/expr/sequences.d.ts.map +1 -0
- package/dist/expr/sequences.js +234 -0
- package/dist/expr/sequences.js.map +1 -0
- package/dist/expr/strings.d.ts +50 -0
- package/dist/expr/strings.d.ts.map +1 -0
- package/dist/expr/strings.js +184 -0
- package/dist/expr/strings.js.map +1 -0
- package/dist/expr/validation.d.ts +32 -0
- package/dist/expr/validation.d.ts.map +1 -0
- package/dist/expr/validation.js +182 -0
- package/dist/expr/validation.js.map +1 -0
- package/dist/graph/freeze.d.ts +4 -0
- package/dist/graph/freeze.d.ts.map +1 -0
- package/dist/graph/freeze.js +52 -0
- package/dist/graph/freeze.js.map +1 -0
- package/dist/graph/index.d.ts +15 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/inspect.d.ts +76 -0
- package/dist/graph/inspect.d.ts.map +1 -0
- package/dist/graph/inspect.js +263 -0
- package/dist/graph/inspect.js.map +1 -0
- package/dist/graph/read-walk.d.ts +101 -0
- package/dist/graph/read-walk.d.ts.map +1 -0
- package/dist/graph/read-walk.js +358 -0
- package/dist/graph/read-walk.js.map +1 -0
- package/dist/graph/record-index.d.ts +24 -0
- package/dist/graph/record-index.d.ts.map +1 -0
- package/dist/graph/record-index.js +35 -0
- package/dist/graph/record-index.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +139 -0
- package/dist/index.js.map +1 -0
- package/dist/lookup/digest.d.ts +51 -0
- package/dist/lookup/digest.d.ts.map +1 -0
- package/dist/lookup/digest.js +46 -0
- package/dist/lookup/digest.js.map +1 -0
- package/dist/lookup/index.d.ts +28 -0
- package/dist/lookup/index.d.ts.map +1 -0
- package/dist/lookup/index.js +27 -0
- package/dist/lookup/index.js.map +1 -0
- package/dist/lookup/install.d.ts +48 -0
- package/dist/lookup/install.d.ts.map +1 -0
- package/dist/lookup/install.js +315 -0
- package/dist/lookup/install.js.map +1 -0
- package/dist/lookup/pass.d.ts +55 -0
- package/dist/lookup/pass.d.ts.map +1 -0
- package/dist/lookup/pass.js +212 -0
- package/dist/lookup/pass.js.map +1 -0
- package/dist/lookup/pins.d.ts +34 -0
- package/dist/lookup/pins.d.ts.map +1 -0
- package/dist/lookup/pins.js +39 -0
- package/dist/lookup/pins.js.map +1 -0
- package/dist/lookup/provenance.d.ts +23 -0
- package/dist/lookup/provenance.d.ts.map +1 -0
- package/dist/lookup/provenance.js +78 -0
- package/dist/lookup/provenance.js.map +1 -0
- package/dist/lookup/readiness.d.ts +13 -0
- package/dist/lookup/readiness.d.ts.map +1 -0
- package/dist/lookup/readiness.js +57 -0
- package/dist/lookup/readiness.js.map +1 -0
- package/dist/lookup/resolve.d.ts +24 -0
- package/dist/lookup/resolve.d.ts.map +1 -0
- package/dist/lookup/resolve.js +201 -0
- package/dist/lookup/resolve.js.map +1 -0
- package/dist/lookup/store.d.ts +41 -0
- package/dist/lookup/store.d.ts.map +1 -0
- package/dist/lookup/store.js +74 -0
- package/dist/lookup/store.js.map +1 -0
- package/dist/model/access.d.ts +200 -0
- package/dist/model/access.d.ts.map +1 -0
- package/dist/model/access.js +125 -0
- package/dist/model/access.js.map +1 -0
- package/dist/model/artifact-members.d.ts +3 -0
- package/dist/model/artifact-members.d.ts.map +1 -0
- package/dist/model/artifact-members.js +38 -0
- package/dist/model/artifact-members.js.map +1 -0
- package/dist/model/composition.d.ts +47 -0
- package/dist/model/composition.d.ts.map +1 -0
- package/dist/model/composition.js +66 -0
- package/dist/model/composition.js.map +1 -0
- package/dist/model/domain.d.ts +51 -0
- package/dist/model/domain.d.ts.map +1 -0
- package/dist/model/domain.js +75 -0
- package/dist/model/domain.js.map +1 -0
- package/dist/model/duration.d.ts +31 -0
- package/dist/model/duration.d.ts.map +1 -0
- package/dist/model/duration.js +136 -0
- package/dist/model/duration.js.map +1 -0
- package/dist/model/errors.d.ts +58 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +81 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/evolution.d.ts +177 -0
- package/dist/model/evolution.d.ts.map +1 -0
- package/dist/model/evolution.js +5 -0
- package/dist/model/evolution.js.map +1 -0
- package/dist/model/expr-children.d.ts +15 -0
- package/dist/model/expr-children.d.ts.map +1 -0
- package/dist/model/expr-children.js +45 -0
- package/dist/model/expr-children.js.map +1 -0
- package/dist/model/guards.d.ts +9 -0
- package/dist/model/guards.d.ts.map +1 -0
- package/dist/model/guards.js +11 -0
- package/dist/model/guards.js.map +1 -0
- package/dist/model/input.d.ts +42 -0
- package/dist/model/input.d.ts.map +1 -0
- package/dist/model/input.js +26 -0
- package/dist/model/input.js.map +1 -0
- package/dist/model/integer.d.ts +14 -0
- package/dist/model/integer.d.ts.map +1 -0
- package/dist/model/integer.js +16 -0
- package/dist/model/integer.js.map +1 -0
- package/dist/model/intrinsic.d.ts +18 -0
- package/dist/model/intrinsic.d.ts.map +1 -0
- package/dist/model/intrinsic.js +21 -0
- package/dist/model/intrinsic.js.map +1 -0
- package/dist/model/layout.d.ts +129 -0
- package/dist/model/layout.d.ts.map +1 -0
- package/dist/model/layout.js +2 -0
- package/dist/model/layout.js.map +1 -0
- package/dist/model/media.d.ts +33 -0
- package/dist/model/media.d.ts.map +1 -0
- package/dist/model/media.js +86 -0
- package/dist/model/media.js.map +1 -0
- package/dist/model/members.generated.d.ts +11 -0
- package/dist/model/members.generated.d.ts.map +1 -0
- package/dist/model/members.generated.js +71 -0
- package/dist/model/members.generated.js.map +1 -0
- package/dist/model/row-address.d.ts +27 -0
- package/dist/model/row-address.d.ts.map +1 -0
- package/dist/model/row-address.js +146 -0
- package/dist/model/row-address.js.map +1 -0
- package/dist/model/schema.d.ts +108 -0
- package/dist/model/schema.d.ts.map +1 -0
- package/dist/model/schema.js +2 -0
- package/dist/model/schema.js.map +1 -0
- package/dist/model/shape.d.ts +193 -0
- package/dist/model/shape.d.ts.map +1 -0
- package/dist/model/shape.js +2 -0
- package/dist/model/shape.js.map +1 -0
- package/dist/model/time.d.ts +61 -0
- package/dist/model/time.d.ts.map +1 -0
- package/dist/model/time.js +110 -0
- package/dist/model/time.js.map +1 -0
- package/dist/model/types.d.ts +1329 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +424 -0
- package/dist/model/types.js.map +1 -0
- package/dist/model/values.d.ts +91 -0
- package/dist/model/values.d.ts.map +1 -0
- package/dist/model/values.js +195 -0
- package/dist/model/values.js.map +1 -0
- package/dist/model/wire.d.ts +356 -0
- package/dist/model/wire.d.ts.map +1 -0
- package/dist/model/wire.js +1504 -0
- package/dist/model/wire.js.map +1 -0
- package/dist/offline/index.d.ts +374 -0
- package/dist/offline/index.d.ts.map +1 -0
- package/dist/offline/index.js +422 -0
- package/dist/offline/index.js.map +1 -0
- package/dist/testing.d.ts +30 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +42 -0
- package/dist/testing.js.map +1 -0
- package/dist/version.d.ts +30 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +116 -0
- package/dist/version.js.map +1 -0
- package/package.json +98 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal.js","sourceRoot":"","sources":["../../src/expr/decimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,mDAAmD;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAmB;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC;;;;GAIG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C,CAAC;IAC9C,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACjE,OAAO,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import { Decimal } from 'decimal.js';\nimport { AxiomError } from '../model/errors.js';\nimport { isSafeInteger } from '../model/integer.js';\nimport type { DecimalString, RoundingMode } from '../model/types.js';\nimport { DECIMAL_TEXT_PATTERN, INTEGER_TEXT_PATTERN } from '../model/types.js';\nimport { workingDecimal } from './decimal-precision.js';\n\n/** Significant digits an exact decimal carries. */\nexport const DECIMAL_PRECISION = 34;\n\n/**\n * The fractional digits a canonical decimal value carries, `MODEL-2.1.27`.\n *\n * Canonical text admits no trailing fractional zero (`1.50` is refused as a non-canonical\n * spelling of `1.5`), so this is the scale the value states: `1.25` is two and `1.5` is one.\n * The two equal numbers that differ here are `1.5` and `1.50` as *authored text*, and only the\n * canonical one is a value; the count is still what a `maxScale` bound judges.\n */\nexport function fractionalDigitCount(text: DecimalString): number {\n const point = text.indexOf('.');\n return point === -1 ? 0 : text.length - point - 1;\n}\n\n/**\n * The decimal exponent range the runtime will render. Canonical text has\n * no exponent form, so a magnitude beyond this needs more integer (or leading fractional)\n * digits than the language's other text caps, and is refused rather than materialised. A\n * small authored expression can otherwise ask `pow` for a value whose text is petabytes\n * long: `2` raised to the largest canonical integer exponent is finite in decimal.js.\n *\n * Exported because a message count is admitted to the same budget before plural selection:\n * arithmetic and message rendering must not disagree about how wide a value the engine carries.\n */\nexport const MAX_DECIMAL_EXPONENT = 4096;\n\n/**\n * The runtime's own decimal constructor. Cloning keeps Axiom's precision and output\n * format out of the global `Decimal` configuration a host may already have changed,\n * and disabling exponent output keeps text canonical without a second formatting pass.\n */\nexport const AxiomDecimal: Decimal.Constructor = Decimal.clone({\n precision: DECIMAL_PRECISION,\n toExpNeg: -9e15,\n toExpPos: 9e15,\n});\n\nconst ROUNDING_MODES = {\n up: Decimal.ROUND_UP,\n down: Decimal.ROUND_DOWN,\n ceiling: Decimal.ROUND_CEIL,\n floor: Decimal.ROUND_FLOOR,\n half_up: Decimal.ROUND_HALF_UP,\n half_even: Decimal.ROUND_HALF_EVEN,\n} as const satisfies Record<RoundingMode, Decimal.Rounding>;\n\n/**\n * Significant digits: the digits that carry the value, so the trailing\n * zeros of `10^34` and the fractional zeros of a padded amount are not counted. Canonical\n * text never carries trailing *fractional* zeros, but an integer such as\n * `10000000000000000000000000000000000` carries 34 of them and is one digit wide.\n *\n * A single scan: the digits that carry the value sit between the first and last non-zero\n * digit, so only their positions matter. Successive `replace` passes allocated four\n * intermediate strings for every comparison in the evaluator.\n */\nfunction significantDigits(text: string): number {\n let first = -1;\n let last = -1;\n for (let index = 0; index < text.length; index += 1) {\n const code = text.charCodeAt(index);\n if (code < 49 || code > 57) continue; // skip the sign, the point and zeros\n if (first === -1) first = index;\n last = index;\n }\n if (first === -1) return 1;\n let digits = 0;\n for (let index = first; index <= last; index += 1) {\n const code = text.charCodeAt(index);\n if (code >= 48 && code <= 57) digits += 1;\n }\n return digits;\n}\n\n/**\n * Whether `text` is canonical decimal text: the shape pattern, less the one spelling (`-0`) the\n * pattern admits and the language refuses. Every entry below asks this function, so the brand has\n * one accept rule rather than a copy of it in each door.\n *\n * The `typeof` guard is what makes the predicate total. A JavaScript caller can hand a number\n * where the brand is expected, and `RegExp#test` would coerce `3` to `\"3\"` and return the\n * *number* carrying the brand: a value that is not text, which every later `startsWith` or\n * `charCodeAt` would read as one. A `DecimalString` is text or it is not one.\n */\nfunction isCanonicalDecimalText(text: unknown): text is DecimalString {\n return typeof text === 'string' && text !== '-0' && DECIMAL_TEXT_PATTERN.test(text);\n}\n\n/**\n * The authoring constructor of the `DecimalString` brand. Text that is not already canonical\n * decimal text is refused rather than normalised, because two spellings of one amount must not\n * be two values.\n *\n * The refusal repeats the text because its caller is an author reading a diagnostic about a\n * literal they just wrote, and seeing the spelling is what makes the fix obvious. A value a\n * person *submitted* is a different caller: `asWireDecimalString` is that door.\n */\nexport function asDecimalString(text: string, path = ''): DecimalString {\n if (!isCanonicalDecimalText(text)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `not canonical decimal text: ${String(text)}`,\n path,\n 'not canonical decimal text',\n );\n }\n return text;\n}\n\n/**\n * The wire constructor of the `DecimalString` brand: canonical decimal text as a submission\n * states it, refused with the path and the cause but never with the text.\n *\n * Both constructors accept exactly the same text; only the refusal differs. `asDecimalString`\n * echoes the value to the author who typed it, while this entry's caller is the wire reader\n * holding a value someone submitted — possibly for a field the artifact hides — and its\n * refusal is data: `evaluateSubmission` returns it as `detail`, which a backend may relay. The\n * path already names the seat the value was read from; repeating the text would add nothing an\n * operator can act on and everything a hidden field must not disclose.\n *\n * The path is required. A refusal about an untrusted value at no stated place is a refusal an\n * operator cannot trace, and the wire reader always knows the path it read.\n */\nexport function asWireDecimalString(text: string, path: string): DecimalString {\n if (!isCanonicalDecimalText(text)) {\n throw new AxiomError('ENGINE_ERROR', 'not canonical decimal text', path);\n }\n return text;\n}\n\n/**\n * Whether text's integer and fractional runs are both inside the exponent budget.\n *\n * The budget is a count of digits in the rendered text: at most `MAX_DECIMAL_EXPONENT` integer\n * digits and at most `MAX_DECIMAL_EXPONENT` fraction digits. In terms of the leading digit's\n * exponent that is `-MAX_DECIMAL_EXPONENT <= e <= MAX_DECIMAL_EXPONENT - 1`, which is the same\n * bound `exponentFitsRenderedText` applies to a decimal.js value. The same predicate decides\n * the refusal and the miss, so `parse_decimal` cannot answer a value the arithmetic cannot\n * carry: a value the renderers admit is a value every operand reader admits.\n */\nfunction exponentWithinBudget(text: string): boolean {\n const unsigned = text.startsWith('-') ? text.slice(1) : text;\n const point = unsigned.indexOf('.');\n const whole = point === -1 ? unsigned.length : point;\n const fraction = point === -1 ? 0 : unsigned.length - point - 1;\n return whole <= MAX_DECIMAL_EXPONENT && fraction <= MAX_DECIMAL_EXPONENT;\n}\n\n/**\n * Whether a leading-digit exponent renders inside the budget.\n *\n * A decimal with exponent `e` has `e + 1` integer digits when `e >= 0`, and `-e` fraction digits\n * when `e < 0` (there is a single `0` before the point). So the text bound above is exactly\n * `e <= MAX_DECIMAL_EXPONENT - 1` and `e >= -MAX_DECIMAL_EXPONENT`. Checking this before\n * rendering is what keeps `pow(10, 4096)` from producing the 4,097-digit text `+`, `round` and\n * `parse_decimal` all refuse (`EXPR-11.1.2`).\n */\nfunction exponentFitsRenderedText(exponent: number): boolean {\n return exponent <= MAX_DECIMAL_EXPONENT - 1 && exponent >= -MAX_DECIMAL_EXPONENT;\n}\n\n/** The one refusal for a value whose rendered text exceeds the exponent budget. */\nfunction magnitudeExceeded(path: string): AxiomError {\n return new AxiomError(\n 'ENGINE_ERROR',\n `decimal magnitude exceeds ${String(MAX_DECIMAL_EXPONENT)} digits before or after the point`,\n path,\n );\n}\n\n/**\n * Refuses text whose integer or fractional run is longer than the exponent budget, so a scale\n * that would make the scaling multiply enormous is refused before the arithmetic starts.\n */\nfunction assertExponentWithinBudget(text: string, path: string): void {\n if (exponentWithinBudget(text)) return;\n throw magnitudeExceeded(path);\n}\n\n/**\n * Canonical decimal text the numeric budget can carry, or `undefined` when the text is\n * not one. `parse_decimal` answers from this rather than from a thrown refusal, so text a\n * caller typed is an ordinary `null` result and never an engine error\n *\n */\nexport function tryDecimalString(text: string): DecimalString | undefined {\n if (!isCanonicalDecimalText(text)) return undefined;\n if (!exponentWithinBudget(text)) return undefined;\n if (significantDigits(text) > DECIMAL_PRECISION) return undefined;\n return text;\n}\n\n/**\n * Parses text the brand already proved canonical, holding it to the literal budget.\n *\n * `parseDecimal` is the literal reader: the compiler uses it to refuse a literal the language\n * cannot carry. Arithmetic operands are different: a stored value the wire accepted must be\n * rounded or divided as the value it is, so those paths parse at a working precision derived\n * from the operand and apply the budget to the result instead.\n */\nfunction parseCanonicalDecimal(text: DecimalString, path: string): Decimal {\n if (significantDigits(text) > DECIMAL_PRECISION) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `decimal carries more than ${DECIMAL_PRECISION} significant digits: ${text}`,\n path,\n `decimal carries more than ${String(DECIMAL_PRECISION)} significant digits`,\n );\n }\n // A literal is read by the same budget every operand reader applies, so the compiler cannot\n // admit a spelling arithmetic would later refuse (`tryDecimalString` and `toScaledInteger`).\n assertExponentWithinBudget(text, path);\n return new AxiomDecimal(text);\n}\n\n/** Parses canonical decimal text as a literal, refusing anything the literal budget cannot carry. */\nexport function parseDecimal(text: string, path = ''): Decimal {\n return parseCanonicalDecimal(asDecimalString(text, path), path);\n}\n\n/** Renders a finite decimal as canonical text, normalising `-0` to `0`. */\nexport function canonicalDecimal(value: Decimal, path = ''): DecimalString {\n if (!value.isFinite()) {\n throw new AxiomError('ENGINE_ERROR', 'decimal is not finite', path);\n }\n // The exponent is checked before rendering: `toFixed` on an out-of-range magnitude\n // would build the text this bound exists to refuse. The bound is the same one\n // `exponentWithinBudget` applies to canonical text, so this value is a valid operand.\n if (!exponentFitsRenderedText(value.e)) {\n throw magnitudeExceeded(path);\n }\n // Decimal#toFixed never uses exponential notation and drops trailing zeros.\n const text = value.isZero() ? '0' : value.toFixed();\n // The leading digit's exponent does not bound the fraction run: significant digits far from\n // the point render a run longer than the budget (a product of two wide operands is the case\n // that found this). The operand reader would refuse that text, so the renderer must too.\n if (!exponentWithinBudget(text)) {\n throw magnitudeExceeded(path);\n }\n // A result that needs more than 34 significant digits has no exact spelling in this\n // language, so it fails rather than being silently rounded to the working precision.\n // `round` and the explicit division path apply the same budget through `fromScaledInteger`; `pow` renders\n // through here.\n if (significantDigits(text) > DECIMAL_PRECISION) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `decimal result carries more than ${String(DECIMAL_PRECISION)} significant digits`,\n path,\n );\n }\n return asDecimalString(text, path);\n}\n\nconst ROUNDING_MODE_NAMES: readonly RoundingMode[] = [\n 'up',\n 'down',\n 'ceiling',\n 'floor',\n 'half_up',\n 'half_even',\n];\n\n/**\n * Rounds a positive magnitude held as `quotient + remainder/divisor` to an integer under\n * `mode`. `negative` is the sign of the exact value; the caller has already shown the\n * remainder is below one unit and is non-zero.\n *\n * The six modes are decided over integers, so a result exactly at a tie is known rather than\n * inferred from a truncated decimal expansion.\n */\nfunction roundMagnitude(\n quotient: bigint,\n remainder: bigint,\n divisor: bigint,\n mode: RoundingMode,\n negative: boolean,\n): bigint {\n if (remainder === 0n) return quotient;\n const twice = remainder * 2n;\n switch (mode) {\n // Away from zero: the magnitude grows whatever the sign.\n case 'up':\n return quotient + 1n;\n // Toward zero: the truncated magnitude stands.\n case 'down':\n return quotient;\n case 'ceiling':\n return negative ? quotient : quotient + 1n;\n case 'floor':\n return negative ? quotient + 1n : quotient;\n case 'half_up':\n return twice >= divisor ? quotient + 1n : quotient;\n case 'half_even':\n if (twice > divisor) return quotient + 1n;\n if (twice < divisor) return quotient;\n return quotient % 2n === 0n ? quotient : quotient + 1n;\n }\n}\n\n/**\n * Rounds a decimal to `scale` fraction digits and renders the canonical result. An\n * unknown mode is refused rather than defaulted: a silent `half_up` would be a rounding\n * policy the artifact never declared.\n *\n * The operand is rounded as the exact integer it is, so a stored value above the result\n * budget is accepted and only the rendered result is held to 34 significant digits.\n */\nexport function roundDecimal(\n value: DecimalString,\n scale: number,\n mode: RoundingMode,\n path = '',\n): DecimalString {\n if (!Number.isInteger(scale) || scale < 0 || scale > DECIMAL_PRECISION) {\n throw new AxiomError('ENGINE_ERROR', `scale out of range: ${String(scale)}`, path);\n }\n if (!ROUNDING_MODE_NAMES.includes(mode)) {\n throw new AxiomError('ENGINE_ERROR', `unknown rounding mode: ${String(mode)}`, path);\n }\n const { units, scale: current } = toScaledInteger(value, path);\n if (current <= scale) {\n // Fewer fraction digits than the target scale: the value is already that exact, and the\n // canonical render drops the padding.\n return fromScaledInteger({ units: units * 10n ** BigInt(scale - current), scale }, path);\n }\n const divisor = 10n ** BigInt(current - scale);\n const magnitude = units < 0n ? -units : units;\n const rounded = roundMagnitude(\n magnitude / divisor,\n magnitude % divisor,\n divisor,\n mode,\n units < 0n,\n );\n return fromScaledInteger({ units: units < 0n ? -rounded : rounded, scale }, path);\n}\n\n/**\n * The order of two digits strings of the same length: code-unit order is digit order.\n */\nfunction compareDigitRuns(left: string, right: string): number {\n for (let index = 0; index < left.length; index += 1) {\n const a = left.charCodeAt(index);\n const b = right.charCodeAt(index);\n if (a !== b) return a < b ? -1 : 1;\n }\n return 0;\n}\n\n/**\n * Compares two unsigned canonical decimals by their digits. The integer run decides first\n * because canonical text has no leading zeros beyond `0` itself, so the longer run is the\n * larger magnitude; equal runs then compare digit by digit, and the fraction is compared as\n * a zero-padded run because a missing digit is a zero.\n */\nfunction compareMagnitudes(left: string, right: string): number {\n const leftPoint = left.indexOf('.');\n const rightPoint = right.indexOf('.');\n const leftWhole = leftPoint === -1 ? left : left.slice(0, leftPoint);\n const rightWhole = rightPoint === -1 ? right : right.slice(0, rightPoint);\n if (leftWhole.length !== rightWhole.length) {\n return leftWhole.length < rightWhole.length ? -1 : 1;\n }\n const wholeOrder = compareDigitRuns(leftWhole, rightWhole);\n if (wholeOrder !== 0) return wholeOrder;\n const leftFraction = leftPoint === -1 ? '' : left.slice(leftPoint + 1);\n const rightFraction = rightPoint === -1 ? '' : right.slice(rightPoint + 1);\n const width = Math.max(leftFraction.length, rightFraction.length);\n for (let index = 0; index < width; index += 1) {\n const a = index < leftFraction.length ? leftFraction.charCodeAt(index) : 48;\n const b = index < rightFraction.length ? rightFraction.charCodeAt(index) : 48;\n if (a !== b) return a < b ? -1 : 1;\n }\n return 0;\n}\n\n/**\n * Exact comparison of two canonical decimals: negative when `a` sorts first, zero when they\n * are the same value, positive otherwise.\n *\n * Comparison is not arithmetic, so it applies no significant-digit budget: a canonical value\n * the wire accepted is compared as the digits it carries, and `x == x` holds for a value longer\n * than the 34-digit arithmetic result budget. The text is still validated, so a spelling the\n * brand never produced cannot be read as a value.\n */\nexport function compareDecimalTexts(a: DecimalString, b: DecimalString, path = ''): number {\n const left = asDecimalString(a, path);\n const right = asDecimalString(b, path);\n if (left === right) return 0;\n const leftNegative = left.startsWith('-');\n const rightNegative = right.startsWith('-');\n if (leftNegative !== rightNegative) return leftNegative ? -1 : 1;\n const order = compareMagnitudes(\n leftNegative ? left.slice(1) : left,\n rightNegative ? right.slice(1) : right,\n );\n return leftNegative ? -order : order;\n}\n\ninterface ScaledInteger {\n readonly units: bigint;\n readonly scale: number;\n}\n\n/**\n * Splits canonical decimal text into an exact integer and its decimal scale. The text is\n * checked first: `BigInt('01')` would read as `1`, silently normalising a value whose\n * spelling is not canonical.\n */\nfunction toScaledInteger(text: DecimalString, path: string): ScaledInteger {\n asDecimalString(text, path);\n // The bound is applied here, before any bigint exists: a value with 200 000 fraction digits\n // carries one significant digit, so the precision check admits it, and summing it against an\n // ordinary amount would then compute `10n ** 200000` per element.\n assertExponentWithinBudget(text, path);\n const negative = text.startsWith('-');\n const unsigned = negative ? text.slice(1) : text;\n const point = unsigned.indexOf('.');\n const whole = point === -1 ? unsigned : unsigned.slice(0, point);\n const fraction = point === -1 ? '' : unsigned.slice(point + 1);\n const units = BigInt(`${whole}${fraction}`);\n return { units: negative ? -units : units, scale: fraction.length };\n}\n\n/**\n * Renders a scaled integer as canonical decimal text inside the exponent budget, or `undefined`\n * when the text would exceed it.\n *\n * The magnitude bound is a bound on the spelling rather than on the arithmetic, so the miss is\n * distinct from the 34-significant-digit result budget: an operation that answers `UNKNOWN` for\n * an over-budget result (`avg`, `median`) can ask whether the spelling fits instead of turning\n * that answer into an engine error.\n */\nfunction renderScaledIntegerWithinBudget(\n { units, scale }: ScaledInteger,\n path = '',\n): DecimalString | undefined {\n if (units === 0n) return asDecimalString('0', path);\n const negative = units < 0n;\n const magnitude = (negative ? -units : units).toString();\n const exponent = magnitude.length - scale - 1;\n if (!exponentFitsRenderedText(exponent)) return undefined;\n const digits = magnitude.padStart(scale + 1, '0');\n const whole = digits.slice(0, digits.length - scale);\n const fraction = digits.slice(digits.length - scale).replace(/0+$/, '');\n const text = fraction === '' ? whole : `${whole}.${fraction}`;\n const rendered = negative ? `-${text}` : text;\n // The pre-render guard checks the leading digit, which does not bound a fraction run whose\n // last significant digit sits far from the point. `+`, `*` and `-` render through here, so\n // without this a result could be text no operand reader accepts.\n if (!exponentWithinBudget(rendered)) return undefined;\n return asDecimalString(rendered, path);\n}\n\n/** Renders a scaled integer, refusing text that exceeds the exponent budget. */\nfunction renderScaledInteger(scaled: ScaledInteger, path = ''): DecimalString {\n const text = renderScaledIntegerWithinBudget(scaled, path);\n if (text === undefined) throw magnitudeExceeded(path);\n return text;\n}\n\nfunction fromScaledInteger(scaled: ScaledInteger, path = ''): DecimalString {\n const text = renderScaledInteger(scaled, path);\n if (significantDigits(text) > DECIMAL_PRECISION) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `exact result carries more than ${DECIMAL_PRECISION} significant digits`,\n path,\n );\n }\n return text;\n}\n\n/**\n * Sums canonical decimals exactly, as an unreduced scaled integer.\n *\n * This is the *arithmetic*: no significant-digit budget is applied, because the budget belongs\n * to a result rather than to a total an operation later divides. `avg` over two 34-digit\n * decimals has a 35-digit total whose exact mean fits 34 digits; rendering the total here\n * would refuse a legal answer. The exponent bound still applies per operand.\n */\nfunction sumScaledIntegers(values: readonly DecimalString[], path: string): ScaledInteger {\n let scale = 0;\n const scaled = values.map((value) => {\n const item = toScaledInteger(value, path);\n scale = Math.max(scale, item.scale);\n return item;\n });\n let total = 0n;\n for (const item of scaled) {\n total += item.units * 10n ** BigInt(scale - item.scale);\n }\n return { units: total, scale };\n}\n\n/**\n * Sums canonical decimals exactly. Accumulation is integer arithmetic over a common\n * scale rather than `Decimal#plus`, because the 34-digit constructor rounds mid-sum\n * and requires a budget overflow to fail instead of rounding.\n */\nexport function sumDecimalTexts(values: readonly DecimalString[], path = ''): DecimalString {\n return fromScaledInteger(sumScaledIntegers(values, path), path);\n}\n\n/** `-value` in canonical text, with negative zero normalised to `0`. */\nexport function negateDecimalText(value: DecimalString, path = ''): DecimalString {\n if (value === '0') return value;\n return asDecimalString(value.startsWith('-') ? value.slice(1) : `-${value}`, path);\n}\n\n/** `a - b` in canonical text: exact, so a 34-digit overflow fails rather than rounds. */\nexport function subtractDecimalTexts(\n minuend: DecimalString,\n subtrahend: DecimalString,\n path = '',\n): DecimalString {\n return sumDecimalTexts([minuend, negateDecimalText(subtrahend, path)], path);\n}\n\n/** `a * b` in canonical text, exactly, through the same scaled-integer path as `+`/`-`. */\nexport function multiplyDecimalTexts(\n left: DecimalString,\n right: DecimalString,\n path = '',\n): DecimalString {\n const a = toScaledInteger(left, path);\n const b = toScaledInteger(right, path);\n return fromScaledInteger({ units: a.units * b.units, scale: a.scale + b.scale }, path);\n}\n\n/** The decimal digit count of a positive bigint, one for zero. */\nfunction digitCount(value: bigint): number {\n return value === 0n ? 1 : value.toString().length;\n}\n\n/**\n * `a / b` at the language's 34 significant digits, rounded once with `half_even`.\n *\n * The quotient is decided over the operands' exact scaled integers, so a repeating expansion\n * is rounded from the exact rational rather than from an already-rounded intermediate. The\n * operands are not rounded to the result budget before the division: only the rendered result\n * is held to 34 significant digits, exactly as `+`, `-` and `*` hold their results.\n *\n * This is the `/` operator's arithmetic. A stated number of fraction digits is a composition:\n * `round(a / b, places)`, or one of its named siblings.\n */\nexport function divideDecimalTexts(\n dividend: DecimalString,\n divisor: DecimalString,\n path = '',\n): DecimalString {\n const a = toScaledInteger(dividend, path);\n const b = toScaledInteger(divisor, path);\n if (b.units === 0n) {\n throw new AxiomError('ENGINE_ERROR', '/ divisor is zero', path);\n }\n const numerator = a.units * 10n ** BigInt(b.scale);\n const denominator = b.units * 10n ** BigInt(a.scale);\n const negative = numerator < 0n !== denominator < 0n;\n const magnitudeNumerator = numerator < 0n ? -numerator : numerator;\n const magnitudeDenominator = denominator < 0n ? -denominator : denominator;\n if (magnitudeNumerator === 0n) return asDecimalString('0', path);\n // The leading digit's exponent, from digit counts rather than a binary float: the quotient\n // sits in [10^(e-1), 10^e), so one exact comparison fixes which side of the estimate it is on.\n let exponent = digitCount(magnitudeNumerator) - digitCount(magnitudeDenominator);\n const compareToEstimate =\n exponent >= 0\n ? magnitudeNumerator >= magnitudeDenominator * 10n ** BigInt(exponent)\n : magnitudeNumerator * 10n ** BigInt(-exponent) >= magnitudeDenominator;\n if (!compareToEstimate) exponent -= 1;\n const divideAt = (shift: number): bigint => {\n const scaledNumerator =\n shift >= 0 ? magnitudeNumerator * 10n ** BigInt(shift) : magnitudeNumerator;\n const scaledDenominator =\n shift >= 0 ? magnitudeDenominator : magnitudeDenominator * 10n ** BigInt(-shift);\n return roundMagnitude(\n scaledNumerator / scaledDenominator,\n scaledNumerator % scaledDenominator,\n scaledDenominator,\n 'half_even',\n false,\n );\n };\n let shift = DECIMAL_PRECISION - 1 - exponent;\n let rounded = divideAt(shift);\n // Rounding 9.99… up to 10.0… carries one digit, so the exponent moves with it.\n if (rounded >= 10n ** BigInt(DECIMAL_PRECISION)) {\n exponent += 1;\n shift -= 1;\n rounded = divideAt(shift);\n }\n const signed = negative ? -rounded : rounded;\n const trailingExponent = exponent - DECIMAL_PRECISION + 1;\n if (trailingExponent >= 0) {\n return fromScaledInteger({ units: signed * 10n ** BigInt(trailingExponent), scale: 0 }, path);\n }\n return fromScaledInteger({ units: signed, scale: -trailingExponent }, path);\n}\n\n/**\n * `pow(a, b)` for a non-negative integer exponent: repeated multiplication through the same\n * exact path `*` uses. An intermediate or final result beyond 34 significant digits is\n * `ENGINE_ERROR`, exactly as the equivalent chain of `*` would be.\n */\nexport function powDecimalTexts(base: DecimalString, exponent: number, path = ''): DecimalString {\n if (!Number.isInteger(exponent) || exponent < 0) {\n throw new AxiomError('ENGINE_ERROR', 'pow requires a non-negative integer exponent', path);\n }\n if (exponent === 0) return asDecimalString('1', path);\n let result = asDecimalString('1', path);\n let factor = base;\n let remaining = exponent;\n while (remaining > 0) {\n if (remaining % 2 === 1) result = multiplyDecimalTexts(result, factor, path);\n remaining = Math.floor(remaining / 2);\n if (remaining > 0) factor = multiplyDecimalTexts(factor, factor, path);\n }\n return result;\n}\n\n/**\n * `a / b`, rounded to `scale` with `mode`; a zero divisor is `ENGINE_ERROR`.\n *\n * The operands are scaled integers, so the quotient is decided with integer division and the\n * remainder: no working precision, no double rounding. That keeps the exact-rational guarantee\n * for every operand the wire admits, and only the rendered result is held to the 34-digit\n * result budget.\n */\nexport function divideRoundDecimal(\n dividend: DecimalString,\n divisor: DecimalString,\n scale: number,\n mode: RoundingMode,\n path = '',\n): DecimalString {\n if (!ROUNDING_MODE_NAMES.includes(mode)) {\n throw new AxiomError('ENGINE_ERROR', `unknown rounding mode: ${String(mode)}`, path);\n }\n if (!Number.isInteger(scale) || scale < 0 || scale > DECIMAL_PRECISION) {\n throw new AxiomError('ENGINE_ERROR', `scale out of range: ${String(scale)}`, path);\n }\n const a = toScaledInteger(dividend, path);\n const b = toScaledInteger(divisor, path);\n if (b.units === 0n) {\n throw new AxiomError('ENGINE_ERROR', 'divisor is zero', path);\n }\n // (A / 10^sa) / (B / 10^sb) * 10^scale = A * 10^(sb + scale) / (B * 10^sa).\n const numerator = a.units * 10n ** BigInt(b.scale + scale);\n const denominator = b.units * 10n ** BigInt(a.scale);\n const negative = numerator < 0n !== denominator < 0n;\n const magnitudeNumerator = numerator < 0n ? -numerator : numerator;\n const magnitudeDenominator = denominator < 0n ? -denominator : denominator;\n const rounded = roundMagnitude(\n magnitudeNumerator / magnitudeDenominator,\n magnitudeNumerator % magnitudeDenominator,\n magnitudeDenominator,\n mode,\n negative,\n );\n return fromScaledInteger({ units: negative ? -rounded : rounded, scale }, path);\n}\n\n/** A non-integer exponent must round inside six fraction digits. */\nexport const POW_EXPONENT_SCALE_LIMIT = 6;\n\n/**\n * The working precision for one arithmetic operand: never below the result budget, and high\n * enough to hold every significant digit the wire admitted. An operand is not rounded down to\n * the result budget before it is used; only the rendered result is held to that budget.\n */\nfunction operandPrecision(text: DecimalString): number {\n return Math.max(DECIMAL_PRECISION, significantDigits(text));\n}\n\n/**\n * Parses an arithmetic operand exactly at `precision`, refusing only a magnitude the exponent\n * bound cannot carry. The working precision is at least the operand's significant digits, so\n * the value is not rounded before the operation runs.\n *\n * The constructor comes from `decimal-precision.ts`, which caps what it keeps: the widths a\n * stored decimal can name are bounded only by the exponent budget, so a per-width cache is a\n * process-global map an untrusted record can grow.\n */\nfunction parseWorkingDecimal(text: DecimalString, precision: number, path: string): Decimal {\n asDecimalString(text, path);\n assertExponentWithinBudget(text, path);\n const Working = workingDecimal(precision, DECIMAL_PRECISION, AxiomDecimal);\n return new Working(text);\n}\n\n/**\n * `x ^ y` computed at a working precision that holds the operands, then always rounded to\n * `scale` before it is returned. For operands inside the 34-digit budget this is the 34-digit\n * internal precision; a wider stored operand raises the working precision rather than being\n * rounded down. A negative base with a fractional exponent and a zero base with a negative\n * exponent have no exact decimal value, so they are `ENGINE_ERROR` rather than a silent `NaN`\n * or `Infinity`.\n */\nexport function powDecimal(\n base: DecimalString,\n exponent: DecimalString,\n scale: number,\n mode: RoundingMode,\n path = '',\n): DecimalString {\n if (!ROUNDING_MODE_NAMES.includes(mode)) {\n throw new AxiomError('ENGINE_ERROR', `unknown rounding mode: ${String(mode)}`, path);\n }\n if (!Number.isInteger(scale) || scale < 0 || scale > DECIMAL_PRECISION) {\n throw new AxiomError('ENGINE_ERROR', `scale out of range: ${String(scale)}`, path);\n }\n // Each operand is held exactly, at its own width. The power is computed at the base's\n // working precision, so a wide exponent does not inflate the arithmetic.\n const power = parseWorkingDecimal(exponent, operandPrecision(exponent), path);\n if (!power.isInteger() && scale > POW_EXPONENT_SCALE_LIMIT) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `pow with a fractional exponent requires a scale of at most ${String(POW_EXPONENT_SCALE_LIMIT)}`,\n path,\n );\n }\n const result = parseWorkingDecimal(base, operandPrecision(base), path).pow(power);\n if (!result.isFinite()) {\n throw new AxiomError('ENGINE_ERROR', 'pow has no exact decimal result', path);\n }\n return canonicalDecimal(result.toDecimalPlaces(scale, ROUNDING_MODES[mode]), path);\n}\n\n/**\n * `pow(a, b)` when the exponent is fractional or negative: the power at the language's\n * arithmetic precision, rounded once to 34 significant digits with `half_even`.\n */\nexport function powToPrecisionDecimal(\n base: DecimalString,\n exponent: DecimalString,\n path = '',\n): DecimalString {\n const power = parseWorkingDecimal(exponent, operandPrecision(exponent), path);\n const value = parseWorkingDecimal(base, operandPrecision(base), path).pow(power);\n if (!value.isFinite()) {\n throw new AxiomError('ENGINE_ERROR', 'pow has no exact decimal result', path);\n }\n return canonicalDecimal(\n value.toSignificantDigits(DECIMAL_PRECISION, ROUNDING_MODES.half_even),\n path,\n );\n}\n\n/**\n * `abs(x)`: the magnitude of a canonical decimal, exactly. Negating text is a sign flip, not an\n * arithmetic operation, so no digit is touched and a 34-digit operand stays 34 digits.\n */\nexport function absDecimalText(value: DecimalString, path = ''): DecimalString {\n asDecimalString(value, path);\n return value.startsWith('-') ? asDecimalString(value.slice(1), path) : value;\n}\n\n/**\n * `ceil(x)` / `floor(x)` at scale zero, as a canonical integer.\n *\n * The modes are the language's own: `ceiling` is toward positive infinity and `floor` toward\n * negative infinity, so `ceil(-2.1)` is `-2` and `floor(-2.1)` is `-3` (`EXPR-11.1.11`,\n * `EXPR-11.1.12`). `roundDecimal` already decides both over integers, so this is the one\n * rounding implementation with a domain cast on top: a result outside the canonical integer\n * range is an engine error rather than a lossy `Number`.\n */\nfunction integralRounded(value: DecimalString, op: 'ceil' | 'floor', path: string): number {\n const rounded = roundDecimal(value, 0, op === 'ceil' ? 'ceiling' : 'floor', path);\n if (!INTEGER_TEXT_PATTERN.test(rounded)) {\n // Rounding at scale zero always renders an integer; a fraction here is a contract\n // violation in `roundDecimal`, not a value the caller can act on.\n throw new AxiomError('ENGINE_ERROR', `${op} produced a non-integer result`, path);\n }\n const result = Number(rounded);\n if (!isSafeInteger(result)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `${op} result is outside the canonical integer range`,\n path,\n );\n }\n return result;\n}\n\n/** `ceil(x)`: the least integer not below `x`, toward positive infinity. */\nexport function ceilDecimal(value: DecimalString, path = ''): number {\n return integralRounded(asDecimalString(value, path), 'ceil', path);\n}\n\n/** `floor(x)`: the greatest integer not above `x`, toward negative infinity. */\nexport function floorDecimal(value: DecimalString, path = ''): number {\n return integralRounded(asDecimalString(value, path), 'floor', path);\n}\n\n/** Euclid's algorithm over the magnitudes the scaled-integer paths produce. */\nfunction greatestCommonDivisor(left: bigint, right: bigint): bigint {\n let a = left < 0n ? -left : left;\n let b = right;\n while (b !== 0n) {\n const remainder = a % b;\n a = b;\n b = remainder;\n }\n return a;\n}\n\n/**\n * `sum(values) / values.length` as exact decimal text, or `undefined` when the quotient has no\n * finite base-10 expansion the language can carry: a reduced denominator with a prime factor\n * other than `2` or `5`, the exponent budget, or the 34-significant-digit result budget.\n * The language carries exact decimals, so an average that cannot be written down exactly is\n * undecided rather than rounded: `avg([1, 2, 2])` is `UNKNOWN`, and an author who wants a\n * stated precision writes `round(sum(xs) / count(xs), places)` (`EXPR-10.2.7`). The\n * test is arithmetic on the reduced fraction, not a float approximation: the denominator of\n * an exact decimal may divide only by `2` and `5`.\n *\n * An empty list has no count to divide by, so the caller answers `UNKNOWN` before this runs.\n */\nexport function exactAverageDecimalTexts(\n values: readonly DecimalString[],\n path = '',\n): DecimalString | undefined {\n if (values.length === 0) return undefined;\n // The total is an intermediate: it may carry one more digit than the 34-digit result\n // budget and still have an exact mean inside it (`999…9` twice has `1999…8` as its total\n // and `999…9` as its mean). Only the rendered quotient meets the budget.\n const { units, scale } = sumScaledIntegers(values, path);\n if (units === 0n) return asDecimalString('0', path);\n let numerator = units;\n let denominator = BigInt(values.length) * 10n ** BigInt(scale);\n const divisor = greatestCommonDivisor(numerator, denominator);\n numerator /= divisor;\n denominator /= divisor;\n // The reduced denominator is what the render divides by; the factor walk below consumes its\n // copy to learn how many fraction digits it needs, so the original is kept.\n const reducedDenominator = denominator;\n let twos = 0;\n let fives = 0;\n while (denominator % 2n === 0n) {\n denominator /= 2n;\n twos += 1;\n }\n while (denominator % 5n === 0n) {\n denominator /= 5n;\n fives += 1;\n }\n // Any other prime factor repeats forever in base 10, so no decimal spelling exists.\n if (denominator !== 1n) return undefined;\n const digits = Math.max(twos, fives);\n // `10^digits` carries enough powers of both primes, so this division is exact. The fraction\n // run may exceed 34 digits while the significant digits fit — a small mean with many leading\n // fractional zeros is the case that found this — so only the rendered value's significant\n // digits and exponent budget decide the answer.\n const rendered = renderScaledIntegerWithinBudget(\n {\n units: (numerator * 10n ** BigInt(digits)) / reducedDenominator,\n scale: digits,\n },\n path,\n );\n if (rendered === undefined) return undefined;\n return significantDigits(rendered) > DECIMAL_PRECISION ? undefined : rendered;\n}\n\n/**\n * `(a + b) / 2`, exactly. Halving appends one fraction digit and multiplies the magnitude by\n * five, so a midpoint always terminates; `undefined` when the midpoint's rendered text exceeds\n * the exponent budget or needs more than the 34-digit result budget (`EXPR-10.2.8`), which the\n * caller answers as `UNKNOWN` rather than an engine error. The sum is an intermediate and\n * carries no budget of its own.\n */\nfunction midpointDecimalTexts(\n first: DecimalString,\n second: DecimalString,\n path = '',\n): DecimalString | undefined {\n const total = sumScaledIntegers([first, second], path);\n if (total.units === 0n) return asDecimalString('0', path);\n const rendered = renderScaledIntegerWithinBudget(\n { units: total.units * 5n, scale: total.scale + 1 },\n path,\n );\n if (rendered === undefined) return undefined;\n return significantDigits(rendered) > DECIMAL_PRECISION ? undefined : rendered;\n}\n\n/**\n * `median(values)`: the middle value of the canonical decimal order, or the exact midpoint of\n * the two middle values for an even count.\n *\n * Ordering is `compareDecimalTexts`, the exact decimal comparison `==` and `<` already use, so\n * no value passes through a binary float and two spellings of one amount cannot split a list.\n * An empty list has no element to choose, so the caller answers `UNKNOWN`.\n */\nexport function medianDecimalTexts(\n values: readonly DecimalString[],\n path = '',\n): DecimalString | undefined {\n if (values.length === 0) return undefined;\n const ordered = [...values].sort((left, right) => compareDecimalTexts(left, right, path));\n const middle = Math.floor(ordered.length / 2);\n if (ordered.length % 2 === 1) return ordered[middle];\n const lower = ordered[middle - 1];\n const upper = ordered[middle];\n if (lower === undefined || upper === undefined) return undefined;\n return midpointDecimalTexts(lower, upper, path);\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BuiltinOperator } from '../model/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The built-ins a v1 document may still write but should stop writing.
|
|
4
|
+
*
|
|
5
|
+
* `EXPR-1.1.4` permits only additive changes within v1, so a name cannot be removed from the
|
|
6
|
+
* language while a v1 artifact that uses it remains in retention. Deprecation is the step before
|
|
7
|
+
* that: the compiler accepts the call and returns a `DEPRECATED_BUILTIN` warning, the runtime
|
|
8
|
+
* keeps answering it, and the generated reference page marks it. Removal is an `exprVersion: 2`
|
|
9
|
+
* change, and the v1 evaluator must still answer the name while v1 artifacts are retained.
|
|
10
|
+
*
|
|
11
|
+
* The registry is the single source for the compiler warning and the documentation marker. A name
|
|
12
|
+
* is keyed by `BuiltinOperator`, so a typo or a name that is not in the closed set fails
|
|
13
|
+
* typecheck rather than shipping a deprecation nobody can trigger.
|
|
14
|
+
*/
|
|
15
|
+
export interface DeprecatedBuiltin {
|
|
16
|
+
/** The callable name the compiler warns about. */
|
|
17
|
+
readonly name: BuiltinOperator;
|
|
18
|
+
/** The source form an author should write instead. */
|
|
19
|
+
readonly replacement: string;
|
|
20
|
+
/** Why the name is being retired, in one sentence an author can act on. */
|
|
21
|
+
readonly reason: string;
|
|
22
|
+
/** The package version that first deprecated the name. */
|
|
23
|
+
readonly since: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The names deprecated within Expr v1.
|
|
27
|
+
*
|
|
28
|
+
* `member` is the first entry. The postfix read (`lookup(t, [k]).col`) is the author surface the
|
|
29
|
+
* grammar defines (`EXPR-7.1.5`); the direct `member(record, "name")` call is the AST form that
|
|
30
|
+
* surface lowers to. An author who spells the call is writing an internal node by hand, so the
|
|
31
|
+
* compiler points at the source form and still compiles the expression.
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEPRECATED_BUILTINS: readonly DeprecatedBuiltin[];
|
|
34
|
+
//# sourceMappingURL=deprecations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecations.d.ts","sourceRoot":"","sources":["../../src/expr/deprecations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAQ3D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names deprecated within Expr v1.
|
|
3
|
+
*
|
|
4
|
+
* `member` is the first entry. The postfix read (`lookup(t, [k]).col`) is the author surface the
|
|
5
|
+
* grammar defines (`EXPR-7.1.5`); the direct `member(record, "name")` call is the AST form that
|
|
6
|
+
* surface lowers to. An author who spells the call is writing an internal node by hand, so the
|
|
7
|
+
* compiler points at the source form and still compiles the expression.
|
|
8
|
+
*/
|
|
9
|
+
export const DEPRECATED_BUILTINS = [
|
|
10
|
+
{
|
|
11
|
+
name: 'member',
|
|
12
|
+
replacement: 'a postfix member read such as `lookup(t, [k]).col`, or a member path such as `f_record.f_name`',
|
|
13
|
+
reason: 'the direct call is the compiled form, not the authoring form',
|
|
14
|
+
since: '0.0.1',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=deprecations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecations.js","sourceRoot":"","sources":["../../src/expr/deprecations.ts"],"names":[],"mappings":"AA0BA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAiC;IAC/D;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,gGAAgG;QAClG,MAAM,EAAE,8DAA8D;QACtE,KAAK,EAAE,OAAO;KACf;CACF,CAAC","sourcesContent":["import type { BuiltinOperator } from '../model/types.js';\n\n/**\n * The built-ins a v1 document may still write but should stop writing.\n *\n * `EXPR-1.1.4` permits only additive changes within v1, so a name cannot be removed from the\n * language while a v1 artifact that uses it remains in retention. Deprecation is the step before\n * that: the compiler accepts the call and returns a `DEPRECATED_BUILTIN` warning, the runtime\n * keeps answering it, and the generated reference page marks it. Removal is an `exprVersion: 2`\n * change, and the v1 evaluator must still answer the name while v1 artifacts are retained.\n *\n * The registry is the single source for the compiler warning and the documentation marker. A name\n * is keyed by `BuiltinOperator`, so a typo or a name that is not in the closed set fails\n * typecheck rather than shipping a deprecation nobody can trigger.\n */\nexport interface DeprecatedBuiltin {\n /** The callable name the compiler warns about. */\n readonly name: BuiltinOperator;\n /** The source form an author should write instead. */\n readonly replacement: string;\n /** Why the name is being retired, in one sentence an author can act on. */\n readonly reason: string;\n /** The package version that first deprecated the name. */\n readonly since: string;\n}\n\n/**\n * The names deprecated within Expr v1.\n *\n * `member` is the first entry. The postfix read (`lookup(t, [k]).col`) is the author surface the\n * grammar defines (`EXPR-7.1.5`); the direct `member(record, \"name\")` call is the AST form that\n * surface lowers to. An author who spells the call is writing an internal node by hand, so the\n * compiler points at the source form and still compiles the expression.\n */\nexport const DEPRECATED_BUILTINS: readonly DeprecatedBuiltin[] = [\n {\n name: 'member',\n replacement:\n 'a postfix member read such as `lookup(t, [k]).col`, or a member path such as `f_record.f_name`',\n reason: 'the direct call is the compiled form, not the authoring form',\n since: '0.0.1',\n },\n];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DiagnosticCode, Severity } from '../model/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The single source of truth for every diagnostic code the language defines.
|
|
4
|
+
*
|
|
5
|
+
* A code carries its stage, its default severity and the message key a report uses,
|
|
6
|
+
* plus the cause, a minimal example and the fix that the generated catalogue needs.
|
|
7
|
+
* Nothing else in the runtime invents a code or a message key.
|
|
8
|
+
*/
|
|
9
|
+
export interface DiagnosticDoc {
|
|
10
|
+
readonly code: DiagnosticCode;
|
|
11
|
+
readonly stage: 'compile' | 'runtime';
|
|
12
|
+
readonly severity: Severity;
|
|
13
|
+
readonly messageKey: string;
|
|
14
|
+
readonly cause: string;
|
|
15
|
+
readonly example: string;
|
|
16
|
+
readonly fix: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DIAGNOSTICS: readonly DiagnosticDoc[];
|
|
19
|
+
/** The catalogue entry for a code. A code without a documented cause is a defect. */
|
|
20
|
+
export declare function diagnosticDoc(code: DiagnosticCode): DiagnosticDoc;
|
|
21
|
+
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/expr/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAiPD,eAAO,MAAM,WAAW,EAAE,SAAS,aAAa,EAE/C,CAAC;AAMF,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,aAAa,CAMjE"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { AxiomError } from '../model/errors.js';
|
|
2
|
+
/** Every code with the documentation the generated catalogue renders, keyed by code. */
|
|
3
|
+
const DIAGNOSTIC_RECORDS = {
|
|
4
|
+
UNDETERMINED: {
|
|
5
|
+
stage: 'runtime',
|
|
6
|
+
severity: 'block',
|
|
7
|
+
messageKey: 'runtime.undetermined',
|
|
8
|
+
cause: 'A gate item or gate rule could not be decided on this device.',
|
|
9
|
+
example: 'a gate item reading a required local measurement that is missing',
|
|
10
|
+
fix: 'Record the missing reading, or move the item to the server tier if it is a server check.',
|
|
11
|
+
},
|
|
12
|
+
ENGINE_ERROR: {
|
|
13
|
+
stage: 'runtime',
|
|
14
|
+
severity: 'block',
|
|
15
|
+
messageKey: 'runtime.engine_error',
|
|
16
|
+
cause: 'The engine stopped before it could decide the rule. It hit an operation it cannot perform, a result outside its budget, a stored value outside its declaration, or a construct this build does not implement.',
|
|
17
|
+
example: '`+` on two money values whose currencies differ',
|
|
18
|
+
fix: 'Correct the inputs or the expression; the report names the path the engine refused.',
|
|
19
|
+
},
|
|
20
|
+
STALE_DATA: {
|
|
21
|
+
stage: 'runtime',
|
|
22
|
+
severity: 'block',
|
|
23
|
+
messageKey: 'runtime.stale_data',
|
|
24
|
+
cause: 'A lookup table version the artifact requires is missing, or its effective range does not cover the record date.',
|
|
25
|
+
example: 'a data-bound price table resolved with no as-of date',
|
|
26
|
+
fix: 'Install the required table version on the device or supply the record date the table covers.',
|
|
27
|
+
},
|
|
28
|
+
ACCESS_DENIED: {
|
|
29
|
+
stage: 'runtime',
|
|
30
|
+
severity: 'warn',
|
|
31
|
+
messageKey: 'runtime.access_denied',
|
|
32
|
+
cause: 'An expression read a value it may not see: a stored write-only value, or a masked or hidden value the overlay does not list in `allowMaskedRead`.',
|
|
33
|
+
example: 'a rule reading a stored write_only field that was not written in this session',
|
|
34
|
+
fix: 'Read a field the overlay grants, or evaluate the rule on the server where the value is readable.',
|
|
35
|
+
},
|
|
36
|
+
DEFERRED_SERVER_CHECK: {
|
|
37
|
+
stage: 'runtime',
|
|
38
|
+
severity: 'info',
|
|
39
|
+
messageKey: 'runtime.deferred_server_check',
|
|
40
|
+
cause: 'A server-tier rule was evaluated on the client and its result is deferred to the server.',
|
|
41
|
+
example: 'a server-tier history rule in a device artifact',
|
|
42
|
+
fix: 'Take no client action; the server enforces the rule when it receives the submission.',
|
|
43
|
+
},
|
|
44
|
+
REQUIRED_UNKNOWN: {
|
|
45
|
+
stage: 'runtime',
|
|
46
|
+
severity: 'warn',
|
|
47
|
+
messageKey: 'runtime.required_unknown',
|
|
48
|
+
cause: 'A required rule could not read the input it requires, so the requirement is not satisfied and the device cannot say whether it should be.',
|
|
49
|
+
example: 'a required rule reading a masked field',
|
|
50
|
+
fix: 'Grant the read, or enforce the requirement on the server; do not treat the field as optional.',
|
|
51
|
+
},
|
|
52
|
+
ROW_IDENTITY: {
|
|
53
|
+
stage: 'runtime',
|
|
54
|
+
severity: 'block',
|
|
55
|
+
messageKey: 'runtime.row_identity',
|
|
56
|
+
cause: 'A rule that answers per row met an array whose rows it cannot name: two rows share one key, a row states none, or the array has no reconciled identity.',
|
|
57
|
+
example: 'two rows of a natural-key array both state `f_key: "a"`',
|
|
58
|
+
fix: 'Give each row a unique key, or supply the assigned-row manifest the session owns; never match rows by position.',
|
|
59
|
+
},
|
|
60
|
+
SIGNATURE_COVER_EXCLUDED: {
|
|
61
|
+
stage: 'runtime',
|
|
62
|
+
severity: 'block',
|
|
63
|
+
messageKey: 'runtime.signature_cover_excluded',
|
|
64
|
+
cause: 'The submission leaves out a value that a signature covers while still exporting the signature, so the export would carry a digest over data it does not carry.',
|
|
65
|
+
example: 'a signature covering a field a `visible` rule hides under `onHide: "exclude"`',
|
|
66
|
+
fix: 'Keep the covered value in the projection (`onHide: "preserve"`), withhold the signature too, or re-sign the values that travel.',
|
|
67
|
+
},
|
|
68
|
+
LATE_BOUND_TYPE_MISMATCH: {
|
|
69
|
+
stage: 'runtime',
|
|
70
|
+
severity: 'block',
|
|
71
|
+
messageKey: 'runtime.late_bound_type_mismatch',
|
|
72
|
+
cause: 'A host supplied a value that contradicts the domain the artifact declares for the slot it is read into, such as a number for a `string` context root, text in a `decimal` dataset column, or an option code the field does not declare.',
|
|
73
|
+
example: 'a context root declared `string` supplied the number `42`',
|
|
74
|
+
fix: 'Fix the host input so the value has the declared domain, or change the declaration to admit it. This is a host bug, not a form error: the host should log it rather than ask the respondent to correct the form.',
|
|
75
|
+
},
|
|
76
|
+
EXPR_PARSE_ERROR: {
|
|
77
|
+
stage: 'compile',
|
|
78
|
+
severity: 'block',
|
|
79
|
+
messageKey: 'compile.expr_parse_error',
|
|
80
|
+
cause: 'The expression source is not valid Expr v1 syntax.',
|
|
81
|
+
example: 'x in ys in zs',
|
|
82
|
+
fix: 'Fix the syntax; the compiler names the token and the intended operator where one is close.',
|
|
83
|
+
},
|
|
84
|
+
TYPE_MISMATCH: {
|
|
85
|
+
stage: 'compile',
|
|
86
|
+
severity: 'block',
|
|
87
|
+
messageKey: 'compile.type_mismatch',
|
|
88
|
+
cause: 'An operator received an operand outside its declared type.',
|
|
89
|
+
example: 'not "text"',
|
|
90
|
+
fix: 'Compare or convert the operand first so the operator sees the type its signature declares.',
|
|
91
|
+
},
|
|
92
|
+
UNKNOWN_IDENTIFIER: {
|
|
93
|
+
stage: 'compile',
|
|
94
|
+
severity: 'block',
|
|
95
|
+
messageKey: 'compile.unknown_identifier',
|
|
96
|
+
cause: 'An identifier, operator name or rule reference is not declared.',
|
|
97
|
+
example: 'sum1(xs)',
|
|
98
|
+
fix: 'Use a declared name; the compiler offers the closest declared name within a bounded distance.',
|
|
99
|
+
},
|
|
100
|
+
MONEY_ARITHMETIC: {
|
|
101
|
+
stage: 'compile',
|
|
102
|
+
severity: 'block',
|
|
103
|
+
messageKey: 'compile.money_arithmetic',
|
|
104
|
+
cause: 'Unary `-` has no money form. A money is added and subtracted with `+` and `-`; a `*` with two money operands is a `TYPE_MISMATCH`, and a number beside one money operand scales it.',
|
|
105
|
+
example: '-f_total where f_total is money',
|
|
106
|
+
fix: 'Add and subtract money with `+` and `-`, scale it with a unit-less number, or convert with money_minor and money_from_minor.',
|
|
107
|
+
},
|
|
108
|
+
PATTERN_UNSUPPORTED: {
|
|
109
|
+
stage: 'compile',
|
|
110
|
+
severity: 'block',
|
|
111
|
+
messageKey: 'compile.pattern_unsupported',
|
|
112
|
+
cause: 'A pattern uses a construct outside the bounded ASCII subset.',
|
|
113
|
+
example: 'a lookahead in ascii_match',
|
|
114
|
+
fix: 'Rewrite the pattern inside the supported subset; backreferences, lookaround and nested quantifiers are refused.',
|
|
115
|
+
},
|
|
116
|
+
COST_BUDGET_EXCEEDED: {
|
|
117
|
+
stage: 'compile',
|
|
118
|
+
severity: 'block',
|
|
119
|
+
messageKey: 'compile.cost_budget_exceeded',
|
|
120
|
+
cause: 'An expression exceeds the token, node or nesting budget.',
|
|
121
|
+
example: 'more than 4000 tokens',
|
|
122
|
+
fix: 'Split the expression into named intermediate rules so each stays inside the budget.',
|
|
123
|
+
},
|
|
124
|
+
CYCLE_DETECTED: {
|
|
125
|
+
stage: 'compile',
|
|
126
|
+
severity: 'block',
|
|
127
|
+
messageKey: 'compile.cycle_detected',
|
|
128
|
+
cause: 'A computed field depends on itself, directly or transitively.',
|
|
129
|
+
example: 'a computed field whose expression reads that same field',
|
|
130
|
+
fix: 'Break the cycle by computing the value once and reading the computed field instead.',
|
|
131
|
+
},
|
|
132
|
+
DUPLICATE_WRITER: {
|
|
133
|
+
stage: 'compile',
|
|
134
|
+
severity: 'block',
|
|
135
|
+
messageKey: 'compile.duplicate_writer',
|
|
136
|
+
cause: 'Two rules write one field.',
|
|
137
|
+
example: 'two compute rules targeting the same fieldId',
|
|
138
|
+
fix: 'Keep one writer and fold the other computation into it.',
|
|
139
|
+
},
|
|
140
|
+
TABLE_NOT_DECLARED: {
|
|
141
|
+
stage: 'compile',
|
|
142
|
+
severity: 'block',
|
|
143
|
+
messageKey: 'compile.table_not_declared',
|
|
144
|
+
cause: 'An expression names a dataset the schema does not declare.',
|
|
145
|
+
example: 'in_set(t_missing, code)',
|
|
146
|
+
fix: 'Declare the table in the schema, or correct the table id.',
|
|
147
|
+
},
|
|
148
|
+
RULE_REFERENCE: {
|
|
149
|
+
stage: 'compile',
|
|
150
|
+
severity: 'block',
|
|
151
|
+
messageKey: 'compile.rule_reference',
|
|
152
|
+
cause: '`rule_ok`, `no_blocking`, `rule_ok_in`, `no_blocking_in` or `required_in` reads the gate fold, the pass or block outcome of other rules, outside the `gate` rule that supplies it.',
|
|
153
|
+
example: 'a `validate` rule whose expression is `rule_ok("r_total")`',
|
|
154
|
+
fix: 'Move the check into a gate item, or remove the fold from the expression that has no gate.',
|
|
155
|
+
},
|
|
156
|
+
DEPRECATED_BUILTIN: {
|
|
157
|
+
stage: 'compile',
|
|
158
|
+
severity: 'warn',
|
|
159
|
+
messageKey: 'compile.deprecated_builtin',
|
|
160
|
+
cause: 'The expression calls a built-in that is deprecated within Expr v1. The document still compiles and the runtime still answers the call.',
|
|
161
|
+
example: 'member(f_record, "f_name")',
|
|
162
|
+
fix: 'Write the source form the deprecation names, such as `f_record.f_name` or `lookup(t, [k]).col`.',
|
|
163
|
+
},
|
|
164
|
+
UNDECIDED_AGGREGATE: {
|
|
165
|
+
stage: 'compile',
|
|
166
|
+
severity: 'warn',
|
|
167
|
+
messageKey: 'compile.undecided_aggregate',
|
|
168
|
+
cause: 'An aggregate folds a list that may be empty, so the expression decides nothing when the list has no entries. The document still compiles and the runtime still evaluates the call.',
|
|
169
|
+
example: '`min(f_rows)` on an array that declares no `minItems`',
|
|
170
|
+
fix: 'Declare `minItems: 1` on the array when a form with no rows is impossible; a numeric total that should start at zero is `sum`.',
|
|
171
|
+
},
|
|
172
|
+
REQUIRED_ON_ARRAY: {
|
|
173
|
+
stage: 'compile',
|
|
174
|
+
severity: 'warn',
|
|
175
|
+
messageKey: 'compile.required_on_array',
|
|
176
|
+
cause: 'A field declares `required: true` on an `array` and no `minItems` of at least one, so the requirement admits an empty list: `required` asks whether a value is present, and `[]` is a value. The document still compiles and the runtime still evaluates it.',
|
|
177
|
+
example: '`required: true` on a photos array that states no `minItems`',
|
|
178
|
+
fix: 'Declare `minItems: 1` on the array when at least one entry is required; a count outside the declared range is a decided, blocking fact.',
|
|
179
|
+
},
|
|
180
|
+
INVALID_CONSTANT_EXPRESSION: {
|
|
181
|
+
stage: 'compile',
|
|
182
|
+
severity: 'block',
|
|
183
|
+
messageKey: 'compile.invalid_constant_expression',
|
|
184
|
+
cause: 'An expression over literals can never produce a value: an integer result, including a `ceil` or `floor` of a decimal, leaves -(2^53 - 1)..(2^53 - 1); a divisor is the literal zero; a `between` range puts its low bound above its high bound.',
|
|
185
|
+
example: '`9007199254740991 + 1`, `f_count // 0` or `between(f_age, 65, 18)`',
|
|
186
|
+
fix: 'Correct the literal operands or bounds so the expression can produce a value: keep an integer result, including a `ceil` or `floor` of a decimal literal, inside -(2^53 - 1)..(2^53 - 1), divide by a non-zero value, and write `between(x, low, high)` with `low <= high`.',
|
|
187
|
+
},
|
|
188
|
+
CONSTANT_COMPARISON: {
|
|
189
|
+
stage: 'compile',
|
|
190
|
+
severity: 'warn',
|
|
191
|
+
messageKey: 'compile.constant_comparison',
|
|
192
|
+
cause: 'A comparison is always true or always false from the declared range of its operand, or a `matches` tests a literal empty pattern, so the expression decides one way on every record. The document still compiles and the runtime still evaluates it.',
|
|
193
|
+
example: '`len(f_name) < 0`, `year(f_date) > 9999` or `matches(f_name, "")`',
|
|
194
|
+
fix: 'Remove the comparison or compare against a bound the operand can reach; an empty pattern matches every string, so write the pattern the check meant or drop it.',
|
|
195
|
+
},
|
|
196
|
+
UNSATISFIABLE_CONDITION: {
|
|
197
|
+
stage: 'compile',
|
|
198
|
+
severity: 'warn',
|
|
199
|
+
messageKey: 'compile.unsatisfiable_condition',
|
|
200
|
+
cause: 'A conjunction or disjunction over one field has literal bounds that cannot both hold, or a rule or gate item has a condition that is a literal `false` or an empty range, so it can never fire. The document still compiles and the runtime still evaluates it.',
|
|
201
|
+
example: '`f_count > 5 and f_count < 3`, a `validate` rule with `expr: false`, or a gate item with `expr: false`',
|
|
202
|
+
fix: 'Correct the bounds so the condition can hold, or remove the rule or gate item; a condition that never fires states nothing about the record.',
|
|
203
|
+
},
|
|
204
|
+
REDUNDANT_CONDITION: {
|
|
205
|
+
stage: 'compile',
|
|
206
|
+
severity: 'warn',
|
|
207
|
+
messageKey: 'compile.redundant_condition',
|
|
208
|
+
cause: 'A disjunction repeats one of its own branches, so the repeated branch states nothing the first one did not. The document still compiles and the runtime still evaluates it.',
|
|
209
|
+
example: '`f_status == "OPEN" or f_status == "OPEN"`',
|
|
210
|
+
fix: 'Remove the repeated branch, or change it to the alternative the author meant; a disjunction of identical conditions is just that condition.',
|
|
211
|
+
},
|
|
212
|
+
REQUIRED_NEVER_VISIBLE: {
|
|
213
|
+
stage: 'compile',
|
|
214
|
+
severity: 'warn',
|
|
215
|
+
messageKey: 'compile.required_never_visible',
|
|
216
|
+
cause: 'A field is required but its `visibleWhen` can never hold, so the requirement is addressed to a control the form never shows. The document still compiles and the runtime still evaluates it.',
|
|
217
|
+
example: 'a required field whose `visibleWhen` is `false`, or whose bounds cannot both hold',
|
|
218
|
+
fix: 'Correct the visibility condition so the field can be shown while it is required, or remove the requirement if the field is genuinely never shown.',
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
export const DIAGNOSTICS = Object.entries(DIAGNOSTIC_RECORDS).map(([code, doc]) => ({ code: code, ...doc }));
|
|
222
|
+
const BY_CODE = new Map(DIAGNOSTICS.map((doc) => [doc.code, doc]));
|
|
223
|
+
/** The catalogue entry for a code. A code without a documented cause is a defect. */
|
|
224
|
+
export function diagnosticDoc(code) {
|
|
225
|
+
const doc = BY_CODE.get(code);
|
|
226
|
+
if (doc === undefined) {
|
|
227
|
+
throw new AxiomError('ENGINE_ERROR', `no diagnostic catalogue entry for ${code}`);
|
|
228
|
+
}
|
|
229
|
+
return doc;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/expr/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBhD,wFAAwF;AACxF,MAAM,kBAAkB,GAAwD;IAC9E,YAAY,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,sBAAsB;QAClC,KAAK,EAAE,+DAA+D;QACtE,OAAO,EAAE,kEAAkE;QAC3E,GAAG,EAAE,0FAA0F;KAChG;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,sBAAsB;QAClC,KAAK,EACH,+MAA+M;QACjN,OAAO,EAAE,iDAAiD;QAC1D,GAAG,EAAE,qFAAqF;KAC3F;IACD,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,OAAO;QACjB,UAAU,EAAE,oBAAoB;QAChC,KAAK,EACH,iHAAiH;QACnH,OAAO,EAAE,sDAAsD;QAC/D,GAAG,EAAE,8FAA8F;KACpG;IACD,aAAa,EAAE;QACb,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,uBAAuB;QACnC,KAAK,EACH,mJAAmJ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agnosticCode, Severity } from '../model/types.js';\n\n/**\n * The single source of truth for every diagnostic code the language defines.\n *\n * A code carries its stage, its default severity and the message key a report uses,\n * plus the cause, a minimal example and the fix that the generated catalogue needs.\n * Nothing else in the runtime invents a code or a message key.\n */\nexport interface DiagnosticDoc {\n readonly code: DiagnosticCode;\n readonly stage: 'compile' | 'runtime';\n readonly severity: Severity;\n readonly messageKey: string;\n readonly cause: string;\n readonly example: string;\n readonly fix: string;\n}\n\n/** Every code with the documentation the generated catalogue renders, keyed by code. */\nconst DIAGNOSTIC_RECORDS: Record<DiagnosticCode, Omit<DiagnosticDoc, 'code'>> = {\n UNDETERMINED: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.undetermined',\n cause: 'A gate item or gate rule could not be decided on this device.',\n example: 'a gate item reading a required local measurement that is missing',\n fix: 'Record the missing reading, or move the item to the server tier if it is a server check.',\n },\n ENGINE_ERROR: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.engine_error',\n cause:\n 'The engine stopped before it could decide the rule. It hit an operation it cannot perform, a result outside its budget, a stored value outside its declaration, or a construct this build does not implement.',\n example: '`+` on two money values whose currencies differ',\n fix: 'Correct the inputs or the expression; the report names the path the engine refused.',\n },\n STALE_DATA: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.stale_data',\n cause:\n 'A lookup table version the artifact requires is missing, or its effective range does not cover the record date.',\n example: 'a data-bound price table resolved with no as-of date',\n fix: 'Install the required table version on the device or supply the record date the table covers.',\n },\n ACCESS_DENIED: {\n stage: 'runtime',\n severity: 'warn',\n messageKey: 'runtime.access_denied',\n cause:\n 'An expression read a value it may not see: a stored write-only value, or a masked or hidden value the overlay does not list in `allowMaskedRead`.',\n example: 'a rule reading a stored write_only field that was not written in this session',\n fix: 'Read a field the overlay grants, or evaluate the rule on the server where the value is readable.',\n },\n DEFERRED_SERVER_CHECK: {\n stage: 'runtime',\n severity: 'info',\n messageKey: 'runtime.deferred_server_check',\n cause:\n 'A server-tier rule was evaluated on the client and its result is deferred to the server.',\n example: 'a server-tier history rule in a device artifact',\n fix: 'Take no client action; the server enforces the rule when it receives the submission.',\n },\n REQUIRED_UNKNOWN: {\n stage: 'runtime',\n severity: 'warn',\n messageKey: 'runtime.required_unknown',\n cause:\n 'A required rule could not read the input it requires, so the requirement is not satisfied and the device cannot say whether it should be.',\n example: 'a required rule reading a masked field',\n fix: 'Grant the read, or enforce the requirement on the server; do not treat the field as optional.',\n },\n ROW_IDENTITY: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.row_identity',\n cause:\n 'A rule that answers per row met an array whose rows it cannot name: two rows share one key, a row states none, or the array has no reconciled identity.',\n example: 'two rows of a natural-key array both state `f_key: \"a\"`',\n fix: 'Give each row a unique key, or supply the assigned-row manifest the session owns; never match rows by position.',\n },\n SIGNATURE_COVER_EXCLUDED: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.signature_cover_excluded',\n cause:\n 'The submission leaves out a value that a signature covers while still exporting the signature, so the export would carry a digest over data it does not carry.',\n example: 'a signature covering a field a `visible` rule hides under `onHide: \"exclude\"`',\n fix: 'Keep the covered value in the projection (`onHide: \"preserve\"`), withhold the signature too, or re-sign the values that travel.',\n },\n LATE_BOUND_TYPE_MISMATCH: {\n stage: 'runtime',\n severity: 'block',\n messageKey: 'runtime.late_bound_type_mismatch',\n cause:\n 'A host supplied a value that contradicts the domain the artifact declares for the slot it is read into, such as a number for a `string` context root, text in a `decimal` dataset column, or an option code the field does not declare.',\n example: 'a context root declared `string` supplied the number `42`',\n fix: 'Fix the host input so the value has the declared domain, or change the declaration to admit it. This is a host bug, not a form error: the host should log it rather than ask the respondent to correct the form.',\n },\n EXPR_PARSE_ERROR: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.expr_parse_error',\n cause: 'The expression source is not valid Expr v1 syntax.',\n example: 'x in ys in zs',\n fix: 'Fix the syntax; the compiler names the token and the intended operator where one is close.',\n },\n TYPE_MISMATCH: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.type_mismatch',\n cause: 'An operator received an operand outside its declared type.',\n example: 'not \"text\"',\n fix: 'Compare or convert the operand first so the operator sees the type its signature declares.',\n },\n UNKNOWN_IDENTIFIER: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.unknown_identifier',\n cause: 'An identifier, operator name or rule reference is not declared.',\n example: 'sum1(xs)',\n fix: 'Use a declared name; the compiler offers the closest declared name within a bounded distance.',\n },\n MONEY_ARITHMETIC: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.money_arithmetic',\n cause:\n 'Unary `-` has no money form. A money is added and subtracted with `+` and `-`; a `*` with two money operands is a `TYPE_MISMATCH`, and a number beside one money operand scales it.',\n example: '-f_total where f_total is money',\n fix: 'Add and subtract money with `+` and `-`, scale it with a unit-less number, or convert with money_minor and money_from_minor.',\n },\n PATTERN_UNSUPPORTED: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.pattern_unsupported',\n cause: 'A pattern uses a construct outside the bounded ASCII subset.',\n example: 'a lookahead in ascii_match',\n fix: 'Rewrite the pattern inside the supported subset; backreferences, lookaround and nested quantifiers are refused.',\n },\n COST_BUDGET_EXCEEDED: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.cost_budget_exceeded',\n cause: 'An expression exceeds the token, node or nesting budget.',\n example: 'more than 4000 tokens',\n fix: 'Split the expression into named intermediate rules so each stays inside the budget.',\n },\n CYCLE_DETECTED: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.cycle_detected',\n cause: 'A computed field depends on itself, directly or transitively.',\n example: 'a computed field whose expression reads that same field',\n fix: 'Break the cycle by computing the value once and reading the computed field instead.',\n },\n DUPLICATE_WRITER: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.duplicate_writer',\n cause: 'Two rules write one field.',\n example: 'two compute rules targeting the same fieldId',\n fix: 'Keep one writer and fold the other computation into it.',\n },\n TABLE_NOT_DECLARED: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.table_not_declared',\n cause: 'An expression names a dataset the schema does not declare.',\n example: 'in_set(t_missing, code)',\n fix: 'Declare the table in the schema, or correct the table id.',\n },\n RULE_REFERENCE: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.rule_reference',\n cause:\n '`rule_ok`, `no_blocking`, `rule_ok_in`, `no_blocking_in` or `required_in` reads the gate fold, the pass or block outcome of other rules, outside the `gate` rule that supplies it.',\n example: 'a `validate` rule whose expression is `rule_ok(\"r_total\")`',\n fix: 'Move the check into a gate item, or remove the fold from the expression that has no gate.',\n },\n DEPRECATED_BUILTIN: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.deprecated_builtin',\n cause:\n 'The expression calls a built-in that is deprecated within Expr v1. The document still compiles and the runtime still answers the call.',\n example: 'member(f_record, \"f_name\")',\n fix: 'Write the source form the deprecation names, such as `f_record.f_name` or `lookup(t, [k]).col`.',\n },\n UNDECIDED_AGGREGATE: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.undecided_aggregate',\n cause:\n 'An aggregate folds a list that may be empty, so the expression decides nothing when the list has no entries. The document still compiles and the runtime still evaluates the call.',\n example: '`min(f_rows)` on an array that declares no `minItems`',\n fix: 'Declare `minItems: 1` on the array when a form with no rows is impossible; a numeric total that should start at zero is `sum`.',\n },\n REQUIRED_ON_ARRAY: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.required_on_array',\n cause:\n 'A field declares `required: true` on an `array` and no `minItems` of at least one, so the requirement admits an empty list: `required` asks whether a value is present, and `[]` is a value. The document still compiles and the runtime still evaluates it.',\n example: '`required: true` on a photos array that states no `minItems`',\n fix: 'Declare `minItems: 1` on the array when at least one entry is required; a count outside the declared range is a decided, blocking fact.',\n },\n INVALID_CONSTANT_EXPRESSION: {\n stage: 'compile',\n severity: 'block',\n messageKey: 'compile.invalid_constant_expression',\n cause:\n 'An expression over literals can never produce a value: an integer result, including a `ceil` or `floor` of a decimal, leaves -(2^53 - 1)..(2^53 - 1); a divisor is the literal zero; a `between` range puts its low bound above its high bound.',\n example: '`9007199254740991 + 1`, `f_count // 0` or `between(f_age, 65, 18)`',\n fix: 'Correct the literal operands or bounds so the expression can produce a value: keep an integer result, including a `ceil` or `floor` of a decimal literal, inside -(2^53 - 1)..(2^53 - 1), divide by a non-zero value, and write `between(x, low, high)` with `low <= high`.',\n },\n CONSTANT_COMPARISON: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.constant_comparison',\n cause:\n 'A comparison is always true or always false from the declared range of its operand, or a `matches` tests a literal empty pattern, so the expression decides one way on every record. The document still compiles and the runtime still evaluates it.',\n example: '`len(f_name) < 0`, `year(f_date) > 9999` or `matches(f_name, \"\")`',\n fix: 'Remove the comparison or compare against a bound the operand can reach; an empty pattern matches every string, so write the pattern the check meant or drop it.',\n },\n UNSATISFIABLE_CONDITION: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.unsatisfiable_condition',\n cause:\n 'A conjunction or disjunction over one field has literal bounds that cannot both hold, or a rule or gate item has a condition that is a literal `false` or an empty range, so it can never fire. The document still compiles and the runtime still evaluates it.',\n example:\n '`f_count > 5 and f_count < 3`, a `validate` rule with `expr: false`, or a gate item with `expr: false`',\n fix: 'Correct the bounds so the condition can hold, or remove the rule or gate item; a condition that never fires states nothing about the record.',\n },\n REDUNDANT_CONDITION: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.redundant_condition',\n cause:\n 'A disjunction repeats one of its own branches, so the repeated branch states nothing the first one did not. The document still compiles and the runtime still evaluates it.',\n example: '`f_status == \"OPEN\" or f_status == \"OPEN\"`',\n fix: 'Remove the repeated branch, or change it to the alternative the author meant; a disjunction of identical conditions is just that condition.',\n },\n REQUIRED_NEVER_VISIBLE: {\n stage: 'compile',\n severity: 'warn',\n messageKey: 'compile.required_never_visible',\n cause:\n 'A field is required but its `visibleWhen` can never hold, so the requirement is addressed to a control the form never shows. The document still compiles and the runtime still evaluates it.',\n example: 'a required field whose `visibleWhen` is `false`, or whose bounds cannot both hold',\n fix: 'Correct the visibility condition so the field can be shown while it is required, or remove the requirement if the field is genuinely never shown.',\n },\n};\n\nexport const DIAGNOSTICS: readonly DiagnosticDoc[] = Object.entries(DIAGNOSTIC_RECORDS).map(\n ([code, doc]) => ({ code: code as DiagnosticCode, ...doc }),\n);\n\nconst BY_CODE: ReadonlyMap<DiagnosticCode, DiagnosticDoc> = new Map(\n DIAGNOSTICS.map((doc) => [doc.code, doc]),\n);\n\n/** The catalogue entry for a code. A code without a documented cause is a defect. */\nexport function diagnosticDoc(code: DiagnosticCode): DiagnosticDoc {\n const doc = BY_CODE.get(code);\n if (doc === undefined) {\n throw new AxiomError('ENGINE_ERROR', `no diagnostic catalogue entry for ${code}`);\n }\n return doc;\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text direction for a locale, from a vendored CLDR script map.
|
|
3
|
+
*
|
|
4
|
+
* The host sets `dir` and `lang` on the element that holds the text; this module never mutates
|
|
5
|
+
* a document, and never reads `Intl`. Hermes has no text-direction database, and a host's ICU
|
|
6
|
+
* release would make the answer device-dependent, so the map travels with the runtime.
|
|
7
|
+
*
|
|
8
|
+
* Direction is a property of the script the text is written in, not of the language it spells:
|
|
9
|
+
* `ar` is right-to-left, `ar-Latn` is left-to-right, and `sd-Deva` is left-to-right while `sd`
|
|
10
|
+
* is right-to-left. A four-letter subtag immediately after the language therefore wins over the
|
|
11
|
+
* language's likely script; everything else falls back to the language, then to left-to-right.
|
|
12
|
+
*
|
|
13
|
+
* The data is CLDR 49.0.0: the right-to-left scripts its script metadata names, and every
|
|
14
|
+
* language subtag whose likely script in `supplemental/likelySubtags.json` is one of them.
|
|
15
|
+
* Fifteen tags a host may forward that the likely table does not name — ISO 639-2 codes (`ara`,
|
|
16
|
+
* `heb`, `fas`, `per`, `urd`, `pus`, `div`, `uig`, `yid`, `snd`, `kas`) and codes CLDR omits
|
|
17
|
+
* (`arb`, `cld`, `pnb`, `prs`) — are answered beside their canonical forms. A tag neither set
|
|
18
|
+
* names is `ltr`.
|
|
19
|
+
*
|
|
20
|
+
* Both sets are derived from the release, not typed from memory: `tools/derive-cldr-direction.ts`
|
|
21
|
+
* reproduces them from the two CLDR files, and `spec/cldr/direction-rtl.json` records the
|
|
22
|
+
* derivation with the digest of each input. `__tests__/direction.test.ts` holds this module to
|
|
23
|
+
* that record over its whole inventory, while `tools/derive-cldr-direction.ts --check` verifies
|
|
24
|
+
* the record against the upstream CLDR files and their recorded digests.
|
|
25
|
+
*/
|
|
26
|
+
/** The one direction a document can run. */
|
|
27
|
+
export type Direction = 'ltr' | 'rtl';
|
|
28
|
+
/** `locale`'s text direction, from its script subtag or its language's likely script. */
|
|
29
|
+
export declare function directionOf(locale: string): Direction;
|
|
30
|
+
//# sourceMappingURL=direction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../src/expr/direction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AA8CtC,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAWrD"}
|