Monadic Expressions and Their Derivatives - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue RAIRO - Theoretical Informatics and Applications (RAIRO: ITA) Année : 2024

Monadic Expressions and Their Derivatives

Résumé

There are several well-known ways to compute derivatives of regular expressions due to Brzozowski, Antimirov or Lombardy and Sakarovitch. We propose another one which abstracts 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 expressions 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 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.
Fichier principal
Vignette du fichier
ita230006.pdf (1.21 Mo) Télécharger le fichier
Origine Publication financée par une institution

Dates et versions

hal-04507158 , version 1 (15-03-2024)

Identifiants

Citer

Samira Attou, Ludovic Mignot, Clément Miklarz, Florent Nicart. Monadic Expressions and Their Derivatives. RAIRO - Theoretical Informatics and Applications (RAIRO: ITA), 2024, 58, pp.6. ⟨10.1051/ita/2023014⟩. ⟨hal-04507158⟩
7 Consultations
4 Téléchargements

Altmetric

Partager

Gmail Mastodon Facebook X LinkedIn More