Monadic Expressions and their Derivatives [extended version]
Samira Attou, Ludovic Mignot, Cl\'ement Miklarz, Florent Nicart

TL;DR
This paper introduces a monadic framework for derivatives of regular expressions, generalizing data structures and extending automaton construction, with applications in parsing and weighted operations, demonstrated through a Haskell implementation.
Contribution
It presents a novel monadic interpretation of derivatives, generalizes automaton construction for extended expressions, and applies category theory to unify these concepts.
Findings
A new derivation technique based on the graded module monad.
Generalization of automaton construction for extended expressions.
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 first introduce a new derivation technique based on the graded module monad and then show an application of this technique to generalize the parsing of expression with capture groups and back references. 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…
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.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
