Quickie 3
A few days ago, a friend argued that hardware description languages could benefit greatly from purely functional programming languages. The gist of his argument was that purely functional programming languages let you move more towards describing what a problem is and less on how to solve it, with the “how” part including problems such as specifying execution order.
I think that was the argument, anyway; I may be misrepresenting it. The concept made sense to me at the time (2 AM or so), but I couldn’t provide any concrete examples of the idea made real.
While playing around with graphics in Haskell today, I stumbled across BlueSpec SystemVerilog, a hardware description language. The interesting bit about BlueSpec SystemVerilog is that an early version (circa 2001) was implemented as an extension of Haskell.
As you can read in the slides, BSV wasn’t really Haskell: its runtime execution semantics were quite different. But the syntax and compile-time semantics were Haskell’s.
I don’t know if Lennart Augustsson’s motivations for using Haskell as the base for BSV were identical — or even similar — to my friend’s arguments. The slides don’t really give enough information to divine that. But I still think it’s cool to see that not everything my friends and I discuss is completely wacky.