After a short break, work has resumed in newRPL. The most notable addition is algebraic objects. Expressions can now be compiled/decompiled properly, including variables, all operators and functions of variable number of arguments. This all puts newRPL symbolic capabilities roughly at the level of the HP48 (in the sense that expressions can be written, operated upon, and evaluated but there's no CAS).

Where to go from here? A new CAS needs to be written. While there are open source CAS systems available, none can integrate with the RPL framework very well. As of right now, a rule matching engine is in the works (it can match some basic rules already). Rules are one of the many ways to implement a CAS, and being an open approach it was the chosen route.

The idea is that many of the commands in userRPL that make use of the CAS are more or less substitution rules, so a generic engine would allow to implement a large fraction of the commands just by creating a list of rules.

Rules use a new operator in newRPL, which combined with specially formed placeholder IDENTS will provide a functionality similar to "large" CAS systems.

For example:

<< 'X+1' 'X->Z+1' RULEAPPLY >>

will produce

'Z+1+1'

While simple substitutions like this one can be accomplished simply by storing 'Z+1' in the variable 'X' and using EVAL, the engine allows generic IDENTS that are placeholders for complex expressions. These special IDENTS begin with a dot, and are to be used only in rules:

<< 'X^2-(X+2)^2' '(.A+.B)^2->.A^2+2*.A*.B+.B^2' RULEAPPLY >>

will interpret the generic identifiers '.A' and '.B' as any expression, and make the replacements:

'X^2-(X^2+2*X*2+2^2)'

There are additional constraints that can be included in the name of the variable, for example '.A.N' will match only numeric expressions (any expression that does not contain any IDENTS).

The command RULEAPPLY will accept single rules, lists of rules, or a variable name containing a list of rules or a rule.

There will be system rule lists for the most common operations, and the user will be able to override, or add to the rules. For example (and this is subject to change), the comand SIMPLIFY could use a system list of rules, and then look for a variable named 'RULES.SIMPLIFY' in the current directory. If the variable exists, also apply those rules.

This mechanism will allow users to customize and expand the CAS with their own rules, which will be used automatically by the usual commands.

Work on this rule matching engine is delaying the release of the next demo, which will include basic rule replacement functionality.