The SMP pattern matcher
A new pattern matcher has been implemented for the symbolic manipulation program SMP. The pattern matcher correctly treats associative and commutative functions, functions with arbitrary symmetries under permutations of their arguments, and patterns subject to arbitrary logical predicates. A pattern is said to match a candidate instance if the set of expressions it represents is a superset of those represented by the instance (either or both may contain generic symbols which match possibly infinite sets of expressions). The matcher is primarily syntactic, but is able to find matches for syntactically different expressions which become literally equivalent upon replacing the generic symbols in the pattern by their bindings to subexpressions of the instance and simplifying the result. The bindings must be determined by literal comparison with the instance, not by solving equations.
This paper discusses issues arising during the construction of this pattern matcher, and gives examples of using pattern matching for extending the power of built-in operations and adding new mathematical knowledge to a symbol manipulation program.
KeywordsPattern Matcher Mathematical Knowledge Generic Symbol Computer Algebra System Algebraic Computation
Unable to display preview. Download preview PDF.
- Buchberger, B., and Loos, R., Algebraic Simplification, Computer Algebra, Symbolic and Algebraic Computation, Buchberger, Collins and Loos, ed., Springer-Verlag, New York, 1983, pp. 11–43.Google Scholar
- Cowan, R.M. and Griss, M.L., Hashing — The Key to Rapid Pattern Matching, Symbolic and Algebraic Computation, Eurosam '79, An International Symposium on Symbolic and Algebraic Manipulation, EUROSAM, New York, 1979, pp. 266-278.Google Scholar
- Fateman, R. J., MACSYMA's General Simplifier: Philosophy and Operation, Proceedings of the 1979 MACSYMA User's Conference, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA, 1979, pp. 563–582.Google Scholar
- Fateman, R.J., Essays in Algebraic Simplification, Tech. Rep. MAC-TR-95, Massachusetts Institute of Technology, 545 Technology Square, Cambridge, MA, 1972.Google Scholar
- Charles L. Forgy, Rete: A Fast Algorithm for the Many Pattern/Many Object Pattern Match Problem, Tech. Rep. 309, Carnegie-Mellon University, Pittburgh, PA 15213, 1980.Google Scholar
- Hearn, A. C., A New Reduce Model for Algebraic Simplification, SYMSAC '76, Proceeding of the 1976 ACM Symposium on Symbolic and Algebraic Computation, ACM, 1133 Avenue of the Americas, New York, NY 10036, 1976, pp. 60–65.Google Scholar
- Jenks, R. D., A Pattern Compiler, SYMSAC '76, Proceeding of the 1976 ACM Symposium on Symbolic and Algebraic Computation, ACM, 1133 Avenue of the Americas, New York, NY 10036, 1976, pp. 60–65.Google Scholar
- Kevin McIsaac, Pattern Matching Algebraic Identities, University of Western Australia, Nedlands, Western Australia, preprint, 1984.Google Scholar
- Kevin McIsaac, private communication.Google Scholar
- Paterson, M.S. and Wegman, M.N., Linear Unification, J. Comp. and System Sciences, 16 (1968), pp. 158–167.Google Scholar
- S. Wolfram, et al., SMP Reference Manual, Inference Corporation, Los Angeles, CA 90045, 1983.Google Scholar