Practical Statecharts in C/C++: Quantum Programming for Embedded Systems

The worst buildings are those, whose budget was too great for the purposes to be served.
Frederick P. Brooks, Jr.
An active object based framework, such as the Quantum Framework (QF), sits at the focus of many conflicting forces that the framework must ultimately resolve in the applications' interest. The stakes are high because the applications are so dependent on the framework that any wrong decision in its design or implementation could render the framework inadequate for whole classes of applications. Perhaps nowhere is this more true than in the embedded real-time [1] domain. For example, many embedded systems are extremely cost sensitive, so the framework must be efficient in both memory and CPU utilization. Moreover, real-time systems are particularly intolerant to any form of nondeterminism because it can cause the systems to miss deadlines and fail.
To be effective, the framework must take carefully into account the realities of the application domain it serves. But what exactly are these realities? The embedded software domain is so diverse and fragmented that it is necessary first to define the subset of embedded real-time systems that the QF addresses. Furthermore, it is important to investigate how embedded real-time systems differ from other computer systems because, only then, will you understand the motivation for such important QF policies as error and exception handling, memory management, concurrency handling, event passing, initialization, cleanup, and time management.
Although the focus of this chapter is on the design of the framework, you will also find...