AngouriMath

Navigation

RewriteRule


← Back to list of classes

Description

Summary

One rewrite, addressable on its own: what it matches, what it puts there instead, where it
is written and which way it moves.

Remarks

A RewriteRuleSet is the unit the library applies; this is the unit inside it.
The distinction is what
#28 asks for — a
derivation that says which rewrite fired rather than which group of them — and what
#825 is about.
These are generated from the switch that defines them, arm by arm, rather
than written out a second time. That is deliberate and it is the whole design: the
switch stays the thing a human edits and the thing the simplifier calls, so nothing
on the hot path changes and the two forms cannot drift apart. Transcribing forty arms into
forty objects by hand would be forty chances to alter a pattern silently, and expressing
them through the runtime matcher in
AngouriMath.Core.Transformations.Matching was measured at about five percent of
Simplify(System.Int32) per rule set exchanged.
A per-rule Soundness is here now, and it is empty for most rules on
purpose.
This paragraph used to say the tier was absent, on the argument that a rule's
tier is a claim somebody has to argue for and cannot be derived from syntax. That argument
is right and it is not a reason for the property to be missing: where the argument has been made, the claim needs somewhere to live. A rule written as data declares one, and the
two tiers are both well populated — most rules are
Sound — against every set in the registry declaring
SoundUnderAssumptions, so the per-rule tier says
something the per-set one cannot. The live counts are measured by
RuleAuthoringGuideTest rather than quoted here, where they would drift. A rule
read off a switch arm declares nothing, so its Soundness is
null — which says the set's tier is a fallback rather than a measurement,
where silently copying the set's down would have said the opposite.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online