simplipy 0.6.0: sorted rule placeholders, certificate-gated matching, ~59x faster simplify, covered-rule pruning#36
Merged
Merged
Conversation
psaegert
force-pushed
the
release/0.6.0
branch
3 times, most recently
from
July 21, 2026 02:41
a4294c2 to
28d736a
Compare
…, engine performance overhaul, covered-rule pruning, observability The rule language gains placeholder sorts (_ any subtree; ? variable leaf; ! subtree certified defined-and-finite a.e. by an adaptive interval analysis, fail-closed), with the mining pipeline emitting sorted patterns and the matcher enforcing them at apply time. The simplify hot path is reworked at byte-identical outputs: certificates are evaluated once per completed syntactic match and memoized (per call + a generational per-engine cache), the fixpoint memoizes whole passes and rule-normal subtrees, and the kernel runs on interned token ids (~20x fewer allocations) -- large certificate- bearing rulesets simplify ~59x faster at 64k-expression scale. Adds deterministic covered-rule pruning (prune_covered_rules, find_rules(prune='covered'), CLI), simplify_counters() observability, high-precision equivalence rescue, provenance sidecars, NaN-propagating constant folding, and the group-axiom cancellation fix; removes the scipy dependency and dead pure-Python-engine remnants. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhLKRZHNh5nNjLZhZqym9w
…ipeline, sort semantics, pruning guide, diagrams, CHANGELOG Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhLKRZHNh5nNjLZhZqym9w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0.6.0 is a major release in three movements: a richer rule language (placeholder sorts with match-time certificates), a performance overhaul of the simplify hot path at byte-identical outputs, and new ruleset tooling (deterministic covered-rule pruning, hot-path observability), together with a documentation refresh including a formally typeset specification of the mining algorithm.
Rule language: placeholder sorts
Every placeholder in a rule now carries a sort — the binding claim its sigil encodes, enforced by the matcher at apply time:
_ibinds any subtree;?ibinds only a bare variable leaf;!ibinds a variable leaf freely, but a composite subtree only when a match-time certificate proves it defined and finite almost everywhere (an adaptive interval analysis over the reals; fail-closed — what cannot be certified is not bound).Sorts let a rule that is value-sound only for certified operands make the wider claim without giving up soundness. Newly mined rulesets emit sorted patterns; existing assets behave exactly as before, and the shipped
dev_7-3asset is unchanged.Performance (byte-identical outputs)
Net effect on a 65,536-expression training-prior benchmark: large certificate-bearing rulesets simplify ~59× faster than 0.5.0; certificate-free rulesets gain ~2.3×. Verified byte-identical on ~1M expressions across four rulesets and three corpora.
Tooling
SimpliPyEngine.prune_covered_rules()/find_rules(prune='covered')/ CLIprune-covered-rules: deterministic batch remove-and-repair pruning of compositionally covered rules (strict instantiation criterion incl. composite probes for wide slots; greedy — valid, not necessarily minimal).simplify_counters()/reset_simplify_counters(): hot-path counters and per-stage timing for profiling batches.Fixes
0/0,inf - infetc. no longer cancel to wrong finite values with rule application disabled).inf/nanare never absorbed into a fittable<constant>.Removed
scipyruntime dependency (dead since the 0.5.0 native constant-fit cutover) and the unusedcriteriondev-dependency.SimpliPyEngineattributes left over from the removed pure-Python engine,utils.leaf_value, and two undocumented dev-only core methods. See CHANGELOG for the full list.Documentation
docs/algorithm.md, with PDF/LaTeX downloads and a line-to-configuration reading guide).Validation
cargo check --all-targetswarning-free.mkdocs build --strictclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01EhLKRZHNh5nNjLZhZqym9w