[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: Rule-based integration
From: |
Richard Fateman |
Subject: |
[Axiom-developer] Re: Rule-based integration |
Date: |
Thu, 29 Jul 2010 06:21:31 -0700 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
TimDaly wrote:
...
There has been some initial discussions between myself, Albert Rich,
and David Parnas about how to think about this problem.
My current thinking involves a tree-structuring of the rule patterns
where each node in the tree represents one or more pattern
tables and each edge is a function (e.g. division operation, etc).
Walking the input expression walks the tree to find applicable
patterns.
Because a pattern table can be reached from many different paths the
"tree" is actually a graph. Each table specifies an input pattern and
an output pattern and the output pattern points to another node.
...
Tilu would take a rule and place it several places in a tree. As an
overly-simplified example, consider
a*cos(x)+b. It appears to have a head operator of "+" and so that is
where the rule would seem to fit in a tree of rules.
However, if b=0, the head operator is "*", and so the pattern a*cos(x)
--> .. would also appear in the tree at "*".
But if a=1, then the rule would appear with head operator "cos".
As I recall, the head operators are not really in a tree but a hash table.
The entries in the hash table may themselves be hash tables, where the
presence or absence of some sub-operators is allowed, in order to narrow
down the number of possibly-appropriate rules.
Note that one may end up in Tilu with some number of matching rules --
with possibly different sets of side conditions, or maybe not. Tilu does
not exclude the possibility of any number of applicable rules giving
perhaps different versions of the answer.
RJF