CLEI Electronic Journal (Dec 2021)

The Design of a Verified Derivative-Based Parsing Tool for Regular Expressions

  • Elton Cardoso,
  • Maycon Amaro,
  • Samuel Feitosa,
  • Leonardo Reis,
  • André Du Bois,
  • Rodrigo Ribeiro

DOI
https://doi.org/10.19153/cleiej.24.3.2
Journal volume & issue
Vol. 24, no. 3

Abstract

Read online

We describe the formalization of Brzozowski and Antimirov derivative based algorithms for regular expression parsing, in the dependently typed language Agda. The formalization produces a proof that either an input string matches a given regular expression or that no matching exists. A tool for regular expression based search in the style of the well known GNU grep has been developed with the certified algorithms. Practical experiments conducted with this tool are reported.