计算机科学 > 程序设计语言
[提交于 2017年9月29日]
标题:Efficient Pattern Matching in Python
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Manuel Krebber B.Sc.[v1] 2017年9月29日 星期五 20:14:47 UTC