The SMP pattern matcher

  • J. M. Greif
Computer Algebra Systems Implementation I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 204)


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.


Pattern Matcher Mathematical Knowledge Generic Symbol Computer Algebra System Algebraic Computation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    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
  2. [2]
    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
  3. [3]
    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
  4. [4]
    Fateman, R.J., Essays in Algebraic Simplification, Tech. Rep. MAC-TR-95, Massachusetts Institute of Technology, 545 Technology Square, Cambridge, MA, 1972.Google Scholar
  5. [5]
    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
  6. [6]
    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
  7. [7]
    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
  8. [8]
    Kevin McIsaac, Pattern Matching Algebraic Identities, University of Western Australia, Nedlands, Western Australia, preprint, 1984.Google Scholar
  9. [9]
    Kevin McIsaac, private communication.Google Scholar
  10. [10]
    Paterson, M.S. and Wegman, M.N., Linear Unification, J. Comp. and System Sciences, 16 (1968), pp. 158–167.Google Scholar
  11. [11]
    Robinson, J.A., A Machine-Oriented Logic Based on the Resolution Principle, JACM, 12 (1965), pp. 23–41.CrossRefGoogle Scholar
  12. [12]
    S. Wolfram, et al., SMP Reference Manual, Inference Corporation, Los Angeles, CA 90045, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • J. M. Greif
    • 1
  1. 1.Inference CorporationLos AngelesUSA

Personalised recommendations