Remaining Issues in Pattern Matching
Several issues remain to be addressed:
- Efficiency: If there are many patterns, we want to organize them
for efficient search.
- Recursion to transform substructures as well as the main expression.
- Repetition to transform an expression as many times as possible.
- Termination: can the program get into a loop by transforming an
expression and then transforming it back to its original form?
- Restricted matching, e.g., one might wish to restrict certain
pattern variables to match only numeric constants.
- Evaluation of expressions in the output pattern: if a transformation
produces (+ 2 3), it could be evaluated to 5.