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

05/02/2017
by   Manuel Krebber, et al.
0

Pattern matching is a powerful tool which is part of many functional programming languages as well as computer algebra systems such as Mathematica. Among the existing systems, Mathematica offers the most expressive pattern matching. Unfortunately, no open source alternative has comparable pattern matching capabilities. Notably, these features include support for associative and/or commutative function symbols and sequence variables. While those features have individually been subject of previous research, their comprehensive combination has not yet been investigated. Furthermore, in many applications, a fixed set of patterns is matched repeatedly against different subjects. This many-to-one matching can be sped up by exploiting similarities between patterns. Discrimination nets are the state-of-the-art solution for many-to-one matching. In this thesis, a generalized discrimination net which supports the full feature set is presented. All algorithms have been implemented as an open-source library for Python. In experiments on real world examples, significant speedups of many-to-one over one-to-one matching have been observed.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/29/2017

Efficient Pattern Matching in Python

Pattern matching is a powerful tool for symbolic computations. Applicati...
research
07/28/2022

Engineering faster double-array Aho-Corasick automata

Multiple pattern matching in strings is a fundamental problem in text pr...
research
10/16/2017

MatchPy: A Pattern Matching Library

Pattern matching is a powerful tool for symbolic computations, based on ...
research
11/12/2019

Scheme Macros for Non-linear Pattern Matching with Backtracking for Non-free Data Types

Pattern matching is an important feature of programming languages for da...
research
11/07/2018

Unification in Matching Logic

Matching Logic is a framework for specifying programming language semant...
research
02/14/2020

Functional Programming in Pattern-Match-Oriented Programming Style

Throughout the history of functional programming, recursion has emerged ...
research
11/07/2018

Unification in Matching Logic - Extended Version

Matching Logic is a framework for specifying programming language semant...

Please sign up or login with your details

Forgot password? Click here to reset