Pattern matching is a powerful tool for symbolic computations. Applications include symbolic integration, term rewriting systems, theorem proving and the manipulation of abstract syntax trees. Given a pattern and an expression, the goal of pattern matching is to find a substitution for all the variables in the pattern such that the pattern becomes the expression. As an example, consider the pattern f(x), where x is a variable, and the expression f(a). Then the substitution that replaces x with a is a match. In practice, functions can also be associative and/or commutative, which makes matching more complicated and can lead to multiple possible matches.
No takes yet. Share an insight, caveat, or question.
Krebber et al. (2018) studied this question.
Synapse has enriched 5 related papers. Consider them for comparative context: