Functional programming languages play an important role in the development of correct software systems. As embedded devices become pervasive and perform critical tasks in our lives, their reliability becomes paramount. This presents a natural opportunity to explore the application of functional programming languages to systems that demand highly predictable behavior.In this paper, we explore existing functional programming language compilers and their applicability to real-time embedded systems. We do this by defining important characteristics needed by a real-time programming language and survey how well existing languages meet these characteristics. We conduct empirical analysis of language runtimes in order to assess the impact of dynamic memory management on predictability and performance. Lastly, we review different programming models for expressing real-time considerations in applications.
INTRODUCTIONReal-time software is an integral part in many complex software/hardware systems that require timing guarantees in addition to traditional functional correctness guarantees. Such systems vary in nature, spanning multiple domains including industrial control, robotics, automotive, avionics, and medical devices, among others. These systems all provide services whose utility is dictated by the timeliness in which they respond to external (eg, sensor readings) and internal (eg, software events and interrupts) stimuli. Writing the software for these systems is a difficult undertaking because ensuring the system is correct requires providing predictability guarantees. This is exacerbated by the fact that most software for real-time systems is written in "low level" imperative languages.Functional languages are known for their ability to be reasoned about with respect to correctness, often with automated tools. 1-3 Given that real-time systems are frequently deployed in safety-critical and mission-critical situations, the ability to write software with a high degree of confidence in its correctness and predictability is important. Functional languages are well suited for the former task (correctness), but are not developed for the latter (predictability). Indeed, general purpose, functional programming languages are not used for developing real-time systems and there are no investigations to ensure their predictability. There are, however, many domain-specific functional languages that provide predictability for niche domains. The state of mainstream functional programming languages with respect to their ability to express and provide predictability is something we would like to investigate in this survey.One reason that functional languages are not considered for writing real-time software is because they are managed languages and automatic memory management has classically been considered unpredictable. While many may consider this a reason to reject functional programming as a target language for real-time systems development, we can instead look to managed object-oriented systems for inspiration. Indeed, the ques...