The requirements for the code quality of embedded systems are usually higher than in other software domains. Since lots of embedded systems work without supervision or control expensive industrial equipment, the cost of error is high. It becomes even higher in safety-critical systems where software or hardware failure may lead to injuries or even death. Software for such systems must follow specific guidelines that aim to minimize the chances of bugs not being found during the debugging and testing stages.
In this chapter, we'll explore some of the requirements and best practices for safety-critical systems through the following recipes:
- Using the return values of all functions
- Using static code analyzers
- Using preconditions and postconditions
- Exploring formal validation of code correctness
These recipes will help you understand...