Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Well-Behaved (Co)algebraic Semantics of Regular Expressions in Dafny #23

Merged
merged 64 commits into from
Jan 12, 2024

Conversation

stefan-aws
Copy link
Contributor

@stefan-aws stefan-aws commented Dec 14, 2023

Regular expressions are one of the most ubiquitous formalisms of theoretical computer science. Commonly, they are 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 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 finite automata. In this blogpost, we utilise Dafny’s built-in inductive and coinductive reasoning capabilities to show that the two semantics of regular expressions are well-behaved, in the sense they are in fact one and the same, up to pointwise bisimulation.

@stefan-aws stefan-aws changed the title DRAFT: Well-Behaved (Co)algebraic Semantics of Regular Expressions in Dafny Well-Behaved (Co)algebraic Semantics of Regular Expressions in Dafny Dec 15, 2023
Copy link
Member

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very nice post! I just have a few suggestions for improved wording here and there. It also might be nice to use the syntax highlighting that some other recent posts used, though that's not essential.

@stefan-aws stefan-aws requested a review from atomb January 2, 2024 17:20
Copy link
Contributor

@RustanLeino RustanLeino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting and very clear blog post. Well done!

assets/src/semantics-of-regular-expressions/Semantics.dfy Outdated Show resolved Hide resolved
assets/src/semantics-of-regular-expressions/Semantics.dfy Outdated Show resolved Hide resolved
assets/src/semantics-of-regular-expressions/Semantics.dfy Outdated Show resolved Hide resolved
assets/src/semantics-of-regular-expressions/Semantics.dfy Outdated Show resolved Hide resolved
assets/src/semantics-of-regular-expressions/Semantics.dfy Outdated Show resolved Hide resolved
Copy link
Member

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw a couple of tiny things to fix, but otherwise think this looks great.

Makefile Outdated Show resolved Hide resolved
@stefan-aws stefan-aws marked this pull request as draft January 9, 2024 17:32
@stefan-aws
Copy link
Contributor Author

Content is ready for review. However, turning this temporarily into a draft to implement the changes needed for @jtristan's tool that automatically verifies code snippets.

@stefan-aws stefan-aws marked this pull request as ready for review January 10, 2024 13:40
@stefan-aws stefan-aws dismissed RustanLeino’s stale review January 10, 2024 16:58

Content previously approved. Only changed the stylesheet. Agreed offline

@stefan-aws stefan-aws merged commit c13d273 into main Jan 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants