The paper formalizes regular expressions as an inductive datatype and formal languages as a coinductive codatatype in Dafny. It introduces the concept of bisimilarity of languages and equips languages with an algebraic structure. The denotational semantics of regular expressions is defined as an induced function from regular expressions to formal languages, and it is proven that this function preserves algebraic structures up to pointwise bisimilarity.
The paper then equips the set of regular expressions with a coalgebraic structure of the type of unpointed deterministic automata and formalizes the operational semantics of regular expressions as an induced function from regular expressions to formal languages. It is shown that this function preserves coalgebraic structures.
Finally, the paper proves that the denotational and operational semantics of regular expressions coincide, up to pointwise bisimilarity. It also shows that the function formalizing the operational semantics is an algebra homomorphism. The proofs leverage Dafny's built-in inductive and coinductive reasoning capabilities.
Naar een andere taal
vanuit de broninhoud
arxiv.org
Belangrijkste Inzichten Gedestilleerd Uit
by Stefan Zetzs... om arxiv.org 09-17-2024
https://arxiv.org/pdf/2409.09889.pdfDiepere vragen