Well-Behaved (Co)algebraic Semantics of Regular Expressions in Dafny
Stefan Zetzsche, Wojciech Rozowski

TL;DR
This paper formalizes and verifies in Dafny that the inductive and coinductive semantics of regular expressions, corresponding to their language and automaton interpretations, are equivalent through bisimilarity.
Contribution
It provides the first formal verification in Dafny that the two semantics of regular expressions are equivalent, using coalgebraic interpretations.
Findings
Dafny effectively models inductive and coinductive semantics.
The equivalence of semantics is established via bisimilarity.
The approach serves as a blueprint for formalizing other theories.
Abstract
Regular expressions are commonly understood in terms of their denotational semantics, that is, through formal languages -- the regular languages. This view is inductive in nature: two primitives are equivalent if they are constructed in the same way. Alternatively, regular expressions can be understood in terms of their operational semantics, that is, through deterministic finite automata. This view is coinductive in nature: two primitives are equivalent if they are deconstructed in the same way. It is implied by Kleene's famous theorem that both views are equivalent: regular languages are precisely the formal languages accepted by deterministic finite automata. In this paper, we use Dafny, a verification-aware programming language, to formally verify, for the first time, what has been previously established only through proofs-by-hand: the two semantics of regular expressions are…
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, Reasoning, and Knowledge · Advanced Algebra and Logic · Logic, programming, and type systems
