Conference site ยป Proceedings

MatchPy: A Pattern Matching Library

Manuel Krebber
RWTH Aachen University, AICES, HPAC Group

Henrik Bartels
RWTH Aachen University, AICES, HPAC Group

Paolo Bientinesi
RWTH Aachen University, AICES, HPAC Group

Abstract

Pattern matching is a powerful tool for symbolic computations, based on the well-defined theory of term rewriting systems. Application domains include algebraic expressions, abstract syntax trees, and XML and JSON data. Unfortunately, no lightweight implementation of pattern matching as general and flexible as Mathematica exists for Python Mathics,MacroPy,patterns,PyPatt. Therefore, we created the open source module MatchPy which offers similar pattern matching functionality in Python using a novel algorithm which finds matches for large pattern sets more efficiently by exploiting similarities between patterns.

Keywords

pattern matching, symbolic computation, discrimination nets, term rewriting systems

DOI

10.25080/shinma-7f4c6e7-00b

Bibtex entry

Full text PDF