gdp-wired 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/core/bmc.js +10 -7
- package/dist/core/carry.d.ts +15 -0
- package/dist/core/carry.js +651 -0
- package/dist/core/check.js +7 -2
- package/dist/core/cli.d.ts +3 -1
- package/dist/core/cli.js +28 -8
- package/dist/core/count-attempt-work.d.ts +29 -0
- package/dist/core/count-attempt-work.js +96 -0
- package/dist/core/count-boolean-partition.d.ts +5 -0
- package/dist/core/count-boolean-partition.js +47 -0
- package/dist/core/count-bounded-quotient.d.ts +2 -0
- package/dist/core/count-bounded-quotient.js +13 -0
- package/dist/core/count-case-compose.d.ts +20 -0
- package/dist/core/count-case-compose.js +289 -0
- package/dist/core/count-cases.d.ts +24 -0
- package/dist/core/count-cases.js +321 -0
- package/dist/core/count-cert-grow.d.ts +4 -0
- package/dist/core/count-cert-grow.js +37 -0
- package/dist/core/count-cert-rename.d.ts +10 -0
- package/dist/core/count-cert-rename.js +69 -0
- package/dist/core/count-cert-transport.d.ts +11 -0
- package/dist/core/count-cert-transport.js +109 -0
- package/dist/core/count-certificate-minimize.d.ts +57 -0
- package/dist/core/count-certificate-minimize.js +263 -0
- package/dist/core/count-closed-family.d.ts +32 -0
- package/dist/core/count-closed-family.js +143 -0
- package/dist/core/count-closing-budget.d.ts +10 -0
- package/dist/core/count-closing-budget.js +49 -0
- package/dist/core/count-closing-needs.d.ts +5 -0
- package/dist/core/count-closing-needs.js +9 -0
- package/dist/core/count-completion.d.ts +9 -0
- package/dist/core/count-completion.js +27 -0
- package/dist/core/count-component-budget.d.ts +5 -0
- package/dist/core/count-component-budget.js +9 -0
- package/dist/core/count-copy-shape.d.ts +11 -0
- package/dist/core/count-copy-shape.js +40 -0
- package/dist/core/count-cubes.d.ts +8 -0
- package/dist/core/count-cubes.js +69 -0
- package/dist/core/count-demand.d.ts +37 -0
- package/dist/core/count-demand.js +361 -0
- package/dist/core/count-disjoint-funding.d.ts +75 -0
- package/dist/core/count-disjoint-funding.js +284 -0
- package/dist/core/count-emitter-frame-pool.d.ts +23 -0
- package/dist/core/count-emitter-frame-pool.js +87 -0
- package/dist/core/count-facts.d.ts +52 -0
- package/dist/core/count-facts.js +247 -0
- package/dist/core/count-final-step.d.ts +5 -0
- package/dist/core/count-final-step.js +20 -0
- package/dist/core/count-fixed-frame.d.ts +4 -0
- package/dist/core/count-fixed-frame.js +30 -0
- package/dist/core/count-focus-proof.d.ts +8 -0
- package/dist/core/count-focus-proof.js +140 -0
- package/dist/core/count-focused.d.ts +22 -0
- package/dist/core/count-focused.js +676 -0
- package/dist/core/count-frames.d.ts +25 -0
- package/dist/core/count-frames.js +118 -0
- package/dist/core/count-frozen-guard.d.ts +2 -0
- package/dist/core/count-frozen-guard.js +31 -0
- package/dist/core/count-generation-phase.d.ts +7 -0
- package/dist/core/count-generation-phase.js +33 -0
- package/dist/core/count-guard-composition.d.ts +12 -0
- package/dist/core/count-guard-composition.js +48 -0
- package/dist/core/count-guard-context.d.ts +11 -0
- package/dist/core/count-guard-context.js +50 -0
- package/dist/core/count-guard-facts.d.ts +50 -0
- package/dist/core/count-guard-facts.js +97 -0
- package/dist/core/count-guard-proposals.d.ts +7 -0
- package/dist/core/count-guard-proposals.js +106 -0
- package/dist/core/count-guard-shape.d.ts +18 -0
- package/dist/core/count-guard-shape.js +100 -0
- package/dist/core/count-guard-tree.d.ts +17 -0
- package/dist/core/count-guard-tree.js +125 -0
- package/dist/core/count-leader-facts.d.ts +10 -0
- package/dist/core/count-leader-facts.js +52 -0
- package/dist/core/count-leader.d.ts +10 -0
- package/dist/core/count-leader.js +331 -0
- package/dist/core/count-lemma-transport.d.ts +8 -0
- package/dist/core/count-lemma-transport.js +47 -0
- package/dist/core/count-lifted-budget.d.ts +54 -0
- package/dist/core/count-lifted-budget.js +97 -0
- package/dist/core/count-lifted-copy.d.ts +3 -0
- package/dist/core/count-lifted-copy.js +166 -0
- package/dist/core/count-lifted-increment.d.ts +3 -0
- package/dist/core/count-lifted-increment.js +146 -0
- package/dist/core/count-lifted-load.d.ts +5 -0
- package/dist/core/count-lifted-load.js +179 -0
- package/dist/core/count-lifted-prerequisite.d.ts +14 -0
- package/dist/core/count-lifted-prerequisite.js +53 -0
- package/dist/core/count-lifted-replacement.d.ts +3 -0
- package/dist/core/count-lifted-replacement.js +540 -0
- package/dist/core/count-lifted-shape.d.ts +63 -0
- package/dist/core/count-lifted-shape.js +115 -0
- package/dist/core/count-lifted-strategy.d.ts +7 -0
- package/dist/core/count-lifted-strategy.js +226 -0
- package/dist/core/count-lifted-transports.d.ts +32 -0
- package/dist/core/count-lifted-transports.js +293 -0
- package/dist/core/count-load-shape.d.ts +17 -0
- package/dist/core/count-load-shape.js +67 -0
- package/dist/core/count-minimal-view.d.ts +26 -0
- package/dist/core/count-minimal-view.js +46 -0
- package/dist/core/count-operation-observation.d.ts +9 -0
- package/dist/core/count-operation-observation.js +22 -0
- package/dist/core/count-operation-order.d.ts +5 -0
- package/dist/core/count-operation-order.js +4 -0
- package/dist/core/count-phase.d.ts +9 -0
- package/dist/core/count-phase.js +127 -0
- package/dist/core/count-premise-search.d.ts +9 -0
- package/dist/core/count-premise-search.js +41 -0
- package/dist/core/count-premise-view.d.ts +19 -0
- package/dist/core/count-premise-view.js +220 -0
- package/dist/core/count-prerequisite-components.d.ts +67 -0
- package/dist/core/count-prerequisite-components.js +239 -0
- package/dist/core/count-prerequisite-memory.d.ts +24 -0
- package/dist/core/count-prerequisite-memory.js +37 -0
- package/dist/core/count-prerequisite-plan.d.ts +12 -0
- package/dist/core/count-prerequisite-plan.js +88 -0
- package/dist/core/count-primitive-budget.d.ts +1 -0
- package/dist/core/count-primitive-budget.js +8 -0
- package/dist/core/count-project-free.d.ts +3 -0
- package/dist/core/count-project-free.js +24 -0
- package/dist/core/count-project-witness.d.ts +4 -0
- package/dist/core/count-project-witness.js +48 -0
- package/dist/core/count-proof-rescope.d.ts +14 -0
- package/dist/core/count-proof-rescope.js +71 -0
- package/dist/core/count-proof-scope.d.ts +68 -0
- package/dist/core/count-proof-scope.js +333 -0
- package/dist/core/count-prune-owned-root.d.ts +5 -0
- package/dist/core/count-prune-owned-root.js +27 -0
- package/dist/core/count-query-context.d.ts +3 -0
- package/dist/core/count-query-context.js +7 -0
- package/dist/core/count-query.d.ts +15 -0
- package/dist/core/count-query.js +59 -0
- package/dist/core/count-quorum-leaf.d.ts +9 -0
- package/dist/core/count-quorum-leaf.js +38 -0
- package/dist/core/count-ranges.d.ts +5 -0
- package/dist/core/count-ranges.js +65 -0
- package/dist/core/count-reachability-budget.d.ts +1 -0
- package/dist/core/count-reachability-budget.js +7 -0
- package/dist/core/count-reachability-reconcile.d.ts +11 -0
- package/dist/core/count-reachability-reconcile.js +19 -0
- package/dist/core/count-reachability.d.ts +50 -0
- package/dist/core/count-reachability.js +351 -0
- package/dist/core/count-rebase-path.d.ts +9 -0
- package/dist/core/count-rebase-path.js +68 -0
- package/dist/core/count-recipe-context.d.ts +45 -0
- package/dist/core/count-recipe-context.js +71 -0
- package/dist/core/count-recipe-controller.d.ts +115 -0
- package/dist/core/count-recipe-controller.js +417 -0
- package/dist/core/count-recipe-graph.d.ts +36 -0
- package/dist/core/count-recipe-graph.js +211 -0
- package/dist/core/count-recovery/action-guard.d.ts +5 -0
- package/dist/core/count-recovery/action-guard.js +51 -0
- package/dist/core/count-recovery/boolean-core.d.ts +16 -0
- package/dist/core/count-recovery/boolean-core.js +258 -0
- package/dist/core/count-recovery/carried-case.d.ts +2 -0
- package/dist/core/count-recovery/carried-case.js +24 -0
- package/dist/core/count-recovery/conditional-check-cache.d.ts +23 -0
- package/dist/core/count-recovery/conditional-check-cache.js +131 -0
- package/dist/core/count-recovery/conditional-cuts.d.ts +6 -0
- package/dist/core/count-recovery/conditional-cuts.js +319 -0
- package/dist/core/count-recovery/conditional-proof.d.ts +53 -0
- package/dist/core/count-recovery/conditional-proof.js +348 -0
- package/dist/core/count-recovery/derivability-closure.d.ts +14 -0
- package/dist/core/count-recovery/derivability-closure.js +534 -0
- package/dist/core/count-recovery/empty-count-source.d.ts +2 -0
- package/dist/core/count-recovery/empty-count-source.js +40 -0
- package/dist/core/count-recovery/field-bound-lemmas.d.ts +23 -0
- package/dist/core/count-recovery/field-bound-lemmas.js +640 -0
- package/dist/core/count-recovery/field-case.d.ts +5 -0
- package/dist/core/count-recovery/field-case.js +89 -0
- package/dist/core/count-recovery/field-demand.d.ts +46 -0
- package/dist/core/count-recovery/field-demand.js +47 -0
- package/dist/core/count-recovery/field-only.d.ts +3 -0
- package/dist/core/count-recovery/field-only.js +18 -0
- package/dist/core/count-recovery/fold-path.d.ts +6 -0
- package/dist/core/count-recovery/fold-path.js +35 -0
- package/dist/core/count-recovery/frame-lemmas.d.ts +9 -0
- package/dist/core/count-recovery/frame-lemmas.js +120 -0
- package/dist/core/count-recovery/guard-cases.d.ts +12 -0
- package/dist/core/count-recovery/guard-cases.js +139 -0
- package/dist/core/count-recovery/key-closure.d.ts +14 -0
- package/dist/core/count-recovery/key-closure.js +62 -0
- package/dist/core/count-recovery/leaf-allowance.d.ts +4 -0
- package/dist/core/count-recovery/leaf-allowance.js +7 -0
- package/dist/core/count-recovery/lift-count-proxies.d.ts +6 -0
- package/dist/core/count-recovery/lift-count-proxies.js +175 -0
- package/dist/core/count-recovery/live-dependencies.d.ts +6 -0
- package/dist/core/count-recovery/live-dependencies.js +76 -0
- package/dist/core/count-recovery/member-inclusions.d.ts +11 -0
- package/dist/core/count-recovery/member-inclusions.js +168 -0
- package/dist/core/count-recovery/member-premises.d.ts +29 -0
- package/dist/core/count-recovery/member-premises.js +114 -0
- package/dist/core/count-recovery/natural-cases.d.ts +6 -0
- package/dist/core/count-recovery/natural-cases.js +59 -0
- package/dist/core/count-recovery/ops.d.ts +6 -0
- package/dist/core/count-recovery/ops.js +8 -0
- package/dist/core/count-recovery/pre-state-source.d.ts +8 -0
- package/dist/core/count-recovery/pre-state-source.js +18 -0
- package/dist/core/count-recovery/rebase-path.d.ts +9 -0
- package/dist/core/count-recovery/rebase-path.js +70 -0
- package/dist/core/count-recovery/reframe-tree.d.ts +2 -0
- package/dist/core/count-recovery/reframe-tree.js +24 -0
- package/dist/core/count-recovery/rename-proof.d.ts +2 -0
- package/dist/core/count-recovery/rename-proof.js +102 -0
- package/dist/core/count-recovery/replay-linear-skeleton.d.ts +2 -0
- package/dist/core/count-recovery/replay-linear-skeleton.js +28 -0
- package/dist/core/count-recovery/row-cases.d.ts +16 -0
- package/dist/core/count-recovery/row-cases.js +292 -0
- package/dist/core/count-recovery/scalar-guards.d.ts +7 -0
- package/dist/core/count-recovery/scalar-guards.js +291 -0
- package/dist/core/count-recovery/source-memo.d.ts +12 -0
- package/dist/core/count-recovery/source-memo.js +67 -0
- package/dist/core/count-rejection-budget.d.ts +8 -0
- package/dist/core/count-rejection-budget.js +15 -0
- package/dist/core/count-replacement.d.ts +5 -0
- package/dist/core/count-replacement.js +129 -0
- package/dist/core/count-replay-diagnostic.d.ts +21 -0
- package/dist/core/count-replay-diagnostic.js +49 -0
- package/dist/core/count-replay-skeleton.d.ts +4 -0
- package/dist/core/count-replay-skeleton.js +28 -0
- package/dist/core/count-rescope-funding.d.ts +3 -0
- package/dist/core/count-rescope-funding.js +17 -0
- package/dist/core/count-restrictions.d.ts +11 -0
- package/dist/core/count-restrictions.js +31 -0
- package/dist/core/count-retry-budget.d.ts +67 -0
- package/dist/core/count-retry-budget.js +114 -0
- package/dist/core/count-retry-round.d.ts +24 -0
- package/dist/core/count-retry-round.js +44 -0
- package/dist/core/count-row-agreement.d.ts +35 -0
- package/dist/core/count-row-agreement.js +270 -0
- package/dist/core/count-row-aliases.d.ts +3 -0
- package/dist/core/count-row-aliases.js +59 -0
- package/dist/core/count-row-composition.d.ts +6 -0
- package/dist/core/count-row-composition.js +55 -0
- package/dist/core/count-row-copy-linear.d.ts +4 -0
- package/dist/core/count-row-copy-linear.js +83 -0
- package/dist/core/count-row-copy.d.ts +4 -0
- package/dist/core/count-row-copy.js +94 -0
- package/dist/core/count-row-policy.d.ts +3 -0
- package/dist/core/count-row-policy.js +56 -0
- package/dist/core/count-row-reindex.d.ts +11 -0
- package/dist/core/count-row-reindex.js +126 -0
- package/dist/core/count-row-support.d.ts +9 -0
- package/dist/core/count-row-support.js +42 -0
- package/dist/core/count-row-symmetry.d.ts +7 -0
- package/dist/core/count-row-symmetry.js +100 -0
- package/dist/core/count-scope-hyps.d.ts +2 -0
- package/dist/core/count-scope-hyps.js +163 -0
- package/dist/core/count-scope-row-reuse.d.ts +3 -0
- package/dist/core/count-scope-row-reuse.js +92 -0
- package/dist/core/count-search-allowance.d.ts +1 -0
- package/dist/core/count-search-allowance.js +17 -0
- package/dist/core/count-select.d.ts +16 -0
- package/dist/core/count-select.js +24 -0
- package/dist/core/count-stabilize-tree.d.ts +9 -0
- package/dist/core/count-stabilize-tree.js +35 -0
- package/dist/core/count-stage-trace.d.ts +8 -0
- package/dist/core/count-stage-trace.js +45 -0
- package/dist/core/count-strategies.d.ts +16 -0
- package/dist/core/count-strategies.js +155 -0
- package/dist/core/count-strategy-premises.d.ts +5 -0
- package/dist/core/count-strategy-premises.js +14 -0
- package/dist/core/count-strategy.d.ts +41 -0
- package/dist/core/count-strategy.js +76 -0
- package/dist/core/count-support.d.ts +598 -0
- package/dist/core/count-support.js +2081 -0
- package/dist/core/count-tier-budget.d.ts +14 -0
- package/dist/core/count-tier-budget.js +64 -0
- package/dist/core/count-unions.d.ts +2 -0
- package/dist/core/count-unions.js +139 -0
- package/dist/core/count-unwritten-prefix.d.ts +24 -0
- package/dist/core/count-unwritten-prefix.js +97 -0
- package/dist/core/count-witness-flags.d.ts +9 -0
- package/dist/core/count-witness-flags.js +37 -0
- package/dist/core/count-write-frames.d.ts +12 -0
- package/dist/core/count-write-frames.js +206 -0
- package/dist/core/count-write-shape.d.ts +15 -0
- package/dist/core/count-write-shape.js +73 -0
- package/dist/core/counts.d.ts +49 -7
- package/dist/core/counts.js +1679 -165
- package/dist/core/cycles.js +5 -4
- package/dist/core/cyclic.js +11 -10
- package/dist/core/data.js +16 -15
- package/dist/core/dsl-deadline.d.ts +3 -0
- package/dist/core/dsl-deadline.js +27 -0
- package/dist/core/dsl.d.ts +59 -6
- package/dist/core/dsl.js +459 -112
- package/dist/core/effect.js +8 -1
- package/dist/core/evaluation-admission.d.ts +1 -0
- package/dist/core/evaluation-admission.js +3 -0
- package/dist/core/exists.d.ts +7 -2
- package/dist/core/exists.js +131 -24
- package/dist/core/extract-check.d.ts +7 -1
- package/dist/core/extract-check.js +130 -13
- package/dist/core/extract-read.d.ts +22 -8
- package/dist/core/extract-read.js +29 -11
- package/dist/core/extract-shapes.js +122 -41
- package/dist/core/extract-standalone.js +53 -9
- package/dist/core/extract.js +9 -3
- package/dist/core/field-laws.d.ts +4 -0
- package/dist/core/field-laws.js +238 -0
- package/dist/core/finite-frontiers.d.ts +5 -0
- package/dist/core/finite-frontiers.js +116 -0
- package/dist/core/finite-houdini.d.ts +58 -0
- package/dist/core/finite-houdini.js +502 -0
- package/dist/core/finite-model.d.ts +13 -0
- package/dist/core/finite-model.js +68 -0
- package/dist/core/finite-tiny.d.ts +72 -0
- package/dist/core/finite-tiny.js +1080 -0
- package/dist/core/fixtures/count-completion/paxos-decision.json +1 -0
- package/dist/core/fresh.js +5 -1
- package/dist/core/infer.d.ts +1 -1
- package/dist/core/infer.js +76 -38
- package/dist/core/kind.js +2 -1
- package/dist/core/laws.d.ts +2 -1
- package/dist/core/laws.js +47 -14
- package/dist/core/lemma-cuts.d.ts +38 -0
- package/dist/core/lemma-cuts.js +366 -0
- package/dist/core/linear-admission.d.ts +14 -0
- package/dist/core/linear-admission.js +151 -0
- package/dist/core/machine.d.ts +44 -4
- package/dist/core/machine.js +342 -63
- package/dist/core/meter.d.ts +22 -0
- package/dist/core/meter.js +34 -0
- package/dist/core/mutate.d.ts +55 -0
- package/dist/core/mutate.js +210 -0
- package/dist/core/native-domain.d.ts +6 -0
- package/dist/core/native-domain.js +114 -0
- package/dist/core/native-law.d.ts +3 -0
- package/dist/core/native-law.js +174 -0
- package/dist/core/nonterm.js +4 -3
- package/dist/core/prover-row-budget.d.ts +3 -0
- package/dist/core/prover-row-budget.js +106 -0
- package/dist/core/quorum-laws.d.ts +25 -0
- package/dist/core/quorum-laws.js +263 -0
- package/dist/core/rationals.js +3 -2
- package/dist/core/rejection-discovery.d.ts +34 -0
- package/dist/core/rejection-discovery.js +36 -0
- package/dist/core/rejection-stage.d.ts +39 -0
- package/dist/core/rejection-stage.js +205 -0
- package/dist/core/relational.js +10 -2
- package/dist/core/relevance.d.ts +4 -0
- package/dist/core/relevance.js +79 -0
- package/dist/core/request-quotient.d.ts +8 -0
- package/dist/core/request-quotient.js +299 -0
- package/dist/core/row-agreement-shape.d.ts +15 -0
- package/dist/core/row-agreement-shape.js +68 -0
- package/dist/core/runtime-wall.d.ts +5 -0
- package/dist/core/runtime-wall.js +4 -0
- package/dist/core/sample-step.d.ts +16 -0
- package/dist/core/sample-step.js +28 -0
- package/dist/core/search-policy.d.ts +15 -0
- package/dist/core/search-policy.js +68 -0
- package/dist/core/solver.d.ts +1 -1
- package/dist/core/solver.js +40 -6
- package/dist/core/source-check.d.ts +44 -0
- package/dist/core/source-check.js +126 -0
- package/dist/core/source-diagnostic.d.ts +1 -0
- package/dist/core/source-diagnostic.js +34 -0
- package/dist/core/step-work.d.ts +12 -0
- package/dist/core/step-work.js +14 -0
- package/dist/core/strategy-premises.d.ts +8 -0
- package/dist/core/strategy-premises.js +64 -0
- package/dist/core/support-budget.d.ts +2 -0
- package/dist/core/support-budget.js +6 -0
- package/dist/core/system.js +6 -3
- package/dist/core/table-admission.d.ts +1 -0
- package/dist/core/table-admission.js +3 -0
- package/dist/core/trace-clock.d.ts +3 -0
- package/dist/core/trace-clock.js +16 -0
- package/dist/core/transfer.js +3 -2
- package/dist/core/translate.js +16 -3
- package/dist/core/wall.d.ts +11 -0
- package/dist/core/wall.js +37 -0
- package/dist/core/watch.d.ts +1 -1
- package/dist/core/watch.js +15 -2
- package/dist/core/work-admission.d.ts +164 -0
- package/dist/core/work-admission.js +418 -0
- package/dist/core/work-amount.d.ts +21 -0
- package/dist/core/work-amount.js +80 -0
- package/dist/core/work-collections.d.ts +11 -0
- package/dist/core/work-collections.js +198 -0
- package/dist/core/work-kinds.d.ts +11 -0
- package/dist/core/work-kinds.js +9 -0
- package/dist/core/work-meter.d.ts +8 -0
- package/dist/core/work-meter.js +83 -0
- package/dist/core/work-observe.d.ts +12 -0
- package/dist/core/work-observe.js +39 -0
- package/dist/core/work-profile.d.ts +10 -0
- package/dist/core/work-profile.js +21 -0
- package/dist/core/work-refusal.d.ts +1 -0
- package/dist/core/work-refusal.js +6 -0
- package/dist/interchange/format.js +2 -0
- package/dist/kernel/cdcl.d.ts +4 -0
- package/dist/kernel/cdcl.js +109 -41
- package/dist/kernel/epr.js +23 -8
- package/dist/kernel/kernel.d.ts +56 -0
- package/dist/kernel/kernel.js +466 -64
- package/dist/kernel/model-sequence.d.ts +2 -2
- package/dist/kernel/model-sequence.js +4 -3
- package/dist/kernel/model-values.d.ts +2 -0
- package/dist/kernel/model-values.js +60 -0
- package/dist/kernel/prove.d.ts +59 -3
- package/dist/kernel/prove.js +524 -130
- package/dist/kernel/prover-rows.d.ts +30 -0
- package/dist/kernel/prover-rows.js +125 -0
- package/dist/kernel/reader.d.ts +1 -1
- package/dist/kernel/reader.js +57 -12
- package/dist/kernel/simplex.js +9 -2
- package/dist/lean-kernel/emit.d.ts +47 -2
- package/dist/lean-kernel/emit.js +270 -36
- package/dist/lean-kernel/lean-terms.d.ts +1 -0
- package/dist/lean-kernel/lean-terms.js +13 -5
- package/dist/lean-kernel/legacy-family-library.d.ts +1 -0
- package/dist/lean-kernel/legacy-family-library.js +5 -0
- package/dist/lean-kernel/library.js +4 -0
- package/dist/lean-kernel/qalpha.d.ts +7 -0
- package/dist/lean-kernel/qalpha.js +40 -0
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"schema":1,"source":"97463c564351448373ca49f6af980b31b1a0f0c5","m":{"name":"paxos epr","params":["none","size"],"inputs":["op","n","r","v","maxr","w"],"state":{"busy":{"op":"const","value":0},"cnt":{"op":"const","value":0},"pr":{"op":"const","value":0},"pmaxr":{"op":"const","value":0},"pv":{"op":"const","value":0}},"maps":{"OneA":0,"OneB":0,"Left":0,"Proposal":0,"Vote":0,"Decision":0,"Qs":0},"inputMaps":["Q"],"counts":{"members":{"j":"members$x","key":"members$k","below":{"op":"var","name":"size"},"body":{"op":"if","c":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"members$k"}}},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"missing":{"j":"missing$x","key":"missing$k","below":{"op":"var","name":"size"},"body":{"op":"if","c":{"op":"and","xs":[{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"missing$k"}}},{"op":"not","x":{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"missing$k"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"r"}}},"b":{"op":"var","name":"v"}}},"b":{"op":"const","value":1}}}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"members$Qs":{"j":"members$Qs$x","key":"members$Qs$k","below":{"op":"var","name":"size"},"body":{"op":"if","c":{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"members$Qs$k"}},"b":{"op":"const","value":1}},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"members$Decision":{"j":"members$Decision$x","key":"members$Decision$k","below":{"op":"var","name":"size"},"body":{"op":"if","c":{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"members$Decision$k"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"members$Decision$x"}}},"b":{"op":"var","name":"members$Decision$y"}}},"b":{"op":"const","value":1}},"then":{"op":"const","value":1},"else":{"op":"const","value":0}},"lo":"members$Decision$y","base":64},"can$Vote$members":{"j":"can$Vote$members$x","key":"can$Vote$members$k","lo":"can$Vote$members$y","base":64,"below":{"op":"var","name":"size"},"body":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"not","x":{"op":"=","a":{"op":"get","map":"Left","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"can$Vote$members$k"}},"b":{"op":"var","name":"can$Vote$members$x"}}},"b":{"op":"const","value":1}}}]},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"can$Vote$members$k"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"can$Vote$members$x"}}},"b":{"op":"var","name":"can$Vote$members$y"}}}}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}}},"step":{"flags":{"noProposal":{"op":"all","key":"k$19","c":{"op":"or","xs":[{"op":"not","x":{"op":"<","a":{"op":"var","name":"k$19"},"b":{"op":"const","value":64}}},{"op":"not","x":{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"k$19"}}},"b":{"op":"const","value":1}}}]}},"joined":{"op":"all","key":"k$20","c":{"op":"or","xs":[{"op":"not","x":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"k$20"}}}},{"op":"=","a":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"k$20"}}},"b":{"op":"const","value":1}}]}},"rowOk":{"op":"all","key":"k$21","c":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"cnt"}},"b":{"op":"var","name":"k$21"}}},"b":{"op":"const","value":1}},{"op":"<","a":{"op":"var","name":"k$21"},"b":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}}}]}},{"op":"and","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"none"}}},{"op":"<","a":{"op":"var","name":"k$21"},"b":{"op":"mul","k":64,"a":{"op":"add","a":{"op":"var","name":"pmaxr"},"b":{"op":"const","value":1}}}}]}]}},"sends":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":0}},{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"r"},"b":{"op":"var","name":"none"}}}]}]},"joins":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":1}},{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"r"},"b":{"op":"var","name":"none"}}}]},{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"r"}},"b":{"op":"const","value":1}},{"op":"not","x":{"op":"=","a":{"op":"get","map":"Left","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"r"}}},"b":{"op":"const","value":1}}}]},"proposes":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":2}},{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"r"},"b":{"op":"var","name":"none"}}}]},{"op":"flag","name":"noProposal"},{"op":"flag","name":"joined"},{"op":"or","xs":[{"op":"=","a":{"op":"var","name":"maxr"},"b":{"op":"var","name":"none"}},{"op":"and","xs":[{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"w"}}},{"op":"<","a":{"op":"var","name":"maxr"},"b":{"op":"var","name":"r"}},{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"w"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"maxr"}}},"b":{"op":"var","name":"v"}}},"b":{"op":"const","value":1}}]}]}]},"checks":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":3}},{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}]},"fails":{"op":"and","xs":[{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":3}},{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}]},{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"cnt"}},"b":{"op":"const","value":1}},{"op":"not","x":{"op":"flag","name":"rowOk"}}]},"commits":{"op":"and","xs":[{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":3}},{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}]},{"op":"not","x":{"op":"and","xs":[{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":3}},{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}]},{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"cnt"}},"b":{"op":"const","value":1}},{"op":"not","x":{"op":"flag","name":"rowOk"}}]}},{"op":"=","a":{"op":"add","a":{"op":"var","name":"cnt"},"b":{"op":"const","value":1}},"b":{"op":"var","name":"size"}}]},"casts":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":4}},{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"r"},"b":{"op":"var","name":"none"}}}]},{"op":"not","x":{"op":"=","a":{"op":"get","map":"Left","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"r"}}},"b":{"op":"const","value":1}}},{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"v"}}},"b":{"op":"const","value":1}}]},"decides":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":5}},{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"r"},"b":{"op":"var","name":"none"}}}]},{"op":"=","a":{"op":"get","map":"missing","key":{"op":"const","value":0}},"b":{"op":"const","value":0}}]},"all$1":{"op":"all","key":"k$24","c":{"op":"and","xs":[{"op":"<=","a":{"op":"get","map":"Q","key":{"op":"var","name":"k$24"}},"b":{"op":"const","value":1}},{"op":"or","xs":[{"op":"not","x":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"k$24"}}}},{"op":"<","a":{"op":"var","name":"k$24"},"b":{"op":"var","name":"size"}}]}]}}},"state":{"busy":{"op":"if","c":{"op":"flag","name":"proposes"},"then":{"op":"const","value":1},"else":{"op":"if","c":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},"then":{"op":"const","value":0},"else":{"op":"var","name":"busy"}}},"cnt":{"op":"if","c":{"op":"and","xs":[{"op":"flag","name":"checks"},{"op":"not","x":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]}}]},"then":{"op":"add","a":{"op":"var","name":"cnt"},"b":{"op":"const","value":1}},"else":{"op":"if","c":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},"then":{"op":"const","value":0},"else":{"op":"var","name":"cnt"}}},"pr":{"op":"if","c":{"op":"flag","name":"proposes"},"then":{"op":"var","name":"r"},"else":{"op":"if","c":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},"then":{"op":"const","value":0},"else":{"op":"var","name":"pr"}}},"pmaxr":{"op":"if","c":{"op":"flag","name":"proposes"},"then":{"op":"var","name":"maxr"},"else":{"op":"if","c":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},"then":{"op":"const","value":0},"else":{"op":"var","name":"pmaxr"}}},"pv":{"op":"if","c":{"op":"flag","name":"proposes"},"then":{"op":"var","name":"v"},"else":{"op":"if","c":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},"then":{"op":"const","value":0},"else":{"op":"var","name":"pv"}}}},"maps":{"Qs":{"each":"k$22","value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"proposes"},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Q","key":{"op":"var","name":"k$22"}}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"proposes"}},{"op":"or","xs":[{"op":"and","xs":[{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]},{"op":"<","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"or","xs":[{"op":"flag","name":"fails"},{"op":"flag","name":"commits"}]}},{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"k$22"}},"b":{"op":"const","value":1}}]}]}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"OneA":{"key":{"op":"var","name":"r"},"value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"sends"},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"sends"}},{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"r"}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"OneB":{"key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"n"}},"value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"joins"},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"joins"}},{"op":"=","a":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"n"}}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"Left":{"each":"k$23","value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"and","xs":[{"op":"flag","name":"joins"},{"op":"<=","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"k$23"}},{"op":"<","a":{"op":"var","name":"k$23"},"b":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"r"}}}]},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"flag","name":"joins"},{"op":"<=","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"k$23"}},{"op":"<","a":{"op":"var","name":"k$23"},"b":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"n"}},"b":{"op":"var","name":"r"}}}]}},{"op":"=","a":{"op":"get","map":"Left","key":{"op":"var","name":"k$23"}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"Proposal":{"key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}},"b":{"op":"var","name":"pv"}},"value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"commits"},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"commits"}},{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}},"b":{"op":"var","name":"pv"}}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"Vote":{"key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"n"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"r"}}},"b":{"op":"var","name":"v"}},"value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"casts"},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"casts"}},{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"n"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"r"}}},"b":{"op":"var","name":"v"}}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}},"Decision":{"key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"v"}},"value":{"op":"if","c":{"op":"or","xs":[{"op":"and","xs":[{"op":"flag","name":"decides"},{"op":"<=","a":{"op":"const","value":0},"b":{"op":"const","value":0}}]},{"op":"and","xs":[{"op":"not","x":{"op":"flag","name":"decides"}},{"op":"=","a":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"r"}},"b":{"op":"var","name":"v"}}},"b":{"op":"const","value":1}}]}]},"then":{"op":"const","value":1},"else":{"op":"const","value":0}}}}},"pre":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"none"},"b":{"op":"const","value":64}},{"op":"<=","a":{"op":"var","name":"size"},"b":{"op":"const","value":64}}]},"assume":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"op"},"b":{"op":"const","value":6}},{"op":"and","xs":[{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"n"},"b":{"op":"var","name":"size"}},{"op":"<","a":{"op":"var","name":"w"},"b":{"op":"var","name":"size"}},{"op":"and","xs":[{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"r"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"v"},"b":{"op":"const","value":64}}]},{"op":"<","a":{"op":"var","name":"maxr"},"b":{"op":"const","value":64}}]}]},{"op":"or","xs":[{"op":"not","x":{"op":"or","xs":[{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":2}},{"op":"=","a":{"op":"var","name":"op"},"b":{"op":"const","value":5}}]}},{"op":"and","xs":[{"op":"flag","name":"all$1"},{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"members","key":{"op":"const","value":0}}}}]}]}]}]}},"laws":[{"name":"every OneA cell is a value of its kind","forall":"key$7","holds":{"op":"<=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"key$7"}},"b":{"op":"const","value":1}}},{"name":"every OneB cell is a value of its kind","forall":"key$9","holds":{"op":"<=","a":{"op":"get","map":"OneB","key":{"op":"var","name":"key$9"}},"b":{"op":"const","value":1}}},{"name":"every Left cell is a value of its kind","forall":"key$11","holds":{"op":"<=","a":{"op":"get","map":"Left","key":{"op":"var","name":"key$11"}},"b":{"op":"const","value":1}}},{"name":"every Proposal cell is a value of its kind","forall":"key$13","holds":{"op":"<=","a":{"op":"get","map":"Proposal","key":{"op":"var","name":"key$13"}},"b":{"op":"const","value":1}}},{"name":"every Vote cell is a value of its kind","forall":"key$15","holds":{"op":"<=","a":{"op":"get","map":"Vote","key":{"op":"var","name":"key$15"}},"b":{"op":"const","value":1}}},{"name":"every Decision cell is a value of its kind","forall":"key$17","holds":{"op":"<=","a":{"op":"get","map":"Decision","key":{"op":"var","name":"key$17"}},"b":{"op":"const","value":1}}},{"name":"every Qs cell is a value of its kind","forall":"key$19","holds":{"op":"<=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"key$19"}},"b":{"op":"const","value":1}}},{"name":"one value decided","forall":"key$2","keys":["key$3","key$4","key$5"],"holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"and","xs":[{"op":"and","xs":[{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key$2"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key$3"},"b":{"op":"const","value":64}}]},{"op":"<","a":{"op":"var","name":"key$4"},"b":{"op":"const","value":64}}]},{"op":"<","a":{"op":"var","name":"key$5"},"b":{"op":"const","value":64}}]},{"op":"=","a":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key$2"}},"b":{"op":"var","name":"key$3"}}},"b":{"op":"const","value":1}},{"op":"=","a":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key$4"}},"b":{"op":"var","name":"key$5"}}},"b":{"op":"const","value":1}}]}},{"op":"=","a":{"op":"var","name":"key$3"},"b":{"op":"var","name":"key$5"}}]}},{"name":"members$Qs keeps members's bound 0","forall":"a$c","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"a$c"}},"b":{"op":"const","value":1}}},{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"members$Qs","key":{"op":"var","name":"a$c"}}}}]}},{"name":"members$Qs keeps members's bound 2","forall":"a$c","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"members$Qs","key":{"op":"var","name":"a$c"}}}}]}},{"name":"Decision keeps members's bound through members$Decision","forall":"a$c","keys":["b$c"],"holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"a$c"}},"b":{"op":"var","name":"b$c"}}}},{"op":"<","a":{"op":"var","name":"b$c"},"b":{"op":"const","value":64}}]}},{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"members$Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"a$c"}},"b":{"op":"var","name":"b$c"}}}}}]}},{"name":"Proposal at (c, d) bounds can$Vote$members at (a, b): a < c, b ≠ d","forall":"a$c","keys":["b$c","c$c","d$c"],"holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"c$c"}},"b":{"op":"var","name":"d$c"}}}},{"op":"<","a":{"op":"var","name":"a$c"},"b":{"op":"var","name":"c$c"}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"b$c"},"b":{"op":"var","name":"d$c"}}},{"op":"<","a":{"op":"var","name":"b$c"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"d$c"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"can$Vote$members","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"a$c"}},"b":{"op":"var","name":"b$c"}}}}}}]}},{"name":"Proposal at (c, d) bounds can$Vote$members at (a, b): a < c","forall":"a$c","keys":["b$c","c$c","d$c"],"holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"c$c"}},"b":{"op":"var","name":"d$c"}}}},{"op":"<","a":{"op":"var","name":"a$c"},"b":{"op":"var","name":"c$c"}},{"op":"<","a":{"op":"var","name":"b$c"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"d$c"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"<","a":{"op":"var","name":"size"},"b":{"op":"mul","k":2,"a":{"op":"get","map":"can$Vote$members","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"a$c"}},"b":{"op":"var","name":"b$c"}}}}}}]}},{"name":"scan-prefix:cnt:rowOk:d93992f463f488aa:entry","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":0}}},{"op":"=","a":{"op":"var","name":"cnt"},"b":{"op":"const","value":0}}]}},{"name":"scan-prefix:cnt:rowOk:d93992f463f488aa","forall":"scanKey","keys":["k$21"],"holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}},{"op":"<","a":{"op":"var","name":"scanKey"},"b":{"op":"var","name":"cnt"}},{"op":"=","a":{"op":"get","map":"Qs","key":{"op":"var","name":"scanKey"}},"b":{"op":"const","value":1}}]}},{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"scanKey"}},"b":{"op":"var","name":"k$21"}}},"b":{"op":"const","value":1}},{"op":"<","a":{"op":"var","name":"k$21"},"b":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}}}]}},{"op":"and","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"none"}}},{"op":"<","a":{"op":"var","name":"k$21"},"b":{"op":"mul","k":64,"a":{"op":"add","a":{"op":"var","name":"pmaxr"},"b":{"op":"const","value":1}}}}]}]}]}},{"name":"every x, y with x < 64 ∧ y < 64: never OneA[x] is 0 and 1 <= Decision[64·x + y]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"key1$enum"}},"b":{"op":"const","value":0}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum"]},{"name":"every x, y with x < 64 ∧ y < 64: never OneA[x] is 0 and 1 <= Proposal[64·x + y]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"key1$enum"}},"b":{"op":"const","value":0}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum"]},{"name":"every x, y with x < 64 ∧ y < 64: never 1 <= Decision[64·x + y] and Proposal[64·x + y] is 0","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}},{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}},"b":{"op":"const","value":0}}]}}]},"forall":"key1$enum","keys":["key2$enum"]},{"name":"every x, y, z with x < 64 ∧ y < 64 ∧ z < 64 ∧ ¬(y = z): never 1 <= Decision[64·x + y] and 1 <= Decision[64·x + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"key2$enum"},"b":{"op":"var","name":"key3$enum"}}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x < 64 ∧ y < 64 ∧ z < 64 ∧ ¬(y = z): never 1 <= Decision[64·x + y] and 1 <= Proposal[64·x + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"key2$enum"},"b":{"op":"var","name":"key3$enum"}}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x < 64 ∧ y < 64 ∧ z < 64 ∧ ¬(y = z): never 1 <= Proposal[64·x + y] and 1 <= Proposal[64·x + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"key2$enum"},"b":{"op":"var","name":"key3$enum"}}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x < 64 ∧ y < 64 ∧ ¬(x = y) ∧ z < 64: never 1 <= Decision[64·x + z] and 1 <= Decision[64·y + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"key1$enum"},"b":{"op":"var","name":"key2$enum"}}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key3$enum"}}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x < 64 ∧ y < 64 ∧ ¬(x = y) ∧ z < 64: never 1 <= Decision[64·x + z] and 1 <= Proposal[64·y + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"not","x":{"op":"=","a":{"op":"var","name":"key1$enum"},"b":{"op":"var","name":"key2$enum"}}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key3$enum"}}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y with x <= 63 ∧ y < 64: never OneA[y] is 0 and 1 <= OneB[64·y + x]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":63}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"key2$enum"}},"b":{"op":"const","value":0}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key1$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum"]},{"name":"every x, y, z with x <= 63 ∧ y < 64 ∧ z < 64: never 1 <= Qs[x] and 1 <= Decision[64·y + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":63}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Qs","key":{"op":"var","name":"key1$enum"}}}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Decision","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x <= 63 ∧ y < 64 ∧ z < 64: never OneA[y] is 0 and 1 <= Vote[64·64·x + y + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":63}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"key2$enum"}},"b":{"op":"const","value":0}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x <= 63 ∧ y < 64 ∧ z < 64: never OneB[64·y + x] is 0 and 1 <= Vote[64·64·x + y + z]","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":63}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"=","a":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key1$enum"}}},"b":{"op":"const","value":0}},{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}},"b":{"op":"var","name":"key3$enum"}}}}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"every x, y, z with x <= 63 ∧ y < 64 ∧ z < 64: never 1 <= Vote[64·64·x + y + z] and Proposal[64·y + z] is 0","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"var","name":"key1$enum"},"b":{"op":"const","value":63}},{"op":"<","a":{"op":"var","name":"key2$enum"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"key3$enum"},"b":{"op":"const","value":64}}]}},{"op":"not","x":{"op":"and","xs":[{"op":"<=","a":{"op":"add","a":{"op":"const","value":0},"b":{"op":"const","value":1}},"b":{"op":"add","a":{"op":"const","value":0},"b":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key1$enum"}},"b":{"op":"var","name":"key2$enum"}}},"b":{"op":"var","name":"key3$enum"}}}}},{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"key2$enum"}},"b":{"op":"var","name":"key3$enum"}}},"b":{"op":"const","value":0}}]}}]},"forall":"key1$enum","keys":["key2$enum","key3$enum"]},{"name":"carry:guard:e11bb2856a4188b5","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"pr"},"b":{"op":"var","name":"none"}}}]}]}},{"name":"carry:guard:71517ec714847e1e","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"not","x":{"op":"<","a":{"op":"var","name":"k$19"},"b":{"op":"const","value":64}}},{"op":"not","x":{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}},"b":{"op":"var","name":"k$19"}}},"b":{"op":"const","value":1}}}]}]},"forall":"k$19"},{"name":"carry:guard:f8fa169d60df315a","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"not","x":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Qs","key":{"op":"var","name":"k$20"}}}},{"op":"=","a":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}},"b":{"op":"var","name":"k$20"}}},"b":{"op":"const","value":1}}]}]},"forall":"k$20"},{"name":"carry:guard:faa607cf227d2883","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"not","x":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Qs","key":{"op":"var","name":"k$20"}}}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"OneA","key":{"op":"var","name":"pr"}}}]}]},"forall":"k$20"},{"name":"carry:guard:8c4667f43952b1a7","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"=","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"none"}},{"op":"<","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"pr"}}]}]}},{"name":"carry:guard:4817748873bf0d3a","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"=","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"none"}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"OneA","key":{"op":"var","name":"pmaxr"}}}]}]}},{"name":"carry:guard:a1aac0f2b5acf946","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"=","a":{"op":"var","name":"pmaxr"},"b":{"op":"var","name":"none"}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pmaxr"}},"b":{"op":"var","name":"pv"}}}}]}]}},{"name":"carry:guard:69834f3e58d5e918","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"<","a":{"op":"var","name":"pr"},"b":{"op":"const","value":64}}]}]}},{"name":"carry:guard:e6d2937e4bcb51dc","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"<","a":{"op":"var","name":"pv"},"b":{"op":"const","value":64}}]}]}},{"name":"carry:guard:980373f5503cf4c6","holds":{"op":"or","xs":[{"op":"not","x":{"op":"=","a":{"op":"var","name":"busy"},"b":{"op":"const","value":1}}},{"op":"or","xs":[{"op":"<","a":{"op":"var","name":"pmaxr"},"b":{"op":"const","value":64}}]}]}},{"name":"carry:co-write:6282256ba10ee781","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"or","xs":[{"op":"<","a":{"op":"var","name":"carryKeyXX"},"b":{"op":"var","name":"size"}}]},{"op":"or","xs":[{"op":"<","a":{"op":"var","name":"carryKeyX"},"b":{"op":"const","value":64}}]},{"op":"<","a":{"op":"var","name":"carryKey"},"b":{"op":"var","name":"carryKeyX"}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"carryKeyX"}},"b":{"op":"var","name":"carryKeyXX"}}}}]}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Left","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"carryKeyXX"}},"b":{"op":"var","name":"carryKey"}}}}]},"forall":"carryKeyXX","keys":["carryKeyX","carryKey"]},{"name":"carry:global-range:f29c323756a78a95","holds":{"op":"<","a":{"op":"var","name":"pr"},"b":{"op":"const","value":64}}},{"name":"carry:global-range:345c4e9ce3eda2e1","holds":{"op":"<","a":{"op":"var","name":"pmaxr"},"b":{"op":"const","value":64}}},{"name":"carry:global-range:4d9ef1fb20062861","holds":{"op":"<","a":{"op":"var","name":"pv"},"b":{"op":"const","value":64}}},{"name":"carry:global-frame:ef4514c87a594d2c","holds":{"op":"or","xs":[{"op":"not","x":{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Qs","key":{"op":"var","name":"k$20"}}}},{"op":"=","a":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"pr"}},"b":{"op":"var","name":"k$20"}}},"b":{"op":"const","value":1}}]},"forall":"k$20"},{"name":"carry:point-guard:dbae780daebdcb74","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"carryKeyXXXXX"},"b":{"op":"var","name":"size"}},{"op":"<","a":{"op":"var","name":"carryKeyXXXX"},"b":{"op":"const","value":64}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"OneB","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"carryKeyXXXX"}},"b":{"op":"var","name":"carryKeyXXXXX"}}}}]}},{"op":"=","a":{"op":"get","map":"OneA","key":{"op":"var","name":"carryKeyXXXX"}},"b":{"op":"const","value":1}}]},"forall":"carryKeyXXXXX","keys":["carryKeyXXXX"]},{"name":"carry:point-guard:42b72ece9101070e","holds":{"op":"or","xs":[{"op":"not","x":{"op":"and","xs":[{"op":"<","a":{"op":"var","name":"carryKeyXXXXXX"},"b":{"op":"var","name":"size"}},{"op":"<","a":{"op":"var","name":"carryKeyXXXXXXX"},"b":{"op":"const","value":64}},{"op":"<","a":{"op":"var","name":"carryKeyXXXXXXXX"},"b":{"op":"const","value":64}},{"op":"<=","a":{"op":"const","value":1},"b":{"op":"get","map":"Vote","key":{"op":"add","a":{"op":"add","a":{"op":"mul","k":4096,"a":{"op":"var","name":"carryKeyXXXXXX"}},"b":{"op":"mul","k":64,"a":{"op":"var","name":"carryKeyXXXXXXX"}}},"b":{"op":"var","name":"carryKeyXXXXXXXX"}}}}]}},{"op":"=","a":{"op":"get","map":"Proposal","key":{"op":"add","a":{"op":"mul","k":64,"a":{"op":"var","name":"carryKeyXXXXXXX"}},"b":{"op":"var","name":"carryKeyXXXXXXXX"}}},"b":{"op":"const","value":1}}]},"forall":"carryKeyXXXXXX","keys":["carryKeyXXXXXXX","carryKeyXXXXXXXX"]}],"target":10,"caller":[0,1,2,3,4,5,6,7],"support":[13,14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"pass":1,"ms":896.1170999515151,"houdini":true}
|
package/dist/core/fresh.js
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
import { evalC, interpret, seeded } from "./machine.js";
|
|
12
12
|
import { clock, counted, fullRate, proveSetFast, withDeadline } from "../kernel/prove.js";
|
|
13
13
|
import { allowed, watch } from "./watch.js";
|
|
14
|
+
import { checkWorkEndpoint } from "./wall.js";
|
|
14
15
|
const v = (name) => ({ op: 'var', name }), get = (map, key) => ({ op: 'get', map, key });
|
|
15
16
|
// The budget is counted (kernel/prove.ts's cost model), as the invariant search's is: what is found is the same on any
|
|
16
17
|
// machine. Houdini's set proofs are proveSetFast's, each round reusing the goals the last one settled.
|
|
17
18
|
// (the deadline too, so a round's goals stop at the budget's end)
|
|
18
19
|
export const freshLaws = (m, kinds, draws, opts = {}) => counted(fullRate, () => withDeadline(clock() + (opts.ms ?? 5000), () => fresh(m, kinds, draws, opts)), true);
|
|
19
20
|
function fresh(m, kinds, draws, opts) {
|
|
21
|
+
checkWorkEndpoint('fresh entry');
|
|
20
22
|
const maps = Object.entries(m.maps ?? {}).filter(([n]) => !(m.inputMaps ?? []).includes(n));
|
|
21
23
|
if (!maps.length || m.history)
|
|
22
24
|
return [];
|
|
@@ -27,6 +29,7 @@ function fresh(m, kinds, draws, opts) {
|
|
|
27
29
|
// a cell written at b): each map no step wrote past it, and each it was seen bounding
|
|
28
30
|
const past = new Set(), bounds = new Set();
|
|
29
31
|
for (let trial = 0; trial < 60 && clock() < until; trial++) {
|
|
32
|
+
checkWorkEndpoint('fresh trial');
|
|
30
33
|
let ps, st;
|
|
31
34
|
try {
|
|
32
35
|
ps = draws.params(rand, bound);
|
|
@@ -38,6 +41,7 @@ function fresh(m, kinds, draws, opts) {
|
|
|
38
41
|
continue;
|
|
39
42
|
}
|
|
40
43
|
for (let d = 0, tries = 0; d < 20 && tries < 60; tries++) {
|
|
44
|
+
checkWorkEndpoint('fresh step');
|
|
41
45
|
try {
|
|
42
46
|
const input = draws.input(rand, bound, ps);
|
|
43
47
|
if (!allowed(m, run, ps, st, input))
|
|
@@ -85,7 +89,7 @@ function fresh(m, kinds, draws, opts) {
|
|
|
85
89
|
const init = m.maps[map];
|
|
86
90
|
cands.push({ law: { name: `keys up to ${c}: ${map} unset past it`, holds: { op: 'or', xs: [{ op: '<=', a: v(key), b: v(c) }, { op: '=', a: get(map, v(key)), b: { op: 'const', value: init } }] }, forall: key }, text: `∀k. ${c} < k → ${map}[k] = ${init}` });
|
|
87
91
|
}
|
|
88
|
-
let alive = cands.filter(f => states.every(({ ps, st }) => { try {
|
|
92
|
+
let alive = cands.filter(f => states.every(({ ps, st }) => { checkWorkEndpoint('fresh validation'); try {
|
|
89
93
|
return watch(m, run, f.law, ps, bound).start(st);
|
|
90
94
|
}
|
|
91
95
|
catch {
|
package/dist/core/infer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Law, type Machine, type Request, type State } from './machine.js';
|
|
2
|
-
import { type StepLaw, type Verdict, proveRule } from './dsl.js';
|
|
2
|
+
import { type StepLaw, type Verdict, type proveRule } from './dsl.js';
|
|
3
3
|
type AnyRule = Parameters<typeof proveRule>[0];
|
|
4
4
|
type Env = Record<string, number>;
|
|
5
5
|
export type InferOptions = {
|
package/dist/core/infer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { searchNow as countedSearchNow, checkWorkEndpoint } from "./wall.js";
|
|
1
2
|
// Invariants nobody wrote: a law that holds but isn't inductive, proven with laws the search finds. Nothing here is
|
|
2
3
|
// trusted; what it finds is proven by the kernel with the rule's own laws, as laws of the same rule.
|
|
3
4
|
// - runs: random runs from the start (params and requests by their kinds, the assumption met) give reachable states,
|
|
@@ -32,12 +33,15 @@
|
|
|
32
33
|
// rules it out (and the most of those seen) is added; a chosen candidate that nothing supports, or that makes a proof slow, is dropped; the set proven as a whole
|
|
33
34
|
// is the answer, after each chosen candidate the proof doesn't need is taken out again
|
|
34
35
|
import { quietly } from "./cyclic.js";
|
|
36
|
+
import { observeCubeTest } from "./meter.js";
|
|
37
|
+
import { withEvaluationAdmission } from "./evaluation-admission.js";
|
|
35
38
|
import { bitIntersection, bitIntersects } from "./bitsets.js";
|
|
36
39
|
import { samplePredicates, sampleStateText } from "./sample-cache.js";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
40
|
+
import { sampleStep } from "./sample-step.js";
|
|
41
|
+
import { all, any, atMost, carriedView, compileC, compileE, cpair, fastStep, divisorsIn, evalC, evalE, get, hasFinite, interpret, machineTerms, fnValue, modName, n, not, partsOf as tupleOf, plus, same, seeded, times, walk, withArithmetic, x } from "./machine.js";
|
|
42
|
+
import { bool, refuteModelByRuns, verdictOf } from "./dsl.js";
|
|
39
43
|
import { allowed, keysOf, linKey, watch } from "./watch.js";
|
|
40
|
-
import { clock, counted, fullWork, decideLaw, decideNote, machineKey, memoHits, withStrict, fullRate, grow, keyValue, lawInstances, proveLaw, proveLaws, proveSetFast, proveStepLaws, stepLawInstances, usedHyps, withDeadline, withModels, withTrees, withWall,
|
|
44
|
+
import { clock, counted, fullWork, searchWork, decideLaw, decideNote, machineKey, memoHits, withStrict, fullRate, grow, keyValue, lawInstances, proveLaw, proveLaws, proveSetFast, proveStepLaws, stepLawInstances, usedHyps, withDeadline, withModels, withTrees, withWall, withSearchWork } from "../kernel/prove.js";
|
|
41
45
|
import { assumed, eachParts, obligations, plainOf, stepLawObligations, substC, tuple, tupleParts } from "../kernel/kernel.js";
|
|
42
46
|
import { env, gcd, work } from "./solver.js";
|
|
43
47
|
import { bgcd } from "./q.js";
|
|
@@ -178,6 +182,8 @@ const few = (vals) => vals.length <= 4 && vals.every(x => x <= 8);
|
|
|
178
182
|
// interpreted evaluations); the rest of the step the interpreter's. Its first steps are checked against the
|
|
179
183
|
// interpreter's, and one that differs, or a domain past `most` tuples, leaves the interpreter's.
|
|
180
184
|
export function domainStep(m, most = 20_000) {
|
|
185
|
+
if (hasFinite(m))
|
|
186
|
+
return undefined; // use the exact interpreter, never the speculative domain bound
|
|
181
187
|
// (every write at every key, a relation's at its tuples and a plain map's at its keys, n 1; a write at one key as itself)
|
|
182
188
|
const tupled = (mp) => (m.relations?.[mp]?.length ?? 0) > 1;
|
|
183
189
|
if (!Object.entries(m.step.maps ?? {}).some(([mp, w]) => 'each' in w && tupled(mp)) || m.history || m.leasts || m.inputMaps?.length || m.counts || m.fns)
|
|
@@ -359,7 +365,7 @@ export function domainStep(m, most = 20_000) {
|
|
|
359
365
|
for (const r of each) {
|
|
360
366
|
const far = r.names.map(() => D + 1);
|
|
361
367
|
r.names.forEach((nm, i) => (env[nm] = far[i]));
|
|
362
|
-
const fallback = r.f(env, st), cells = new Map(), at = (xs) => { r.names.forEach((nm, i) => (env[nm] = xs[i])); const v = r.f(env, st); if (v !== fallback)
|
|
368
|
+
const fallback = r.f(env, st), cells = new Map(), at = (xs) => { checkWorkEndpoint('inference relation tuple'); r.names.forEach((nm, i) => (env[nm] = xs[i])); const v = r.f(env, st); if (v !== fallback)
|
|
363
369
|
cells.set(xs.slice(0, -1).reduceRight((b, a) => cpair(a, b), xs.at(-1)), v); };
|
|
364
370
|
// (the tuples it holds and those its pins allow, where its cells are 0 by default; else every tuple below D)
|
|
365
371
|
const pins = fallback === 0 && !st.defaults?.[r.mp] && !m.maps?.[r.mp] ? pinsOf(r, env, st) : undefined;
|
|
@@ -1018,19 +1024,23 @@ function comparisons(m, laws, atoms, coords, more = []) {
|
|
|
1018
1024
|
export function inferLaws(target, laws, stepLaws = [], opts = {}) {
|
|
1019
1025
|
// Repeated rounds and minimization can ask the same root goal again. Keep only
|
|
1020
1026
|
// completed trees for this search, keyed by exact hypotheses and prover modes.
|
|
1021
|
-
return withTrees(() => quietly(() => withDeadline(clock() + (opts.wall === undefined ? opts.ms ?? 20000 : Math.max(0, opts.wall -
|
|
1027
|
+
return withTrees(() => quietly(() => withDeadline(clock() + (opts.wall === undefined ? opts.ms ?? 20000 : Math.max(0, opts.wall - countedSearchNow())), () => inferLawsSearch(target, laws, stepLaws, opts))));
|
|
1022
1028
|
}
|
|
1023
1029
|
function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
1030
|
+
return withEvaluationAdmission(() => inferLawsSearchIn(target, laws, stepLaws, opts));
|
|
1031
|
+
}
|
|
1032
|
+
function inferLawsSearchIn(target, laws, stepLaws, opts) {
|
|
1033
|
+
checkWorkEndpoint('inference entry');
|
|
1024
1034
|
// (GDP_INFER_TRACE=2: each phase's progress too, to stderr)
|
|
1025
1035
|
if (env.GDP_INFER_TRACE === '2' && !opts.progress)
|
|
1026
1036
|
opts = { ...opts, progress: (phase, info) => globalThis.process.stderr.write(`[infer ${phase}] ${JSON.stringify(info)}\n`) };
|
|
1027
|
-
const t0 =
|
|
1037
|
+
const t0 = countedSearchNow(), ms = opts.ms ?? 20000, wallUntil = opts.wall ?? t0 + ms, rule = isRule(target) ? target.withSumsOf(laws, stepLaws) : undefined;
|
|
1028
1038
|
// The clock the budgets read (counted milliseconds since the start, or wall time where `timed`), and the stop.
|
|
1029
1039
|
const timed = !!opts.timed, w0 = work.n, used = { tries: 0, rows: 0, evals: 0, watched: 0, erows: 0, etries: 0 };
|
|
1030
|
-
const now = () => (timed ?
|
|
1040
|
+
const now = () => (timed ? countedSearchNow() - t0
|
|
1031
1041
|
: used.tries / inferRates.tries + used.rows / inferRates.rows + used.evals / inferRates.evals + used.watched / inferRates.watched + (work.n - w0) / inferRates.work);
|
|
1032
1042
|
let stopped = false;
|
|
1033
|
-
const stop = () => stopped || (stopped =
|
|
1043
|
+
const stop = () => { checkWorkEndpoint('inference poll'); return stopped || (stopped = countedSearchNow() > wallUntil); };
|
|
1034
1044
|
// The engine's clock (the stage below, from the small instance on): counted as `now` is, with the EPR path's work
|
|
1035
1045
|
// (kernel/epr.ts's eprMeter) and the views' rows beside it, so that every choice it makes by its budget (a BFS cut, the
|
|
1036
1046
|
// filter, a goal's cap, a round's growth) is the same on any machine; the wall (`stop`, `until` past `ms`) only ends it.
|
|
@@ -1038,15 +1048,15 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1038
1048
|
// of what is left of `ms` once the join's count is taken at 0.3 a millisecond (the join's rates count its work
|
|
1039
1049
|
// 2 to 14 times faster than a Modal container does it), so the engine ends within the wall on a container somewhat
|
|
1040
1050
|
// slower than Modal's usual; past `eUntil` it stops as it would past the wall, at the same place on any machine.
|
|
1041
|
-
let eS = { now: 0, epr: eprMeter.n, erows: 0, etries: 0, full:
|
|
1042
|
-
const vnow = () => (timed ? now() : (used.etries - eS.etries) / inferRates.etries + (eprMeter.n - eS.epr) / inferRates.epr + (used.erows - eS.erows) / inferRates.erows + (
|
|
1043
|
-
const meters = () => ({ real: Math.round(
|
|
1051
|
+
let eS = { now: 0, epr: eprMeter.n, erows: 0, etries: 0, full: searchWork() }, eUntil = ms;
|
|
1052
|
+
const vnow = () => (timed ? now() : (used.etries - eS.etries) / inferRates.etries + (eprMeter.n - eS.epr) / inferRates.epr + (used.erows - eS.erows) / inferRates.erows + (searchWork() - eS.full) / inferRates.efull);
|
|
1053
|
+
const meters = () => ({ real: Math.round(countedSearchNow() - t0), v: Math.round(vnow()), now: Math.round(now()), full: Math.round(fullWork()), epr: eprMeter.n - eS.epr, erows: used.erows, etries: used.etries, tries: used.tries, rows: used.rows, evals: used.evals, work: work.n - w0 });
|
|
1044
1054
|
const until = ms;
|
|
1045
|
-
let tp =
|
|
1055
|
+
let tp = countedSearchNow(), cp = 0, wp = w0;
|
|
1046
1056
|
const trace = (what, o = {}) => {
|
|
1047
1057
|
if (!inferTrace)
|
|
1048
1058
|
return;
|
|
1049
|
-
const t =
|
|
1059
|
+
const t = countedSearchNow(), c = now();
|
|
1050
1060
|
globalThis.process.stderr.write(`[infer] ${what} ${JSON.stringify({ ms: Math.round(t - tp), counted: Math.round(c - cp), work: work.n - wp, ...used, ...o })}\n`);
|
|
1051
1061
|
tp = t;
|
|
1052
1062
|
cp = c;
|
|
@@ -1077,17 +1087,26 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1077
1087
|
const prove = (ls, fast = false) => {
|
|
1078
1088
|
proofs++;
|
|
1079
1089
|
const { r: searchRule, m: mm } = forLaws(ls);
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1090
|
+
// Inference proves candidates about the mathematical model. Calling the public
|
|
1091
|
+
// source finalizer here rejects its invented (unbound) support laws before the
|
|
1092
|
+
// outer source proof can validate the user's laws. Keep kind/sum normalization,
|
|
1093
|
+
// and let the outer proveRule/proveSteps call enforce source validation once.
|
|
1094
|
+
const normalized = searchRule?.withSumsOf(ls, stepLaws);
|
|
1095
|
+
const model = normalized?.machine ?? mm;
|
|
1096
|
+
const given = normalized ? [...normalized.kindLaws().filter(k => !ls.some(l => l.name === k.name)), ...ls] : ls;
|
|
1097
|
+
const out = stepLaws.length ? proveStepLaws(model, given, stepLaws) : (fast ? proveSetFast : proveLaws)(model, given);
|
|
1083
1098
|
return verdictOf(out);
|
|
1084
1099
|
};
|
|
1085
|
-
const stats = (samples, candidates, alive) => ({ samples, candidates, alive, proofs, ms: Math.round(
|
|
1086
|
-
|
|
1100
|
+
const stats = (samples, candidates, alive) => ({ samples, candidates, alive, proofs, ms: Math.round(countedSearchNow() - t0), stopped: stop() });
|
|
1101
|
+
// The old public prover's first pass also sampled reachable counterexamples.
|
|
1102
|
+
// Keep that negative model evidence without invoking a source finalizer.
|
|
1103
|
+
const refuted = !opts.first && !opts.cubes && rule ? refuteModelByRuns(rule, laws, stepLaws) : undefined;
|
|
1104
|
+
const first = opts.first ?? (refuted?.run ? { proven: false, checked: false, stuck: 'sat', ...refuted }
|
|
1105
|
+
: opts.cubes ? { proven: false, checked: false } : prove(laws));
|
|
1087
1106
|
if ((first.proven && first.checked) || first.run)
|
|
1088
1107
|
return { ...first, found: [], stats: stats(0, 0, 0) };
|
|
1089
1108
|
// --- runs ------------------------------------------------------------------------------------------------------------
|
|
1090
|
-
const run = interpret(m), rand = seeded(17), kinds = rule ? rule.kindsOfState() : [];
|
|
1109
|
+
const run = interpret(m), stepSample = sampleStep(m, run), rand = seeded(17), kinds = rule ? rule.kindsOfState() : [];
|
|
1091
1110
|
const given = rule ? [...rule.kindLaws().filter(k => !laws.some(l => l.name === k.name)), ...laws] : laws;
|
|
1092
1111
|
const randomParams = (bound, r = rand) => (rule ? rule.randomParams(r, bound) : Object.fromEntries(m.params.map(p => [p, r(bound + 1)])));
|
|
1093
1112
|
const randomInput = (params, bound, r = rand) => (rule ? rule.randomInput(r, bound, params)
|
|
@@ -1113,19 +1132,32 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1113
1132
|
for (const st of opts.seen ?? [])
|
|
1114
1133
|
if (!m.params.length)
|
|
1115
1134
|
keep({ params: {}, st });
|
|
1135
|
+
// Initial scalar bounds come from exploration, not the later small-instance
|
|
1136
|
+
// cube filter. A supplied finite row set cannot replace that exploration for
|
|
1137
|
+
// counters or stored numeric inputs. Boolean control has no missing numeric
|
|
1138
|
+
// levels; keep the original walk for every other scalar transition.
|
|
1139
|
+
const boolControl = (e, key) => e.op === 'const' ? e.value === 0 || e.value === 1
|
|
1140
|
+
: e.op === 'var' ? e.name === key : e.op === 'if' && boolControl(e.then, key) && boolControl(e.else, key);
|
|
1141
|
+
const finiteControl = Object.entries(m.state).every(([key, initial]) => initial.op === 'const'
|
|
1142
|
+
&& (initial.value === 0 || initial.value === 1) && boolControl(m.step.state?.[key] ?? x(key), key));
|
|
1143
|
+
const supplied = !!opts.cubes && !!opts.rows?.length && finiteControl;
|
|
1144
|
+
if (supplied)
|
|
1145
|
+
for (const row of opts.rows)
|
|
1146
|
+
keep(row);
|
|
1116
1147
|
trace('start');
|
|
1117
1148
|
// Counted: `runs` requests tried at least, and on until as many states as the samples hold were offered (a trial offers
|
|
1118
1149
|
// its start at least), the trials at most `runs` or that many. Timed: `runsMs` of wall time.
|
|
1119
1150
|
// (a rule of relations: its steps by domainStep, its params small: a relation's tuples grow as a power of them; its
|
|
1120
1151
|
// runs the least, the engine's small instance its samples)
|
|
1121
1152
|
const relStep = domainStep(m);
|
|
1122
|
-
const runsTimed = timed || opts.runsMs !== undefined, runsUntil = Math.min(wallUntil,
|
|
1123
|
-
const moreRuns = (trial) => (runsTimed ?
|
|
1153
|
+
const runsTimed = timed || opts.runsMs !== undefined, runsUntil = Math.min(wallUntil, countedSearchNow() + (opts.runsMs ?? 500)), least = opts.runs ?? (relStep ? 2000 : Math.min(inferRuns, Math.max(2000, 4 * ms)));
|
|
1154
|
+
const moreRuns = (trial) => !supplied && (runsTimed ? countedSearchNow() < runsUntil : trial < (relStep ? 400 : Math.max(cap, least)) && (used.tries < least || offered < cap) && !stop());
|
|
1124
1155
|
let trials = 0;
|
|
1125
1156
|
// (an assumption with "there exists", a value the request brings, may admit no request at a small bound, a multiple
|
|
1126
1157
|
// of 5 but 0, say: a trial whose steps moved nothing doubles the bound at once)
|
|
1127
1158
|
const skolems = m.inputs.some(i => i.startsWith('some$a'));
|
|
1128
1159
|
for (let trial = 0, bound = 2, stuck = false; moreRuns(trial); trial++, bound = trial % 20 === 0 || stuck ? (bound >= 1024 ? 2 : bound * 2) : bound) {
|
|
1160
|
+
checkWorkEndpoint('inference trial');
|
|
1129
1161
|
stuck = false;
|
|
1130
1162
|
trials++;
|
|
1131
1163
|
// (a rule with maps: one trial in four goes on from a sample, of 64 drawn, holding the value of a state variable the
|
|
@@ -1161,6 +1193,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1161
1193
|
}
|
|
1162
1194
|
let took = 0;
|
|
1163
1195
|
for (let d = 0, tries = 0; d < 40 && tries < 200; tries++) {
|
|
1196
|
+
checkWorkEndpoint('inference sample');
|
|
1164
1197
|
used.tries++;
|
|
1165
1198
|
const input = randomInput(params, rare ? 2 : bound);
|
|
1166
1199
|
let next;
|
|
@@ -1172,9 +1205,10 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1172
1205
|
next = n2;
|
|
1173
1206
|
}
|
|
1174
1207
|
else {
|
|
1175
|
-
|
|
1208
|
+
const sampled = stepSample(params, st, input);
|
|
1209
|
+
if (!sampled)
|
|
1176
1210
|
continue;
|
|
1177
|
-
next =
|
|
1211
|
+
next = sampled;
|
|
1178
1212
|
}
|
|
1179
1213
|
}
|
|
1180
1214
|
catch {
|
|
@@ -1380,7 +1414,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1380
1414
|
const sizeOf = (coef) => coef.length * 100 + coef.reduce((s, [, c]) => s + Math.abs(c), 0);
|
|
1381
1415
|
const forms = [];
|
|
1382
1416
|
const NS = rowsS.length, NK = rowsK.length;
|
|
1383
|
-
const at = (coef, vals, j) => { let s = 0; for (const [i, c] of coef)
|
|
1417
|
+
const at = (coef, vals, j) => { observeCubeTest(); let s = 0; for (const [i, c] of coef)
|
|
1384
1418
|
s += c * vals[i][j]; return s; };
|
|
1385
1419
|
const keyNots = plain.filter(i => !atoms[i].param && !atoms[i].int && !atoms[i].term);
|
|
1386
1420
|
// The guards: the choices first, then yes/nos, then small naturals, at most eight; each shape's largest value per
|
|
@@ -1728,6 +1762,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
1728
1762
|
return vs;
|
|
1729
1763
|
};
|
|
1730
1764
|
const holdsRow = (f, env) => {
|
|
1765
|
+
observeCubeTest();
|
|
1731
1766
|
used.evals++;
|
|
1732
1767
|
const vs = valuesOf(env);
|
|
1733
1768
|
if (f.never)
|
|
@@ -2062,7 +2097,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2062
2097
|
try {
|
|
2063
2098
|
// (a rule of relations: no round of the join, whose hulls and bounds state no law of a relation's tuples; the engine's)
|
|
2064
2099
|
const noJoin = opts.join === 0 || !!Object.keys(m.relations ?? {}).length;
|
|
2065
|
-
const jT0 =
|
|
2100
|
+
const jT0 = countedSearchNow(), jUntil = Math.min(until, now() + (until - now()) * (noJoin ? 0 : opts.join ?? joinShare));
|
|
2066
2101
|
// The control state: the choice (loc) and, where they are few, the yes/nos (a program counter in bits), each of its
|
|
2067
2102
|
// values reached a part of its own.
|
|
2068
2103
|
const jChoice = modes.find(mo => mo.choice && !atoms[mo.atom].cell), bits = modes.filter(mo => mo.bool && !atoms[mo.atom].cell && !atoms[mo.atom].param);
|
|
@@ -2165,6 +2200,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2165
2200
|
// (the frame, places and extra terms compiled once a view (`compiled`); one env the keys are set in, as each
|
|
2166
2201
|
// assignment's own copy was: a level reads only the keys above it)
|
|
2167
2202
|
const go = (i, env) => {
|
|
2203
|
+
checkWorkEndpoint('inference view bindings');
|
|
2168
2204
|
if (i === v.vars.length) {
|
|
2169
2205
|
try {
|
|
2170
2206
|
if (!compiled.frame(env, st))
|
|
@@ -2335,7 +2371,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2335
2371
|
e[k] /= g2; const lead = e.find(x2 => x2 !== 0n); if (lead !== undefined && lead < 0n)
|
|
2336
2372
|
for (let k = 0; k < e.length; k++)
|
|
2337
2373
|
e[k] = -e[k]; return e; };
|
|
2338
|
-
const dirValue = (t, vs) => { let v = 0; for (const [i, c] of t)
|
|
2374
|
+
const dirValue = (t, vs) => { observeCubeTest(); let v = 0; for (const [i, c] of t)
|
|
2339
2375
|
v += c * vs[i]; return v; };
|
|
2340
2376
|
let joins = 0, neversBroken = 0;
|
|
2341
2377
|
// A space of the join: the states (one row each, the scalars), or, for a rule with maps, the cells at a key (a row per
|
|
@@ -2352,7 +2388,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2352
2388
|
const coords = own.filter(i => !exactAtoms.has(i)), CN = coords.length, dirs = directions(coords);
|
|
2353
2389
|
const groups = new Map();
|
|
2354
2390
|
let keyAtoms = ctl.map(c => c.atom);
|
|
2355
|
-
const residual = (e, vs) => { let r = e[CN]; for (let k = 0; k < CN; k++)
|
|
2391
|
+
const residual = (e, vs) => { observeCubeTest(); let r = e[CN]; for (let k = 0; k < CN; k++)
|
|
2356
2392
|
if (e[k])
|
|
2357
2393
|
r += e[k] * BigInt(vs[coords[k]]); return r; };
|
|
2358
2394
|
const join = (g, vs, widen, into = groups) => {
|
|
@@ -2600,7 +2636,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2600
2636
|
const flagless = !Object.keys(m.step.flags ?? {}).length && !!m.assume;
|
|
2601
2637
|
// A kernel search's budget: wall time where the search is timed, else counted in the kernel's work (inferRates.work
|
|
2602
2638
|
// a millisecond), so that what it finds doesn't depend on the machine.
|
|
2603
|
-
const budgeted = (ms2, f) => (timed ? f(
|
|
2639
|
+
const budgeted = (ms2, f) => (timed ? f(countedSearchNow() + Math.max(200, Math.min(ms2, wallUntil - countedSearchNow())))
|
|
2604
2640
|
: counted(inferRates.work, () => f(clock() + ms2)));
|
|
2605
2641
|
const requestAt = (params, st) => {
|
|
2606
2642
|
const vars = {};
|
|
@@ -2685,7 +2721,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
2685
2721
|
// units and 1.6k), and an unknown one ran 13 s (wo's every k: Leader[k] <= VoteRequestMsg[k], 1.2M and 647k), the
|
|
2686
2722
|
// engine's time; counted, where a 2 s wall used to end it, so the join ends where it ends on any machine)
|
|
2687
2723
|
const follow = engineFollows();
|
|
2688
|
-
const out = withEprCap(follow ? joinGrowEpr : Infinity, () =>
|
|
2724
|
+
const out = withEprCap(follow ? joinGrowEpr : Infinity, () => withSearchWork(follow ? searchWork() + joinGrowWork : Infinity, () => budgeted(joinQueryMs, until2 => grow(g, new Map(), { nodes: 0, until: until2 }))));
|
|
2689
2725
|
if (!('tree' in out))
|
|
2690
2726
|
return { stuck: out.stuck, witness: out.stuck === 'sat' ? out.witness : undefined, g: g };
|
|
2691
2727
|
for (const h of usedHyps(g, out.tree))
|
|
@@ -3347,6 +3383,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
3347
3383
|
}
|
|
3348
3384
|
}
|
|
3349
3385
|
const stepIn = (tb, params, st, input) => {
|
|
3386
|
+
checkWorkEndpoint('inference instance step');
|
|
3350
3387
|
try {
|
|
3351
3388
|
if (tb.js)
|
|
3352
3389
|
return tb.js(params, st, input);
|
|
@@ -3902,7 +3939,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
3902
3939
|
if (env.GDP_POOL_STOP !== '0' && k > 0 && !killed.size)
|
|
3903
3940
|
break;
|
|
3904
3941
|
}
|
|
3905
|
-
opts.progress?.('join pool', { made: pool.length, left: live.length, states, ms: Math.round(vnow() - t5), real: Math.round(
|
|
3942
|
+
opts.progress?.('join pool', { made: pool.length, left: live.length, states, ms: Math.round(vnow() - t5), real: Math.round(countedSearchNow() - t0) });
|
|
3906
3943
|
return live;
|
|
3907
3944
|
}
|
|
3908
3945
|
};
|
|
@@ -3927,7 +3964,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
3927
3964
|
const engine = () => {
|
|
3928
3965
|
if (sorts && callerLaws.some(l => l.keys?.length) && now() < until && !stop()) {
|
|
3929
3966
|
if (!timed) {
|
|
3930
|
-
eS = { now: now(), epr: eprMeter.n, erows: used.erows, etries: used.etries, full:
|
|
3967
|
+
eS = { now: now(), epr: eprMeter.n, erows: used.erows, etries: used.etries, full: searchWork() };
|
|
3931
3968
|
eUntil = engineShare * (ms - 0.3 * eS.now);
|
|
3932
3969
|
}
|
|
3933
3970
|
opts.progress?.('join engine', { wall: Math.round(vnow()), eUntil: Math.round(eUntil) });
|
|
@@ -4958,8 +4995,8 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
4958
4995
|
}
|
|
4959
4996
|
ctx = whole;
|
|
4960
4997
|
}
|
|
4961
|
-
const tq =
|
|
4962
|
-
qms += Math.round(
|
|
4998
|
+
const tq = countedSearchNow(), out = stepWith(todo, todoForm, ctx);
|
|
4999
|
+
qms += Math.round(countedSearchNow() - tq);
|
|
4963
5000
|
if ('used' in out) {
|
|
4964
5001
|
stood.set(todo, out.used);
|
|
4965
5002
|
opts.progress?.('join', { round: rounds, set: set.length, ms: qms, proven: todo.slice(0, 60), reads: out.used.length, ctx: ctx.length, attempt });
|
|
@@ -5149,7 +5186,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
5149
5186
|
// (a rule whose scalars the runs held at a few values each: no counter, the engine's shape)
|
|
5150
5187
|
if (engineFollows() && why !== 'inductive')
|
|
5151
5188
|
engine();
|
|
5152
|
-
opts.progress?.('join end', { rounds, set: set.length, why, cone: cone.length, ms: Math.round(
|
|
5189
|
+
opts.progress?.('join end', { rounds, set: set.length, why, cone: cone.length, ms: Math.round(countedSearchNow() - jT0), ...meters() });
|
|
5153
5190
|
// (unproven, the search below begins as it would have: the candidates and the counterexamples as they were)
|
|
5154
5191
|
if (why === 'inductive')
|
|
5155
5192
|
chosen = cone;
|
|
@@ -5159,6 +5196,7 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
5159
5196
|
}
|
|
5160
5197
|
}
|
|
5161
5198
|
catch (e) {
|
|
5199
|
+
checkWorkEndpoint('inference failure');
|
|
5162
5200
|
pool = pool0;
|
|
5163
5201
|
ctis.length = ctis0;
|
|
5164
5202
|
chosen = [];
|
|
@@ -5207,11 +5245,11 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
5207
5245
|
if (enumProof)
|
|
5208
5246
|
last = enumProof;
|
|
5209
5247
|
for (let iter = 0; iter < 300 && !enumProof && now() < until && !stop(); iter++) {
|
|
5210
|
-
const began = now(), wall =
|
|
5248
|
+
const began = now(), wall = countedSearchNow();
|
|
5211
5249
|
// (each law proven alone, then the set as a whole: the same goals, grown once)
|
|
5212
5250
|
last = withTrees(() => search([...given, ...chosen.map(lawFor)]));
|
|
5213
5251
|
const took = now() - began;
|
|
5214
|
-
opts.progress?.('proof', { chosen: chosen.length, goal: last.goal ?? '', stuck: last.stuck ?? '', ms: Math.round(
|
|
5252
|
+
opts.progress?.('proof', { chosen: chosen.length, goal: last.goal ?? '', stuck: last.stuck ?? '', ms: Math.round(countedSearchNow() - wall), counted: Math.round(took) });
|
|
5215
5253
|
if (last.proven && last.checked)
|
|
5216
5254
|
break;
|
|
5217
5255
|
if (!last.goal)
|
|
@@ -5244,10 +5282,10 @@ function inferLawsSearch(target, laws, stepLaws = [], opts = {}) {
|
|
|
5244
5282
|
if (!next && p)
|
|
5245
5283
|
next = best(p, true);
|
|
5246
5284
|
if (!next && p) {
|
|
5247
|
-
const t =
|
|
5285
|
+
const t = countedSearchNow(), made = fromCti(p);
|
|
5248
5286
|
pool.push(...made);
|
|
5249
5287
|
next = best(p);
|
|
5250
|
-
opts.progress?.('cti', { forms: made.length, ms: Math.round(
|
|
5288
|
+
opts.progress?.('cti', { forms: made.length, ms: Math.round(countedSearchNow() - t) });
|
|
5251
5289
|
}
|
|
5252
5290
|
// (a cell form chosen with its mirror where that is alive: the equality both halves state at every key, neither
|
|
5253
5291
|
// inductive without the other, as the real-world corpus's Timelock and blnk need; on CHC's scalar forms, measured,
|