简体   繁体   English

简化Mathematica中的正则表达式

[英]Simplify Regular Expression in Mathematica

I recently found out about Kleene algebra for manipulating and simplifying regular expressions. 我最近发现了关于Kleene代数的操作和简化正则表达式。

I'm wondering if this has been build into any computational software programs like Mathematica? 我想知道这是否已经构建到像Mathematica这样的计算软件程序中? It would be great to have a computational tool for doing unions and concatenations of large expressions and have the computer simplify them. 拥有一个用于进行大型表达式的联合和连接的计算工具并让计算机简化它们将会很棒。

If you are not aware of any programs with this algebra built in, do you know any programs that allow extending their engines with new algebras? 如果您不了解内置此代数的任何程序,您是否知道任何允许使用新代数扩展其引擎的程序?

On http://www.maplesoft.com/msw/program/MSW04FinalProgram.pdf , it states: http://www.maplesoft.com/msw/program/MSW04FinalProgram.pdf上 ,它声明:

One of the basic results of the theory of finite automata is the famous Kleene theorem, which states that a language is acceptable by a finite automaton if and only if it can be represented by a regular expression. 有限自动机理论的基本结果之一是着名的Kleene定理,该定理指出一种语言是有限自动机可接受的,当且仅当它可以用正则表达式表示时。

and

The main difficulty of the algorithmic treatment of regular expressions is, however, their simplification. 然而,正则表达式的算法处理的主要困难是它们的简化。 Although several identities are known concerning regular expressions, eg, the rules of Kleene algebra, there does not exist an effective algorithm for solving the simplification problem of regular expressions. 尽管已知关于正则表达式的若干身份,例如Kleene代数的规则,但是不存在用于解决正则表达式的简化问题的有效算法。

and

Under the circumstances, the only way left is to develop heuristic algorithms for simplifying regular expressions. 在这种情况下,剩下的唯一方法是开发启发式算法来简化正则表达式。 For the aut package, this paper outlines the Maple procedures Rsimplify, Rabsorb and Rexpand. 对于aut包,本文概述了Maple过程Rmplmplify,Rabsorb和Rexpand。

Im wondering if open-source implementations of Kleene Algebra algorithms exist. 我想知道是否存在Kleene Algebra算法的开源实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM