arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1710.06915cs.PLcs.SC
收藏

MatchPy:一个模式匹配库

MatchPy: A Pattern Matching Library

Manuel Krebber, Henrik Barthels, Paolo Bientinesi

摘要:

模式匹配是符号计算的有力工具,它基于定义良好的项重写系统理论。应用程序域包括代数表达式、抽象语法树以及XML和JSON数据。不幸的是,没有像Mathematica那样通用和灵活的模式匹配的轻量级实现,用于Python Mathics、MacroPy、patterns、PyPatt。因此,我们创建了开源模块MatchPy,它使用一种新的算法在Python中提供类似的模式匹配功能,该算法通过利用模式之间的相似性更有效地找到大型模式集的匹配。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑