Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Mars code
Holzmann G. Communications of the ACM57 (2):64-73,2014.Type:Article
Date Reviewed: May 14 2014

Despite a few spectacular failures, NASA is one of the top organizations worldwide in systems and software engineering. The Mars rover Opportunity recently celebrated 10 years of operation on Mars, and the newer Curiosity has been operating since August 2012, after a landing maneuver of unprecedented complexity. This is quite a feat, considering the fact that the nearest repair technician is over 30 million miles away, and the communications delay is about 15 minutes on average. How do they do it?

This article gives a rare glimpse into the process used in programming the Mars rovers. It focuses on three methods used to reduce the risk of failure. An important feature of all three methods is the use of automation. The first consists of a set of risk-related coding rules, based on actual risks observed in previous missions. For example, one rule requires the code to pass compilation and static analyzer checks without any warnings. Another requires the code to have a minimum assertion density of two percent. The assertions are enabled not only for testing, but also during the mission, when violations place the rover into a safe mode, during which failures can be diagnosed and fixed. All of the rules are checked automatically when the code is compiled.

The second method consists of tool-based code review. Four different static-analysis tools are used, with an automated system to manage the interaction between developers and reviewers in response to tool warnings. In over 80 percent of the cases, developers agreed with the warnings and fixed the code without reviewer intervention. An interesting observation Holzmann makes is that there was surprisingly little overlap between the warnings issued by the four tools.

The third and strongest method is the use of a model-checking tool for race conditions, one of the most difficult types of bugs to discover. This cannot be done for the whole code base, but was used extensively in the Curiosity mission to verify critical multithreaded algorithms. In some cases, the tool works directly from the C source code. For larger subsystems, input models have to be prepared manually in the language of the model checker; this can reduce the input size by over one order of magnitude.

The challenges faced by NASA are obviously unique, and are very different from those involved in cloud-based mobile applications, to use a popular example. There are many papers and books describing methodologies for developing such systems. However, developing safety-critical systems for cars and aircraft, medical devices, and power grids, or financial systems that must be resilient to faults and deliberate attacks, requires reliability levels similar to those of NASA. For developers of such systems, articles such as Holzmann’s should be required reading.

Reviewer:  Yishai Feldman Review #: CR142280 (1408-0651)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
General (D.1.0 )
 
 
General (C.2.0 )
 
 
General (D.2.0 )
 
 
Robotics (I.2.9 )
 
 
Coding And Information Theory (E.4 )
 
 
General (B.0 )
 
  more  
Would you recommend this review?
yes
no
Other reviews under "General": Date
Problems in programming
Vitek A., Tvrdy I., Reinhardt R., Mohar B. (ed), Martinec M., Dolenc T., Batagelj V. (ed), John Wiley & Sons, Inc., New York, NY, 1991. Type: Book (9780471930174)
Aug 1 1992
KNOs: KNowledge acquisition, dissemination, and manipulation Objects
Tsichritzis D., Fiume E., Gibbs S., Nierstrasz O. ACM Transactions on Information Systems 5(1): 96-112, 1987. Type: Article
Nov 1 1987
Programmer perceptions of productivity and programming tools
Hanson S. (ed), Rosinski R. Communications of the ACM 28(2): 180-189, 1985. Type: Article
Jul 1 1985
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy