Efficient Pattern Matching in Python

09/29/2017
by   Manuel Krebber, et al.
0

Pattern matching is a powerful tool for symbolic computations. Applications include term rewriting systems, as well as the manipulation of symbolic expressions, abstract syntax trees, and XML and JSON data. It also allows for an intuitive description of algorithms in the form of rewrite rules. We present the open source Python module MatchPy, which offers functionality and expressiveness similar to the pattern matching in Mathematica. In particular, it includes syntactic pattern matching, as well as matching for commutative and/or associative functions, sequence variables, and matching with constraints. MatchPy uses new and improved algorithms to efficiently find matches for large pattern sets by exploiting similarities between patterns. The performance of MatchPy is investigated on several real-world problems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/16/2017

MatchPy: A Pattern Matching Library

Pattern matching is a powerful tool for symbolic computations, based on ...
research
05/02/2017

Non-linear Associative-Commutative Many-to-One Pattern Matching with Sequence Variables

Pattern matching is a powerful tool which is part of many functional pro...
research
07/20/2017

FORM version 4.2

We introduce FORM 4.2, a new minor release of the symbolic manipulation ...
research
12/19/2020

SymFields: An Open Source Symbolic Fields Analysis Tool for General Curvilinear Coordinates in Python

An open source symbolic tool for vector fields analysis 'SymFields' is d...
research
07/28/2022

Engineering faster double-array Aho-Corasick automata

Multiple pattern matching in strings is a fundamental problem in text pr...
research
02/15/2021

Metatheory.jl: Fast and Elegant Algebraic Computation in Julia with Extensible Equality Saturation

We introduce Metatheory.jl: a lightweight and performant general purpose...
research
02/17/2022

Term Rewriting Based On Set Automaton Matching

In previous work we have proposed an efficient pattern matching algorith...

Please sign up or login with your details

Forgot password? Click here to reset