Embedded Languages for Describing and Verifying Hardware
Doktorsavhandling, 2001

Lava is a system for designing, specifying, verifying and implementing hardware. It is embedded in the functional programming language Haskell, which means that hardware descriptions are first-class objects in Haskell. We are thus able to use modern programming language features, such as higher-order functions, polymorphism, type classes and laziness, in hardware descriptions. We present two rather different versions of Lava. One version realises the embedding by using monads to keep track of the information specified in a hardware description. The other version uses a new language construct, called observable sharing, which eliminates the need for monads so that descriptions are much cleaner. Adding observable sharing to Haskell is a non-conservative extension, meaning that some properties of Haskell are lost. We thus investigate to what extent we are still allowed to use a normal Haskell compiler or interpreter. We also introduce an embedded language for specifying properties. The use of this language is two-fold. On the one hand, we can use it to specify and later formally verify properties of the described circuits. On the other hand, we can use it to specify and randomly test properties of normal Haskell programs. As a bonus, since hardware descriptions are embedded in Haskell, we can also use it to test our circuit descriptions. Further, we present a method for formal verification of safety properties of circuits, based on temporal induction. Temporal induction proves a property by proving it for the initial state (base case), and, by assuming it holds for a certain state, proving it also holds for the following states (step case). It is well-known that induction can be improved by strengthening the inductive hypothesis. We propose several techniques that can automatically strengthen a given property.

specification languages

formal verification

synchronous hardware description

functional programming

embedded languages


Koen Lindström Claessen

Institutionen för datavetenskap


Data- och informationsvetenskap



Doktorsavhandlingar vid Chalmers tekniska högskola. Ny serie: 1698