We present by example a new application domain for functional languages: emulators for embedded real-time protocols. As a casestudy, we implement a simple emulator for the Biphase Mark Protocol, a physical-layer network protocol in Haskell. The surprising result is that a pure functional language with no built-in notion of time is extremely well-suited for constructing such emulators. Furthermore, we use Haskell’s property-checker QuickCheck to automatically generate real-time parameters for simulation. We also describe a novel use of QuickCheck as a “probability calculator” for reliability analysis. Categories and Subject Descriptors B.8.1 [Hardware]: Performance and Reliability General Terms Languages, Reliability, Verification Keywords Physical-layer protocol Testing, Emulation, Functional Programming
Lee Pike, Geoffrey M. Brown, Alwyn Goodloe