@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.5
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 +1210 -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":"builtins.js","sourceRoot":"","sources":["../../src/expr/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAU7D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhG,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACX,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB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IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBACjC,MAAM,IAAI,UAAU,CAClB,cAAc,EACd,mBAAmB,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,iCAAiC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,QAAQ,EAAE,EACnH,IAAI,CACL,CAAC;gBACJ,CAAC;gBACD,IAAI,IAAI,QAAQ,CAAC;YACnB,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD;YACE,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC","sourcesContent":["import { AxiomError, assertNever } from '../model/errors.js';\nimport type {\n DecimalString,\n ExprOperator,\n LiteralDomain,\n MoneyValue,\n RoundingMode,\n Undetermined,\n WireValue,\n} from '../model/types.js';\nimport { INTEGER_TEXT_PATTERN, isUndetermined, UNKNOWN } from '../model/types.js';\nimport { addMinutesToTime, minutesBetweenTimes, TIME_PATTERN } from '../model/time.js';\nimport { durationMinutes, durationSeconds, minutesBetweenDurations } from '../model/duration.js';\nimport { isRecord, isSafeInteger } from '../model/values.js';\nimport { compareByDomain, domained, equalByDomain } from './ordering.js';\nimport { distinctElements, reverseElements, sliceElements, sortElements } from './sequences.js';\nimport type { SequenceAlgebra, SequenceElement } from './sequences.js';\nimport {\n absDecimalText,\n asDecimalString,\n ceilDecimal,\n floorDecimal,\n powDecimalTexts,\n powToPrecisionDecimal,\n roundDecimal,\n tryDecimalString,\n} from './decimal.js';\nimport { isE164PhoneNumber, isEmailAddress, isHttpUrl } from './validation.js';\nimport {\n addMinutesToInstant,\n civilDateOfInstant,\n minutesBetweenInstants,\n parseInstant,\n startOfDayInstant,\n} from './instant.js';\nimport { sumDecimals } from './logic.js';\nimport { moneyAmountText, moneyFromMinor, moneyMinor, toMoneyValue } from './money.js';\nimport { compilePattern, matchCompiledPattern } from './pattern.js';\nimport {\n asciiLower,\n asciiUpper,\n codePointLength,\n indexOfCodePoints,\n replaceAllLiteral,\n splitLiteral,\n substringCodePoints,\n trimAsciiWhitespace,\n} from './strings.js';\nimport { averageValue, firstValue, lastValue, medianValue, modeValue } from './reduce.js';\nimport { matchRegex, regexRefusalError } from './regex.js';\nimport {\n addDays,\n addMonths,\n addYears,\n daysBetween,\n daysFromCivil,\n formatPlainDate,\n monthsBetween,\n parsePlainDate,\n} from './plain-date.js';\n\n/** A value the evaluator can hold: a canonical wire value or a frozen sentinel. */\nexport type RuntimeValue = WireValue | Undetermined;\n\n/**\n * The built-ins this module answers from evaluated arguments alone. The compiled language\n * defines more (`BuiltinOperator`): the evaluator answers the aggregates, `present`,\n * `is_relevant`, `is_unique`, `digest`, the dataset lookups and the gate-only built-ins\n * itself, because each needs something an argument value does not carry — a member's\n * declared domain, the list a key path is read inside, or the identity of a covered\n * target.\n *\n * The tuple is the single source: the union is derived from it, the set used by\n * `isImplementedOperator` is derived from it, and `applyBuiltin` ends with `assertNever`,\n * so a name added here without a case is a compile error rather than a runtime refusal.\n */\nexport const IMPLEMENTED_OPERATORS = [\n 'len',\n 'lower',\n 'upper',\n 'trim',\n 'starts_with',\n 'ends_with',\n 'contains',\n 'ascii_match',\n 'is_email',\n 'is_phone',\n 'is_url',\n 'empty',\n 'between',\n 'sum',\n 'to_decimal',\n 'to_string',\n 'parse_integer',\n 'parse_decimal',\n 'round',\n 'round_up',\n 'round_down',\n 'round_even',\n 'pow',\n 'money_minor',\n 'money_from_minor',\n 'money_currency',\n 'money_scale',\n 'add_days',\n 'add_months',\n 'add_minutes',\n 'days_between',\n 'months_between',\n 'minutes_between',\n 'duration_minutes',\n 'duration_seconds',\n 'rule_ok_in',\n 'no_blocking_in',\n 'required_in',\n 'abs',\n 'ceil',\n 'floor',\n 'avg',\n 'median',\n 'first',\n 'last',\n 'replace',\n 'split',\n 'join',\n 'substring',\n 'index_of',\n 'add_years',\n 'start_of_day',\n 'civil_date',\n 'matches',\n 'mode',\n 'concat',\n 'year',\n 'month',\n 'day',\n 'weekday',\n 'parse_date',\n 'parse_instant',\n 'sort',\n 'slice',\n 'distinct',\n 'reverse',\n] as const;\n\nexport type ImplementedOperator = (typeof IMPLEMENTED_OPERATORS)[number];\n\nconst IMPLEMENTED_OPERATOR_SET: ReadonlySet<string> = new Set(IMPLEMENTED_OPERATORS);\n\n/** Whether the evaluator answers this operator from its argument values alone. */\nexport function isImplementedOperator(op: string): op is ImplementedOperator {\n return IMPLEMENTED_OPERATOR_SET.has(op);\n}\n\nconst ROUNDING_MODES: readonly RoundingMode[] = [\n 'up',\n 'down',\n 'ceiling',\n 'floor',\n 'half_up',\n 'half_even',\n];\n\n/** An integer power by repeated squaring: exact until the canonical range is left. */\nexport function integerPower(base: number, exponent: number, path = ''): number {\n if (!Number.isInteger(exponent) || exponent < 0) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'pow requires a non-negative integer exponent; write `round(a / b, places)` for a negative power',\n path,\n );\n }\n if (!isSafeInteger(base)) {\n throw new AxiomError('ENGINE_ERROR', 'pow requires an exact integer base', path);\n }\n let result = 1n;\n let factor = BigInt(base);\n const boundary = BigInt(Number.MAX_SAFE_INTEGER);\n const outside = (value: bigint): boolean => value > boundary || value < -boundary;\n let remaining = exponent;\n while (remaining > 0) {\n if (remaining % 2 === 1) {\n result *= factor;\n if (outside(result)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'pow integer result overflows the canonical range',\n path,\n );\n }\n }\n remaining = Math.floor(remaining / 2);\n if (remaining > 0) {\n factor *= factor;\n if (outside(factor)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'pow integer result overflows the canonical range',\n path,\n );\n }\n }\n }\n return Number(result);\n}\n\n/**\n * The non-negative integer an exponent names, or `undefined` when it names none.\n *\n * An exponent the artifact declares `decimal` arrives as canonical text even when its value is\n * a whole number. It takes the same repeated-squaring path a JavaScript number takes, so\n * `pow(1.000…1, 2)` refuses an inexact result whether the `2` was spelled as an integer or as\n * decimal text. Text that is not a canonical integer, a negative integer, and an integer\n * outside the safe range all take the working-precision path.\n */\nfunction integerExponentOf(exponent: number | string): number | undefined {\n if (typeof exponent === 'number') {\n return Number.isInteger(exponent) && exponent >= 0 ? exponent : undefined;\n }\n if (!INTEGER_TEXT_PATTERN.test(exponent)) return undefined;\n const value = Number(exponent);\n return isSafeInteger(value) && value >= 0 ? value : undefined;\n}\n\n/**\n * `pow(a, b)` at the language's arithmetic precision: an integer base stays an integer, a\n * decimal base stays exact decimal text, and both follow the multiplication rule `*` uses.\n */\nexport function numericPower(\n base: number | string,\n exponent: number | string,\n path = '',\n): number | string {\n const integerExponent = integerExponentOf(exponent);\n if (integerExponent !== undefined) {\n if (typeof base === 'number') return integerPower(base, integerExponent, path);\n return powDecimalTexts(asDecimalString(base, path), integerExponent, path);\n }\n return powToPrecisionDecimal(\n asDecimalString(typeof base === 'number' ? String(base) : base, path),\n asDecimalString(typeof exponent === 'number' ? String(exponent) : exponent, path),\n path,\n );\n}\n\nfunction ensureArity(\n op: ExprOperator,\n args: readonly unknown[],\n arity: number,\n path: string,\n): void {\n if (args.length !== arity) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `${op} takes ${String(arity)} arguments but received ${String(args.length)}`,\n path,\n );\n }\n}\n\n/**\n * One undetermined operand already decided the result ( \"propagates\"),\n * with `UNKNOWN` winning over `DEFERRED`. A `null` operand is the empty\n * value, which these built-ins lift to `UNKNOWN` rather than substituting zero or text\n * and an empty local reading wins over a deferred one for the same\n * reason.\n */\nfunction propagated(args: readonly RuntimeValue[]): Undetermined | undefined {\n let deferred: Undetermined | undefined;\n for (const arg of args) {\n if (arg === null) return UNKNOWN;\n if (!isUndetermined(arg)) continue;\n if (arg.undetermined === 'UNKNOWN') return arg;\n deferred = arg;\n }\n return deferred;\n}\n\n/**\n * A canonical integer parsed from text, or `null` when the text is not one.\n *\n * `INTEGER_TEXT_PATTERN` is the one authority for the spelling — no leading `+`, no leading\n * zeros beyond `0`, never `-0` — so a text the operand reader accepts is exactly a text this\n * parse names. A value outside `EXPR-5.1.2`'s range is an ordinary miss, never a raised error.\n */\nfunction parseIntegerText(text: string): number | null {\n if (!INTEGER_TEXT_PATTERN.test(text)) return null;\n const value = Number(text);\n return isSafeInteger(value) ? value : null;\n}\n\nfunction decimalArgument(value: RuntimeValue, op: ExprOperator, path: string): DecimalString {\n if (typeof value === 'number') {\n if (!isSafeInteger(value)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires an exact decimal operand`, path);\n }\n return asDecimalString(String(value), path);\n }\n if (typeof value === 'string') return asDecimalString(value, path);\n throw new AxiomError('ENGINE_ERROR', `${op} requires a decimal operand`, path);\n}\n\nfunction integerArgument(value: RuntimeValue, op: ExprOperator, path: string): number {\n if (typeof value === 'number' && isSafeInteger(value)) return value;\n if (typeof value === 'string' && INTEGER_TEXT_PATTERN.test(value)) {\n const parsed = Number(value);\n if (isSafeInteger(parsed)) return parsed;\n }\n throw new AxiomError('ENGINE_ERROR', `${op} requires an integer operand`, path);\n}\n\n/**\n * Whether a runtime value has the duration shape. The built-in dispatching `minutes_between` has\n * no declared domain, so the value's own shape selects the family: two duration records are a\n * length pair, two clock strings are a time pair, and anything else is an instant pair.\n */\nfunction isDurationShaped(value: RuntimeValue): boolean {\n if (isUndetermined(value) || !isRecord(value)) return false;\n return typeof value['amount'] === 'number' && typeof value['unit'] === 'string';\n}\n\nfunction stringArgument(value: RuntimeValue, op: ExprOperator, path: string): string {\n if (typeof value !== 'string') {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a text operand`, path);\n }\n return value;\n}\n\nfunction roundingModeArgument(value: RuntimeValue, path: string): RoundingMode {\n const mode = ROUNDING_MODES.find((candidate) => candidate === value);\n if (mode === undefined) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `rounding mode must be one of ${ROUNDING_MODES.join(', ')}`,\n path,\n );\n }\n return mode;\n}\n\nfunction moneyArgument(value: RuntimeValue, op: ExprOperator, path: string): MoneyValue {\n if (!isRecord(value)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a money operand`, path);\n }\n return toMoneyValue(value, path);\n}\n\n/** Reads a decimal-typed element of an aggregate operand. */\nfunction elementArgument(value: RuntimeValue, op: ExprOperator, path: string): DecimalString {\n if (isUndetermined(value)) {\n throw new AxiomError('ENGINE_ERROR', `${op} reached an undetermined element`, path);\n }\n return decimalArgument(value, op, path);\n}\n\n/** The declared domains a value-only call may know about its arguments. */\nexport interface BuiltinOperandDomains {\n /** The declared domain of each argument, where the caller holds one. */\n readonly domains?: readonly (LiteralDomain | undefined)[];\n /**\n * The declared domain of each element of a list argument. A documentation example states\n * its literals, so `sort([decimal \"9\", decimal \"10\"])` orders numerically there exactly as\n * the compiled evaluator does with the list's element domains.\n */\n readonly elementDomains?: readonly (LiteralDomain | undefined)[];\n}\n\n/**\n * The elements of a list operand for `sort`, `slice`, `distinct` and `reverse`.\n *\n * An element this device cannot decide aborts the whole answer with that sentinel: a list\n * missing one member is not a sorted, deduplicated or reversed form of the input. Each kept\n * element carries the declared element domain the caller stated, which is what makes a\n * decimal list order numerically in the value-only door too.\n */\nfunction sequenceOperand(\n op: ImplementedOperator,\n args: readonly RuntimeValue[],\n operandDomains: BuiltinOperandDomains,\n path: string,\n): readonly SequenceElement[] | Undetermined {\n ensureArity(op, args, op === 'slice' ? 3 : 1, path);\n const operand = args[0];\n if (operand === undefined || operand === null) return UNKNOWN;\n if (isUndetermined(operand)) return operand;\n if (!Array.isArray(operand)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a list`, path);\n }\n const elements: SequenceElement[] = [];\n let deferred: Undetermined | undefined;\n for (const [index, element] of operand.entries()) {\n if (isUndetermined(element)) {\n if (element.undetermined === 'UNKNOWN') return element;\n deferred ??= element;\n continue;\n }\n elements.push({ value: element, domain: operandDomains.elementDomains?.[index] });\n }\n if (deferred !== undefined) return deferred;\n return elements;\n}\n\n/**\n * The ISO 8601 weekday of a civil date: Monday is 1 and Sunday is 7.\n *\n * The derivation is a day count, not a host `Date`: `daysFromCivil` puts 1970-01-01 (a\n * Thursday) at zero, so adding three and taking the residue names Thursday as 4.\n */\nfunction weekdayOf(date: {\n readonly year: number;\n readonly month: number;\n readonly day: number;\n}): number {\n const sinceEpoch = daysFromCivil(date.year, date.month, date.day);\n return ((((sinceEpoch + 3) % 7) + 7) % 7) + 1;\n}\n\n/**\n * Applies one built-in to already-evaluated arguments. This is the single place the\n * walking-skeleton operators are implemented: `evaluate` dispatches compiled `call`\n * nodes here, and a docs example executor reaches the same behaviour rather than a\n * second copy of it.\n *\n * `operandDomains` is the caller's statement of what it knows: a compiled artifact passes\n * the domains its declarations pin, and a documentation example passes its literals'. A\n * caller that states nothing gets the value-only reading, never a guess that a string is a\n * number.\n */\nexport function applyBuiltin(\n op: ImplementedOperator,\n args: readonly RuntimeValue[],\n path = '',\n operandDomains: BuiltinOperandDomains = {},\n): RuntimeValue {\n switch (op) {\n case 'sum': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (operand === undefined)\n throw new AxiomError('ENGINE_ERROR', `${op} requires a list`, path);\n if (isUndetermined(operand)) return operand;\n if (operand === null) return UNKNOWN;\n if (!Array.isArray(operand)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a list`, path);\n }\n return sumDecimals(\n operand.map((element: RuntimeValue) =>\n isUndetermined(element)\n ? element\n : element === null\n ? UNKNOWN\n : elementArgument(element, op, path),\n ),\n path,\n );\n }\n case 'between': {\n // Arity first: a call with the wrong width is refused even when an operand is\n // undetermined, because the shape is wrong whatever the value would have been.\n ensureArity(op, args, 3, path);\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n const value = args[0];\n const low = args[1];\n const high = args[2];\n if (value === undefined || low === undefined || high === undefined) {\n throw new AxiomError('ENGINE_ERROR', 'between requires three operands', path);\n }\n if (value === null || low === null || high === null) return UNKNOWN;\n const domains = operandDomains.domains;\n const at = (index: number, argument: RuntimeValue): ReturnType<typeof domained> => ({\n value: argument,\n domain: domains?.[index],\n });\n // The language's own order (`EXPR-6.1.14`), stated once in `ordering.ts`: numeric across\n // integer/decimal, money by currency and scale, quantity by unit, text and dates by code\n // point. Comparing the canonical spellings as JavaScript text answered `false` for\n // `between(decimal \"10\", decimal \"9\", decimal \"20\")` and refused a money operand the\n // compiler had admitted.\n const lower = compareByDomain(at(1, low), at(0, value), path);\n const upper = compareByDomain(at(0, value), at(2, high), path);\n if (lower === undefined || upper === undefined) {\n throw new AxiomError('ENGINE_ERROR', 'between requires comparable operands', path);\n }\n return lower <= 0 && upper <= 0;\n }\n case 'len': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const operand = args[0] ?? null;\n if (typeof operand === 'string') return codePointLength(operand);\n if (Array.isArray(operand)) return operand.length;\n throw new AxiomError('ENGINE_ERROR', 'len requires a text or list operand', path);\n }\n case 'lower':\n case 'upper': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const text = stringArgument(args[0] ?? null, op, path);\n return op === 'lower' ? asciiLower(text) : asciiUpper(text);\n }\n case 'trim': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return trimAsciiWhitespace(stringArgument(args[0] ?? null, op, path));\n }\n case 'is_email':\n case 'is_phone':\n case 'is_url': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const text = stringArgument(args[0] ?? null, op, path);\n if (op === 'is_email') return isEmailAddress(text);\n return op === 'is_phone' ? isE164PhoneNumber(text) : isHttpUrl(text);\n }\n case 'empty': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n // `empty` asks whether a value has content. An explicit `null`, empty text and an\n // empty list have none; a zero and a false are values the author recorded, so answering\n // `true` for them would make a meaningful `0` indistinguishable from nothing. A sentinel\n // decides the question rather than answering `false`; absence is a property of a path, so\n // that answer — and the access refusal — belong to the evaluator.\n if (isUndetermined(operand)) return operand;\n return operand === null || operand === '' || (Array.isArray(operand) && operand.length === 0);\n }\n case 'to_decimal': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return decimalArgument(args[0] ?? null, op, path);\n }\n case 'to_string': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const operand = args[0] ?? null;\n // A decimal, a date and an instant are already canonical text on the wire, so the\n // cast renders the domains that are not text and passes text through. Money renders\n // its amount at its declared scale through the one display formatter.\n if (typeof operand === 'string') return operand;\n if (typeof operand === 'boolean') return operand ? 'true' : 'false';\n if (typeof operand === 'number' && isSafeInteger(operand)) {\n return String(operand);\n }\n if (operand !== null && typeof operand === 'object' && !Array.isArray(operand)) {\n const members = operand as Readonly<Record<string, unknown>>;\n if ('minor' in members || 'currency' in members || 'scale' in members) {\n const money = toMoneyValue(members, path);\n const text = moneyAmountText(money.minor, money.scale);\n if (text === undefined) {\n throw new AxiomError('ENGINE_ERROR', 'money amount is not canonical', path);\n }\n return text;\n }\n }\n throw new AxiomError('ENGINE_ERROR', 'to_string requires a scalar operand', path);\n }\n case 'parse_integer': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return parseIntegerText(stringArgument(args[0] ?? null, op, path));\n }\n case 'parse_decimal': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return tryDecimalString(stringArgument(args[0] ?? null, op, path)) ?? null;\n }\n case 'starts_with':\n case 'ends_with': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const text = stringArgument(args[0] ?? null, op, path);\n const prefix = stringArgument(args[1] ?? null, op, path);\n return op === 'starts_with' ? text.startsWith(prefix) : text.endsWith(prefix);\n }\n case 'contains': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n // The list form is answered by the evaluator, which keeps each member's declared\n // domain; this path is the literal substring test of.\n const text = stringArgument(args[0] ?? null, op, path);\n const part = stringArgument(args[1] ?? null, op, path);\n return text.includes(part);\n }\n case 'ascii_match': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const subject = stringArgument(args[0] ?? null, op, path);\n const source = stringArgument(args[1] ?? null, op, path);\n // A pattern the compiler could not see (it arrived as a value) is still refused\n // before matching, and as a runtime failure the report can carry.\n let pattern;\n try {\n pattern = compilePattern(source);\n } catch (error) {\n if (!(error instanceof AxiomError)) throw error;\n // The operator is not a location: the report names the path the call was reached\n // from (empty when the evaluator has none), never `ascii_match` itself.\n throw new AxiomError(\n 'ENGINE_ERROR',\n `pattern is outside the supported subset: ${error.message}`,\n path,\n );\n }\n return matchCompiledPattern(pattern, subject);\n }\n case 'round':\n case 'round_up':\n case 'round_down':\n case 'round_even': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const mode =\n op === 'round'\n ? 'half_up'\n : op === 'round_up'\n ? 'up'\n : op === 'round_down'\n ? 'down'\n : 'half_even';\n return roundDecimal(\n decimalArgument(args[0] ?? null, op, path),\n integerArgument(args[1] ?? null, op, path),\n mode,\n path,\n );\n }\n case 'rule_ok_in':\n case 'no_blocking_in':\n case 'required_in':\n // These read fellow rules of an evaluation, so an example notation with no rule host\n // has nothing to fold: it answers undecided, the same answer an absent capability gives.\n ensureArity(op, args, 1, path);\n return UNKNOWN;\n case 'pow': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const base = args[0];\n const exponent = args[1];\n if (typeof base !== 'number' && typeof base !== 'string') {\n throw new AxiomError('ENGINE_ERROR', 'pow requires an integer or decimal base', path);\n }\n if (typeof exponent !== 'number' && typeof exponent !== 'string') {\n throw new AxiomError('ENGINE_ERROR', 'pow requires an integer or decimal exponent', path);\n }\n return numericPower(base, exponent, path);\n }\n case 'money_minor':\n case 'money_from_minor':\n case 'money_currency':\n case 'money_scale': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n if (op === 'money_minor') {\n ensureArity(op, args, 1, path);\n return moneyMinor(moneyArgument(args[0] ?? null, op, path), path);\n }\n if (op === 'money_currency' || op === 'money_scale') {\n ensureArity(op, args, 1, path);\n const money = moneyArgument(args[0] ?? null, op, path);\n return op === 'money_currency' ? money.currency : money.scale;\n }\n ensureArity(op, args, 4, path);\n const [minor, currency, scale, mode] = args;\n return moneyFromMinor(\n decimalArgument(minor ?? null, op, path),\n stringArgument(currency ?? null, op, path),\n integerArgument(scale ?? null, op, path),\n roundingModeArgument(mode ?? null, path),\n path,\n );\n }\n case 'add_days':\n case 'add_months': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const date = parsePlainDate(stringArgument(args[0] ?? null, op, path), path);\n const amount = integerArgument(args[1] ?? null, op, path);\n return formatPlainDate(\n op === 'add_days' ? addDays(date, amount, path) : addMonths(date, amount, path),\n path,\n );\n }\n case 'add_minutes': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const first = stringArgument(args[0] ?? null, op, path);\n const amount = integerArgument(args[1] ?? null, op, path);\n // A `time` is a clock reading, so its arithmetic wraps inside the day; an instant is a UTC\n // point, so its arithmetic continues into the next one. The spelling, not a declaration,\n // distinguishes them because the function is total over both domains.\n if (TIME_PATTERN.test(first)) return addMinutesToTime(first, amount, path);\n return addMinutesToInstant(parseInstant(first, path), amount, path);\n }\n case 'days_between':\n case 'months_between': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const from = parsePlainDate(stringArgument(args[0] ?? null, op, path), path);\n const to = parsePlainDate(stringArgument(args[1] ?? null, op, path), path);\n return op === 'days_between' ? daysBetween(from, to) : monthsBetween(from, to);\n }\n case 'minutes_between': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const first = args[0] ?? null;\n const second = args[1] ?? null;\n if (typeof first === 'string' && typeof second === 'string' && TIME_PATTERN.test(first)) {\n return minutesBetweenTimes(first, second, path);\n }\n if (isDurationShaped(first) && isDurationShaped(second)) {\n return minutesBetweenDurations(first, second, path);\n }\n return minutesBetweenInstants(\n stringArgument(first, op, path),\n stringArgument(second, op, path),\n path,\n );\n }\n case 'duration_minutes':\n case 'duration_seconds': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const value = args[0] ?? null;\n return op === 'duration_minutes'\n ? durationMinutes(value, path)\n : durationSeconds(value, path);\n }\n case 'abs': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const operand = args[0] ?? null;\n // Money keeps its currency and scale: the magnitude is the minor amount's, never a\n // rescale or a re-spelling through the rendered amount.\n if (isRecord(operand)) {\n const money = moneyArgument(operand, op, path);\n const minor = BigInt(money.minor);\n return { ...money, minor: (minor < 0n ? -minor : minor).toString() };\n }\n if (typeof operand === 'number') {\n if (!isSafeInteger(operand)) {\n throw new AxiomError('ENGINE_ERROR', 'abs requires an exact decimal operand', path);\n }\n // `Math.abs` of a safe integer is a safe integer, and `-0` cannot survive it.\n return Math.abs(operand);\n }\n if (typeof operand === 'string') return absDecimalText(asDecimalString(operand, path), path);\n throw new AxiomError('ENGINE_ERROR', 'abs requires a number, decimal or money operand', path);\n }\n case 'ceil':\n case 'floor': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n const decimal = decimalArgument(args[0] ?? null, op, path);\n // `ceiling` is toward positive infinity and `floor` toward negative infinity, so the\n // negative cases are the ones a careless \"away from zero\" would get wrong.\n return op === 'ceil' ? ceilDecimal(decimal, path) : floorDecimal(decimal, path);\n }\n case 'avg':\n case 'median': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (isUndetermined(operand)) return operand;\n if (operand === null || operand === undefined) return UNKNOWN;\n if (!Array.isArray(operand)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a list`, path);\n }\n const values: RuntimeValue[] = [];\n let deferred: Undetermined | undefined;\n for (const element of operand) {\n // `null` is the empty value and a missing reading, not a zero, so it decides the\n // aggregate rather than being skipped (`EXPR-10.2.3`).\n if (element === null) return UNKNOWN;\n if (isUndetermined(element)) {\n if (element.undetermined === 'UNKNOWN') return UNKNOWN;\n deferred ??= element;\n continue;\n }\n values.push(element);\n }\n // No partial result: a deferred element could belong to any class, so the answer waits.\n if (deferred !== undefined) return deferred;\n return op === 'avg' ? averageValue(values, path) : medianValue(values, path);\n }\n case 'first':\n case 'last': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (isUndetermined(operand)) return operand;\n if (operand === null || operand === undefined) return UNKNOWN;\n if (!Array.isArray(operand)) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a list`, path);\n }\n // An empty list is the empty value `null`, the binder's own convention for a boundary\n // with no neighbour (`EXPR-10.1.2`).\n return op === 'first' ? firstValue(operand) : lastValue(operand);\n }\n case 'replace': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 3, path);\n const text = stringArgument(args[0] ?? null, op, path);\n const find = stringArgument(args[1] ?? null, op, path);\n // An empty needle has no occurrence rule that is not degenerate, so it is refused here\n // for a computed needle exactly as the checker refuses a literal one.\n if (find === '') {\n throw new AxiomError('ENGINE_ERROR', 'replace requires a non-empty find operand', path);\n }\n return replaceAllLiteral(text, find, stringArgument(args[2] ?? null, op, path));\n }\n case 'split': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const text = stringArgument(args[0] ?? null, op, path);\n const separator = stringArgument(args[1] ?? null, op, path);\n if (separator === '') {\n throw new AxiomError('ENGINE_ERROR', 'split requires a non-empty separator operand', path);\n }\n return splitLiteral(text, separator);\n }\n case 'join': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n const list = args[0] ?? null;\n const separator = stringArgument(args[1] ?? null, op, path);\n // `propagated` lifts a `null` list to UNKNOWN, so a non-array here is a value the list\n // signature does not admit.\n if (!Array.isArray(list)) {\n throw new AxiomError('ENGINE_ERROR', 'join requires a list of text', path);\n }\n const parts: string[] = [];\n for (const item of list) {\n if (typeof item !== 'string') {\n throw new AxiomError('ENGINE_ERROR', 'join requires a list of text', path);\n }\n parts.push(item);\n }\n return parts.join(separator);\n }\n case 'substring': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 3, path);\n const text = stringArgument(args[0] ?? null, op, path);\n const start = integerArgument(args[1] ?? null, op, path);\n const length = integerArgument(args[2] ?? null, op, path);\n if (start < 0 || length < 0) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'substring requires a non-negative start and length',\n path,\n );\n }\n return substringCodePoints(text, start, length);\n }\n case 'index_of': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n return indexOfCodePoints(\n stringArgument(args[0] ?? null, op, path),\n stringArgument(args[1] ?? null, op, path),\n );\n }\n case 'add_years': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 2, path);\n return formatPlainDate(\n addYears(\n parsePlainDate(stringArgument(args[0] ?? null, op, path), path),\n integerArgument(args[1] ?? null, op, path),\n path,\n ),\n path,\n );\n }\n case 'start_of_day': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return startOfDayInstant(stringArgument(args[0] ?? null, op, path), path);\n }\n case 'civil_date': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n ensureArity(op, args, 1, path);\n return civilDateOfInstant(stringArgument(args[0] ?? null, op, path), path);\n }\n case 'matches': {\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n if (args.length !== 2 && args.length !== 3) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `matches takes 2 to 3 arguments but received ${String(args.length)}`,\n path,\n );\n }\n const subject = stringArgument(args[0] ?? null, op, path);\n const pattern = stringArgument(args[1] ?? null, op, path);\n const flags = args.length === 3 ? stringArgument(args[2] ?? null, op, path) : '';\n const outcome = matchRegex(subject, pattern, flags);\n if (outcome.kind !== 'tested') throw regexRefusalError(outcome, path);\n return outcome.matched;\n }\n case 'mode': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (isUndetermined(operand)) return operand;\n if (operand === null || operand === undefined) return UNKNOWN;\n if (!Array.isArray(operand)) {\n throw new AxiomError('ENGINE_ERROR', 'mode requires a list', path);\n }\n const values: RuntimeValue[] = [];\n let deferred: Undetermined | undefined;\n for (const element of operand) {\n if (element === null) return UNKNOWN;\n if (isUndetermined(element)) {\n if (element.undetermined === 'UNKNOWN') return UNKNOWN;\n deferred ??= element;\n continue;\n }\n values.push(element);\n }\n if (deferred !== undefined) return deferred;\n return modeValue(values, undefined, path);\n }\n case 'year':\n case 'month':\n case 'day':\n case 'weekday': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (operand === undefined) {\n throw new AxiomError('ENGINE_ERROR', `${op} requires a date operand`, path);\n }\n if (isUndetermined(operand)) return operand;\n // The empty value lifts to `UNKNOWN`, as it does for every operator that reads a\n // component: `year(null)` is not the year zero.\n if (operand === null) return UNKNOWN;\n const date = parsePlainDate(stringArgument(operand, op, path), path);\n switch (op) {\n case 'year':\n return date.year;\n case 'month':\n return date.month;\n case 'day':\n return date.day;\n case 'weekday':\n return weekdayOf(date);\n }\n }\n case 'parse_date': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (operand === undefined) {\n throw new AxiomError('ENGINE_ERROR', 'parse_date requires a text operand', path);\n }\n if (isUndetermined(operand)) return operand;\n if (operand === null) return null;\n if (typeof operand !== 'string') {\n throw new AxiomError('ENGINE_ERROR', 'parse_date requires a text operand', path);\n }\n try {\n return formatPlainDate(parsePlainDate(operand, path));\n } catch {\n // A miss is the empty value, never an error: the text a caller typed is data, and a\n // calendar day that does not exist (`2026-02-30`) is a miss like any other.\n return null;\n }\n }\n case 'parse_instant': {\n ensureArity(op, args, 1, path);\n const operand = args[0];\n if (operand === undefined) {\n throw new AxiomError('ENGINE_ERROR', 'parse_instant requires a text operand', path);\n }\n if (isUndetermined(operand)) return operand;\n if (operand === null) return null;\n if (typeof operand !== 'string') {\n throw new AxiomError('ENGINE_ERROR', 'parse_instant requires a text operand', path);\n }\n try {\n return parseInstant(operand, path);\n } catch {\n return null;\n }\n }\n case 'sort':\n case 'distinct':\n case 'reverse':\n case 'slice': {\n const read = sequenceOperand(op, args, operandDomains, path);\n if (isUndetermined(read)) return read;\n const algebra: SequenceAlgebra = {\n compare: (left, right, operandPath) => compareByDomain(left, right, operandPath),\n equal: (left, right, operandPath) => equalByDomain(left, right, operandPath),\n };\n switch (op) {\n case 'sort':\n return sortElements(read, algebra, path).map((element) => element.value);\n case 'distinct':\n return distinctElements(read, algebra, path).map((element) => element.value);\n case 'reverse':\n return reverseElements(read).map((element) => element.value);\n case 'slice': {\n const start = integerArgument(args[1] ?? null, op, path);\n const count = integerArgument(args[2] ?? null, op, path);\n return sliceElements(read, start, count, path).map((element) => element.value);\n }\n }\n }\n case 'concat': {\n // Variadic with the signature's bound; the compiler refuses a count outside it, and this\n // is the refusal a hand-built artifact meets. An undetermined operand propagates with\n // `UNKNOWN` beating `DEFERRED`, the same fold the fixed-arity operators use.\n if (args.length < 2 || args.length > 32) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `concat takes 2 to 32 arguments but received ${String(args.length)}`,\n path,\n );\n }\n const undetermined = propagated(args);\n if (undetermined !== undefined) return undetermined;\n // One pass, one accumulator: the common call allocates no intermediate list.\n let text = '';\n for (const [index, argument] of args.entries()) {\n if (typeof argument !== 'string') {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `concat argument ${String(index + 1)} requires a text operand, got ${argument === null ? 'null' : typeof argument}`,\n path,\n );\n }\n text += argument;\n }\n return text;\n }\n default:\n return assertNever(op);\n }\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
/**
|
|
3
|
+
* The working decimal constructor one arithmetic operand needs, and how much this module retains.
|
|
4
|
+
*
|
|
5
|
+
* `pow` is the one operation that does not work on scaled integers: it hands `decimal.js` both
|
|
6
|
+
* operands at a precision wide enough to hold every significant digit they carry, because an
|
|
7
|
+
* operand the wire admitted must not be rounded before the power is computed. The cost is a
|
|
8
|
+
* constructor clone per width.
|
|
9
|
+
*
|
|
10
|
+
* The width is not a closed set. A stored decimal is canonical text whose integer and fractional
|
|
11
|
+
* runs each reach the decimal exponent budget (4096 digits), so a record can name thousands of
|
|
12
|
+
* distinct widths, and a host that validates records for a shift sees one per request. Caching a
|
|
13
|
+
* constructor per width would grow this module by ~3.5 KB for every width a record has ever
|
|
14
|
+
* named, with nothing to release it — the map is process-global and no session owns it.
|
|
15
|
+
*
|
|
16
|
+
* The policy is therefore two-tiered, with a ceiling this file states rather than implies:
|
|
17
|
+
*
|
|
18
|
+
* - the result budget's own constructor is the one the caller already holds (`AxiomDecimal`);
|
|
19
|
+
* - a wider operand reaches a small fixed cache, so an item rule over a list that shares one
|
|
20
|
+
* width pays one clone rather than one per row. `MAX_RETAINED_WORKING_DECIMALS` bounds it at
|
|
21
|
+
* four constructors — about 14 KB at the ~3.5 KB each `Decimal.clone` costs — and the oldest
|
|
22
|
+
* width is dropped when a fifth arrives. Four covers the two operands of `pow` across the
|
|
23
|
+
* widths a form's own fields declare, and a record that cycles through more widths than that
|
|
24
|
+
* evicts rather than accumulates.
|
|
25
|
+
*
|
|
26
|
+
* `retainedWorkingDecimals` is a measurement hook, never an input: no decision reads it.
|
|
27
|
+
*/
|
|
28
|
+
/** The widest number of wider-precision constructors this module keeps. */
|
|
29
|
+
export declare const MAX_RETAINED_WORKING_DECIMALS = 4;
|
|
30
|
+
export declare function workingDecimal(precision: number, resultBudget: number, budgetConstructor: Decimal.Constructor): Decimal.Constructor;
|
|
31
|
+
/** The working-precision constructors this module retains: at most the stated ceiling. */
|
|
32
|
+
export declare function retainedWorkingDecimals(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Clears the retained constructors. A test seam: the cache is process-global by design, so a
|
|
35
|
+
* case that measures what it retains must start from a known state rather than the order the
|
|
36
|
+
* shuffle chose.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resetRetainedWorkingDecimals(): void;
|
|
39
|
+
//# sourceMappingURL=decimal-precision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal-precision.d.ts","sourceRoot":"","sources":["../../src/expr/decimal-precision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAI/C,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,OAAO,CAAC,WAAW,GACrC,OAAO,CAAC,WAAW,CAerB;AAED,0FAA0F;AAC1F,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
/**
|
|
3
|
+
* The working decimal constructor one arithmetic operand needs, and how much this module retains.
|
|
4
|
+
*
|
|
5
|
+
* `pow` is the one operation that does not work on scaled integers: it hands `decimal.js` both
|
|
6
|
+
* operands at a precision wide enough to hold every significant digit they carry, because an
|
|
7
|
+
* operand the wire admitted must not be rounded before the power is computed. The cost is a
|
|
8
|
+
* constructor clone per width.
|
|
9
|
+
*
|
|
10
|
+
* The width is not a closed set. A stored decimal is canonical text whose integer and fractional
|
|
11
|
+
* runs each reach the decimal exponent budget (4096 digits), so a record can name thousands of
|
|
12
|
+
* distinct widths, and a host that validates records for a shift sees one per request. Caching a
|
|
13
|
+
* constructor per width would grow this module by ~3.5 KB for every width a record has ever
|
|
14
|
+
* named, with nothing to release it — the map is process-global and no session owns it.
|
|
15
|
+
*
|
|
16
|
+
* The policy is therefore two-tiered, with a ceiling this file states rather than implies:
|
|
17
|
+
*
|
|
18
|
+
* - the result budget's own constructor is the one the caller already holds (`AxiomDecimal`);
|
|
19
|
+
* - a wider operand reaches a small fixed cache, so an item rule over a list that shares one
|
|
20
|
+
* width pays one clone rather than one per row. `MAX_RETAINED_WORKING_DECIMALS` bounds it at
|
|
21
|
+
* four constructors — about 14 KB at the ~3.5 KB each `Decimal.clone` costs — and the oldest
|
|
22
|
+
* width is dropped when a fifth arrives. Four covers the two operands of `pow` across the
|
|
23
|
+
* widths a form's own fields declare, and a record that cycles through more widths than that
|
|
24
|
+
* evicts rather than accumulates.
|
|
25
|
+
*
|
|
26
|
+
* `retainedWorkingDecimals` is a measurement hook, never an input: no decision reads it.
|
|
27
|
+
*/
|
|
28
|
+
/** The widest number of wider-precision constructors this module keeps. */
|
|
29
|
+
export const MAX_RETAINED_WORKING_DECIMALS = 4;
|
|
30
|
+
const retained = new Map();
|
|
31
|
+
export function workingDecimal(precision, resultBudget, budgetConstructor) {
|
|
32
|
+
if (precision === resultBudget)
|
|
33
|
+
return budgetConstructor;
|
|
34
|
+
const cached = retained.get(precision);
|
|
35
|
+
if (cached !== undefined)
|
|
36
|
+
return cached;
|
|
37
|
+
const constructor = Decimal.clone({
|
|
38
|
+
precision,
|
|
39
|
+
toExpNeg: -9e15,
|
|
40
|
+
toExpPos: 9e15,
|
|
41
|
+
});
|
|
42
|
+
if (retained.size >= MAX_RETAINED_WORKING_DECIMALS) {
|
|
43
|
+
const oldest = retained.keys().next();
|
|
44
|
+
if (!oldest.done)
|
|
45
|
+
retained.delete(oldest.value);
|
|
46
|
+
}
|
|
47
|
+
retained.set(precision, constructor);
|
|
48
|
+
return constructor;
|
|
49
|
+
}
|
|
50
|
+
/** The working-precision constructors this module retains: at most the stated ceiling. */
|
|
51
|
+
export function retainedWorkingDecimals() {
|
|
52
|
+
return retained.size;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Clears the retained constructors. A test seam: the cache is process-global by design, so a
|
|
56
|
+
* case that measures what it retains must start from a known state rather than the order the
|
|
57
|
+
* shuffle chose.
|
|
58
|
+
*/
|
|
59
|
+
export function resetRetainedWorkingDecimals() {
|
|
60
|
+
retained.clear();
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=decimal-precision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal-precision.js","sourceRoot":"","sources":["../../src/expr/decimal-precision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+B,CAAC;AAExD,MAAM,UAAU,cAAc,CAC5B,SAAiB,EACjB,YAAoB,EACpB,iBAAsC;IAEtC,IAAI,SAAS,KAAK,YAAY;QAAE,OAAO,iBAAiB,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;QAChC,SAAS;QACT,QAAQ,EAAE,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,IAAI,IAAI,6BAA6B,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,IAAI;YAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IACD,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACrC,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,uBAAuB;IACrC,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B;IAC1C,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC","sourcesContent":["import { Decimal } from 'decimal.js';\n\n/**\n * The working decimal constructor one arithmetic operand needs, and how much this module retains.\n *\n * `pow` is the one operation that does not work on scaled integers: it hands `decimal.js` both\n * operands at a precision wide enough to hold every significant digit they carry, because an\n * operand the wire admitted must not be rounded before the power is computed. The cost is a\n * constructor clone per width.\n *\n * The width is not a closed set. A stored decimal is canonical text whose integer and fractional\n * runs each reach the decimal exponent budget (4096 digits), so a record can name thousands of\n * distinct widths, and a host that validates records for a shift sees one per request. Caching a\n * constructor per width would grow this module by ~3.5 KB for every width a record has ever\n * named, with nothing to release it — the map is process-global and no session owns it.\n *\n * The policy is therefore two-tiered, with a ceiling this file states rather than implies:\n *\n * - the result budget's own constructor is the one the caller already holds (`AxiomDecimal`);\n * - a wider operand reaches a small fixed cache, so an item rule over a list that shares one\n * width pays one clone rather than one per row. `MAX_RETAINED_WORKING_DECIMALS` bounds it at\n * four constructors — about 14 KB at the ~3.5 KB each `Decimal.clone` costs — and the oldest\n * width is dropped when a fifth arrives. Four covers the two operands of `pow` across the\n * widths a form's own fields declare, and a record that cycles through more widths than that\n * evicts rather than accumulates.\n *\n * `retainedWorkingDecimals` is a measurement hook, never an input: no decision reads it.\n */\n\n/** The widest number of wider-precision constructors this module keeps. */\nexport const MAX_RETAINED_WORKING_DECIMALS = 4;\n\nconst retained = new Map<number, Decimal.Constructor>();\n\nexport function workingDecimal(\n precision: number,\n resultBudget: number,\n budgetConstructor: Decimal.Constructor,\n): Decimal.Constructor {\n if (precision === resultBudget) return budgetConstructor;\n const cached = retained.get(precision);\n if (cached !== undefined) return cached;\n const constructor = Decimal.clone({\n precision,\n toExpNeg: -9e15,\n toExpPos: 9e15,\n });\n if (retained.size >= MAX_RETAINED_WORKING_DECIMALS) {\n const oldest = retained.keys().next();\n if (!oldest.done) retained.delete(oldest.value);\n }\n retained.set(precision, constructor);\n return constructor;\n}\n\n/** The working-precision constructors this module retains: at most the stated ceiling. */\nexport function retainedWorkingDecimals(): number {\n return retained.size;\n}\n\n/**\n * Clears the retained constructors. A test seam: the cache is process-global by design, so a\n * case that measures what it retains must start from a known state rather than the order the\n * shuffle chose.\n */\nexport function resetRetainedWorkingDecimals(): void {\n retained.clear();\n}\n"]}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
import type { DecimalString, RoundingMode } from '../model/types.js';
|
|
3
|
+
/** Significant digits an exact decimal carries. */
|
|
4
|
+
export declare const DECIMAL_PRECISION = 34;
|
|
5
|
+
/**
|
|
6
|
+
* The fractional digits a canonical decimal value carries, `MODEL-2.1.27`.
|
|
7
|
+
*
|
|
8
|
+
* Canonical text admits no trailing fractional zero (`1.50` is refused as a non-canonical
|
|
9
|
+
* spelling of `1.5`), so this is the scale the value states: `1.25` is two and `1.5` is one.
|
|
10
|
+
* The two equal numbers that differ here are `1.5` and `1.50` as *authored text*, and only the
|
|
11
|
+
* canonical one is a value; the count is still what a `maxScale` bound judges.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fractionalDigitCount(text: DecimalString): number;
|
|
14
|
+
/**
|
|
15
|
+
* The decimal exponent range the runtime will render. Canonical text has
|
|
16
|
+
* no exponent form, so a magnitude beyond this needs more integer (or leading fractional)
|
|
17
|
+
* digits than the language's other text caps, and is refused rather than materialised. A
|
|
18
|
+
* small authored expression can otherwise ask `pow` for a value whose text is petabytes
|
|
19
|
+
* long: `2` raised to the largest canonical integer exponent is finite in decimal.js.
|
|
20
|
+
*
|
|
21
|
+
* Exported because a message count is admitted to the same budget before plural selection:
|
|
22
|
+
* arithmetic and message rendering must not disagree about how wide a value the engine carries.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MAX_DECIMAL_EXPONENT = 4096;
|
|
25
|
+
/**
|
|
26
|
+
* The runtime's own decimal constructor. Cloning keeps Axiom's precision and output
|
|
27
|
+
* format out of the global `Decimal` configuration a host may already have changed,
|
|
28
|
+
* and disabling exponent output keeps text canonical without a second formatting pass.
|
|
29
|
+
*/
|
|
30
|
+
export declare const AxiomDecimal: Decimal.Constructor;
|
|
31
|
+
/**
|
|
32
|
+
* The authoring constructor of the `DecimalString` brand. Text that is not already canonical
|
|
33
|
+
* decimal text is refused rather than normalised, because two spellings of one amount must not
|
|
34
|
+
* be two values.
|
|
35
|
+
*
|
|
36
|
+
* The refusal repeats the text because its caller is an author reading a diagnostic about a
|
|
37
|
+
* literal they just wrote, and seeing the spelling is what makes the fix obvious. A value a
|
|
38
|
+
* person *submitted* is a different caller: `asWireDecimalString` is that door.
|
|
39
|
+
*/
|
|
40
|
+
export declare function asDecimalString(text: string, path?: string): DecimalString;
|
|
41
|
+
/**
|
|
42
|
+
* The wire constructor of the `DecimalString` brand: canonical decimal text as a submission
|
|
43
|
+
* states it, refused with the path and the cause but never with the text.
|
|
44
|
+
*
|
|
45
|
+
* Both constructors accept exactly the same text; only the refusal differs. `asDecimalString`
|
|
46
|
+
* echoes the value to the author who typed it, while this entry's caller is the wire reader
|
|
47
|
+
* holding a value someone submitted — possibly for a field the artifact hides — and its
|
|
48
|
+
* refusal is data: `evaluateSubmission` returns it as `detail`, which a backend may relay. The
|
|
49
|
+
* path already names the seat the value was read from; repeating the text would add nothing an
|
|
50
|
+
* operator can act on and everything a hidden field must not disclose.
|
|
51
|
+
*
|
|
52
|
+
* The path is required. A refusal about an untrusted value at no stated place is a refusal an
|
|
53
|
+
* operator cannot trace, and the wire reader always knows the path it read.
|
|
54
|
+
*/
|
|
55
|
+
export declare function asWireDecimalString(text: string, path: string): DecimalString;
|
|
56
|
+
/**
|
|
57
|
+
* Canonical decimal text the numeric budget can carry, or `undefined` when the text is
|
|
58
|
+
* not one. `parse_decimal` answers from this rather than from a thrown refusal, so text a
|
|
59
|
+
* caller typed is an ordinary `null` result and never an engine error
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export declare function tryDecimalString(text: string): DecimalString | undefined;
|
|
63
|
+
/** Parses canonical decimal text as a literal, refusing anything the literal budget cannot carry. */
|
|
64
|
+
export declare function parseDecimal(text: string, path?: string): Decimal;
|
|
65
|
+
/** Renders a finite decimal as canonical text, normalising `-0` to `0`. */
|
|
66
|
+
export declare function canonicalDecimal(value: Decimal, path?: string): DecimalString;
|
|
67
|
+
/**
|
|
68
|
+
* Rounds a decimal to `scale` fraction digits and renders the canonical result. An
|
|
69
|
+
* unknown mode is refused rather than defaulted: a silent `half_up` would be a rounding
|
|
70
|
+
* policy the artifact never declared.
|
|
71
|
+
*
|
|
72
|
+
* The operand is rounded as the exact integer it is, so a stored value above the result
|
|
73
|
+
* budget is accepted and only the rendered result is held to 34 significant digits.
|
|
74
|
+
*/
|
|
75
|
+
export declare function roundDecimal(value: DecimalString, scale: number, mode: RoundingMode, path?: string): DecimalString;
|
|
76
|
+
/**
|
|
77
|
+
* Exact comparison of two canonical decimals: negative when `a` sorts first, zero when they
|
|
78
|
+
* are the same value, positive otherwise.
|
|
79
|
+
*
|
|
80
|
+
* Comparison is not arithmetic, so it applies no significant-digit budget: a canonical value
|
|
81
|
+
* the wire accepted is compared as the digits it carries, and `x == x` holds for a value longer
|
|
82
|
+
* than the 34-digit arithmetic result budget. The text is still validated, so a spelling the
|
|
83
|
+
* brand never produced cannot be read as a value.
|
|
84
|
+
*/
|
|
85
|
+
export declare function compareDecimalTexts(a: DecimalString, b: DecimalString, path?: string): number;
|
|
86
|
+
/**
|
|
87
|
+
* Sums canonical decimals exactly. Accumulation is integer arithmetic over a common
|
|
88
|
+
* scale rather than `Decimal#plus`, because the 34-digit constructor rounds mid-sum
|
|
89
|
+
* and requires a budget overflow to fail instead of rounding.
|
|
90
|
+
*/
|
|
91
|
+
export declare function sumDecimalTexts(values: readonly DecimalString[], path?: string): DecimalString;
|
|
92
|
+
/** `-value` in canonical text, with negative zero normalised to `0`. */
|
|
93
|
+
export declare function negateDecimalText(value: DecimalString, path?: string): DecimalString;
|
|
94
|
+
/** `a - b` in canonical text: exact, so a 34-digit overflow fails rather than rounds. */
|
|
95
|
+
export declare function subtractDecimalTexts(minuend: DecimalString, subtrahend: DecimalString, path?: string): DecimalString;
|
|
96
|
+
/** `a * b` in canonical text, exactly, through the same scaled-integer path as `+`/`-`. */
|
|
97
|
+
export declare function multiplyDecimalTexts(left: DecimalString, right: DecimalString, path?: string): DecimalString;
|
|
98
|
+
/**
|
|
99
|
+
* `a / b` at the language's 34 significant digits, rounded once with `half_even`.
|
|
100
|
+
*
|
|
101
|
+
* The quotient is decided over the operands' exact scaled integers, so a repeating expansion
|
|
102
|
+
* is rounded from the exact rational rather than from an already-rounded intermediate. The
|
|
103
|
+
* operands are not rounded to the result budget before the division: only the rendered result
|
|
104
|
+
* is held to 34 significant digits, exactly as `+`, `-` and `*` hold their results.
|
|
105
|
+
*
|
|
106
|
+
* This is the `/` operator's arithmetic. A stated number of fraction digits is a composition:
|
|
107
|
+
* `round(a / b, places)`, or one of its named siblings.
|
|
108
|
+
*/
|
|
109
|
+
export declare function divideDecimalTexts(dividend: DecimalString, divisor: DecimalString, path?: string): DecimalString;
|
|
110
|
+
/**
|
|
111
|
+
* `pow(a, b)` for a non-negative integer exponent: repeated multiplication through the same
|
|
112
|
+
* exact path `*` uses. An intermediate or final result beyond 34 significant digits is
|
|
113
|
+
* `ENGINE_ERROR`, exactly as the equivalent chain of `*` would be.
|
|
114
|
+
*/
|
|
115
|
+
export declare function powDecimalTexts(base: DecimalString, exponent: number, path?: string): DecimalString;
|
|
116
|
+
/**
|
|
117
|
+
* `a / b`, rounded to `scale` with `mode`; a zero divisor is `ENGINE_ERROR`.
|
|
118
|
+
*
|
|
119
|
+
* The operands are scaled integers, so the quotient is decided with integer division and the
|
|
120
|
+
* remainder: no working precision, no double rounding. That keeps the exact-rational guarantee
|
|
121
|
+
* for every operand the wire admits, and only the rendered result is held to the 34-digit
|
|
122
|
+
* result budget.
|
|
123
|
+
*/
|
|
124
|
+
export declare function divideRoundDecimal(dividend: DecimalString, divisor: DecimalString, scale: number, mode: RoundingMode, path?: string): DecimalString;
|
|
125
|
+
/** A non-integer exponent must round inside six fraction digits. */
|
|
126
|
+
export declare const POW_EXPONENT_SCALE_LIMIT = 6;
|
|
127
|
+
/**
|
|
128
|
+
* `x ^ y` computed at a working precision that holds the operands, then always rounded to
|
|
129
|
+
* `scale` before it is returned. For operands inside the 34-digit budget this is the 34-digit
|
|
130
|
+
* internal precision; a wider stored operand raises the working precision rather than being
|
|
131
|
+
* rounded down. A negative base with a fractional exponent and a zero base with a negative
|
|
132
|
+
* exponent have no exact decimal value, so they are `ENGINE_ERROR` rather than a silent `NaN`
|
|
133
|
+
* or `Infinity`.
|
|
134
|
+
*/
|
|
135
|
+
export declare function powDecimal(base: DecimalString, exponent: DecimalString, scale: number, mode: RoundingMode, path?: string): DecimalString;
|
|
136
|
+
/**
|
|
137
|
+
* `pow(a, b)` when the exponent is fractional or negative: the power at the language's
|
|
138
|
+
* arithmetic precision, rounded once to 34 significant digits with `half_even`.
|
|
139
|
+
*/
|
|
140
|
+
export declare function powToPrecisionDecimal(base: DecimalString, exponent: DecimalString, path?: string): DecimalString;
|
|
141
|
+
/**
|
|
142
|
+
* `abs(x)`: the magnitude of a canonical decimal, exactly. Negating text is a sign flip, not an
|
|
143
|
+
* arithmetic operation, so no digit is touched and a 34-digit operand stays 34 digits.
|
|
144
|
+
*/
|
|
145
|
+
export declare function absDecimalText(value: DecimalString, path?: string): DecimalString;
|
|
146
|
+
/** `ceil(x)`: the least integer not below `x`, toward positive infinity. */
|
|
147
|
+
export declare function ceilDecimal(value: DecimalString, path?: string): number;
|
|
148
|
+
/** `floor(x)`: the greatest integer not above `x`, toward negative infinity. */
|
|
149
|
+
export declare function floorDecimal(value: DecimalString, path?: string): number;
|
|
150
|
+
/**
|
|
151
|
+
* `sum(values) / values.length` as exact decimal text, or `undefined` when the quotient has no
|
|
152
|
+
* finite base-10 expansion the language can carry: a reduced denominator with a prime factor
|
|
153
|
+
* other than `2` or `5`, the exponent budget, or the 34-significant-digit result budget.
|
|
154
|
+
* The language carries exact decimals, so an average that cannot be written down exactly is
|
|
155
|
+
* undecided rather than rounded: `avg([1, 2, 2])` is `UNKNOWN`, and an author who wants a
|
|
156
|
+
* stated precision writes `round(sum(xs) / count(xs), places)` (`EXPR-10.2.7`). The
|
|
157
|
+
* test is arithmetic on the reduced fraction, not a float approximation: the denominator of
|
|
158
|
+
* an exact decimal may divide only by `2` and `5`.
|
|
159
|
+
*
|
|
160
|
+
* An empty list has no count to divide by, so the caller answers `UNKNOWN` before this runs.
|
|
161
|
+
*/
|
|
162
|
+
export declare function exactAverageDecimalTexts(values: readonly DecimalString[], path?: string): DecimalString | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* `median(values)`: the middle value of the canonical decimal order, or the exact midpoint of
|
|
165
|
+
* the two middle values for an even count.
|
|
166
|
+
*
|
|
167
|
+
* Ordering is `compareDecimalTexts`, the exact decimal comparison `==` and `<` already use, so
|
|
168
|
+
* no value passes through a binary float and two spellings of one amount cannot split a list.
|
|
169
|
+
* An empty list has no element to choose, so the caller answers `UNKNOWN`.
|
|
170
|
+
*/
|
|
171
|
+
export declare function medianDecimalTexts(values: readonly DecimalString[], path?: string): DecimalString | undefined;
|
|
172
|
+
//# sourceMappingURL=decimal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../src/expr/decimal.ts"],"names":[],"mappings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