Computing the Canonical Cover in Haskell

Today I had a little too much free time on my hand, but didn’t want to start anything that I couldn’t finish before the start of my vacation on Monday. Since I know I will teach two tutorial groups for the intro course on databases at TUM next term, I decided to write a little program that might be helpful when it comes to learning about the canonical cover.
The problem appeared to be very mathematical, so I decided to do it in Haskell. The program itself is kind of boring: You enter a set of functional dependencies and get back the canonical cover. The only usecase I can think of is somebody trying to learn the algorithm and checking if their result is correct.
But writing it sure was a lot of fun! The source code is on Github, a binary for Linux is here.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.