Monadic Expressions and their Derivatives
Samira Attou (LITIS, Universit\'e de Rouen Normandie), Ludovic Mignot, (GR2IF, Universit\'e de Rouen Normandie), Cl\'ement Miklarz (GR2IF,, Universit\'e de Rouen Normandie), Florent Nicart (GR2IF, Universit\'e de, Rouen Normandie)

TL;DR
This paper introduces a monadic framework for derivatives of regular expressions, generalizing existing methods, extending operators, and providing a categorical automaton construction with a Haskell implementation.
Contribution
It generalizes derivatives of regular expressions using monads, introduces a new derivation technique with graded modules, and unifies automaton construction via category theory.
Findings
A new monadic interpretation of derivatives for regular expressions.
Extension of expression operators to n-ary functions over value sets.
Implementation of the framework in Haskell with a web interface.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
