general comments, was: proposal to cut some aliases



Stavros,

> The core simplifier is fast and (pretty) good because thought
> was put into (1) standardizing the internal format (sorting
> arguments in useful ways) and taking advantage of that
> and (2) ordering the rule applications.  No doubt this work
> could be reproduced by a combination of compiling rules
> cleverly and giving hints of various kinds, but I suspect
> the result would be slower, no more functional, and perhaps
> still difficult to extend (presumably the main motivation for
> doing it).

Well, the primary motivation behind making the simplifier
rule-based is to make it more comprehensible. At present,
you have to reverse-engineer the source code to know
what identities are applied.
Expressing identities as rules won't completely solve the
problem -- there would be lot of rules & they would interact,
so predicting their effect is hard -- but I'm pretty sure it would
make it easier to comprehend what the simplifier is doing.

Extensibility isn't so much of an issue since the simplifier
can already be extended by rules. It's the built-in stuff that
I'm thinking about.

Ideally it would be possible to cancel the built-in
simplification rules or maybe swap one set of built-in
rules for another. I am thinking (day dreaming, really)
that this could make it easier to work in a specified domain,
or, as an academic exercise for example, to reimplement
the standard rules. But this rule-swapping business is
a secondary motivation for reworking the simplifier.

I'm quite sure that a rule-base simplifier would be slower,
but I'd certainly be willing to give up a small constant factor
in time, if it gave us greater comprehensibility.

best,
Robert