Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Embedded

Reducing cost and size: The software angle

Posted: 25 Apr 2012 ?? ?Print Version ?Bookmark and Share

Keywords:DO-178C? Spark language? run-time libraries?

Minimizing cost and size for embedded hardware involves issues with circuit design, fabrication and similar topics. Software, however, raises a different set of concerns. Though development costs need to be taken into account, a much more significant expense comes from software errors, which can lead to delays, product recalls, possible lawsuits and damage to a company's reputation.

A key to cost reduction is to prevent errors from getting into the code in the first place or, if that fails, to detect and remove the errors before the software gets fielded. The size issue is a bit subtler. Some of the features that have been introduced into programming languages in the interest of reliabilityfor example, exception handling and high-level concurrency supportrequire run-time libraries that might be too large for certain kinds of embedded systems.

Developers need some way to tailor the run-time libraries to remove unneeded functionalityin effect to scale the size of the executable code based on the language features actually used. A new approach that couples a reliable language with customizable and specialized run-time libraries can reduce both cost and footprint size for embedded systems.

For several reasons, buggy software is especially acute in embedded applications. First, an embedded system typically monitors or controls some external device, so in critical applications an error or vulnerability could compromise safety, security or both; lives could be lost, and substantial assets could be at risk.

Second, debugging embedded software is harder than debugging native software. For example, embedded systems generally involve concurrency and real-time constraints, which introduce opportunities for errors such as deadlock, missed deadlines and corrupted data. Because some of these bugs are timing dependent and not easily reproduced, they could go undetected until the software is fielded. With perhaps thousands or even millions of systems in use, even a bug with low probability of being triggered will occur eventually.

Third, correcting a defect in an embedded product already in service is complex and expensive. Solutions that involve wireless uploads raise serious security issues that are just beginning to be addressed in equipment ranging from medical devices to automotive systems.

Testing can catch some errors. For example, RTCA Inc. commercial-avionics software safety standard DO-178C [1] specifies extensive tests to demonstrate that software meets all requirements and that these tests fully cover the source-code structure. Though testing is an ongoing process for real-world systems, use of programming language and tool technologies that automate error detection can bolster confidence in code correctness as well as demonstrate the code's safety and security properties.

Ideally, the language can express the program's intent so that automated error detection takes place at compile time. If that isn't possible, then automated error detection can occur at run-time with a well-defined effect.

This idea isn't new; features such as strong type checking have been in some languages for decades. What is new, or at least becoming more widely adopted, is the ability to specify stronger program properties, or contracts, that can either be proved through formal methods or checked at run-time.

The Spark language [2] illustrates the first approach. Spark is an Ada subset augmented with contracts that specify intermodule data and information flow and that capture logical assertions concerning program state (subprogram pre- and postconditions, invariants). The Spark tools check that the source program conforms to its annotations and can automate the process of proving that the contracts are correct. Spark has been used in practice to demonstrate correctness properties (for example, the absence of run-time exceptions) on a range of safety-critical and high-security systems.

1???2???3?Next Page?Last Page

Article Comments - Reducing cost and size: The software...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top