arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2208.14724cs.FL
收藏

一元表达式及其导数

Monadic Expressions and their Derivatives

Samira Attou, Ludovic Mignot, Clément Miklarz, Florent Nicart

摘要:

我们提出了另一种解释著名的衍生物计算从正则表达式,由于Brzozowski,Antimirov或伦巴第和Sakarovitch,为了抽象的基础数据结构(例如,集或线性组合)使用单子的概念。作为这种推广优势的一个例子,我们引入了一个新的派生技术的基础上分级模块单子。我们还将定义表达式的运算符扩展到值集上的任何n元函数,例如经典运算(如布尔权重的求反或求交)或更奇特的运算(如有理权重的代数平均)。此外,我们提出了如何计算一个(不一定有限)自动机从这样一个扩展的表达式,使用Colcombet和Petrisan自动机的分类定义。这些范畴论概念允许我们以一种统一的方式进行这种构造,而不管其基础是什么单子。最后,为了说明我们的工作,我们提出了一个Haskell实现这些概念,使用先进的功能编程技术,我们提供了一个Web界面来操作具体的例子。

英文摘要:

We propose another interpretation of well-known derivatives computations from regular expressions, due to Brzozowski, Antimirov or Lombardy and Sakarovitch, in order to abstract the underlying data structures (e.g. sets or linear combinations) using the notion of monad. As an example of this generalization advantage, we introduce a new derivation technique based on the graded module monad. We also extend operators defining expressions to any n-ary functions over value sets, such as classical operations (like negation or intersection for Boolean weights) or more exotic ones (like algebraic mean for rational weights). Moreover, we present how to compute a (non-necessarily finite) automaton from such an extended expression, using the Colcombet and Petrisan categorical definition of automata. These category theory concepts allow us to perform this construction in a unified way, whatever the underlying monad. Finally, to illustrate our work, we present a Haskell implementation of these notions using advanced techniques of functional programming, and we provide a web interface to manipulate concrete examples.

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

↑