5 ms·
The motivation for writing the software in C is this: Code Reuse. NASA and it's associated labs have produced some rock solid software in C. In space missions
by vbtemp 14y ago
The motivation for writing the software in C is this: Code Reuse. NASA and it's associated labs have produced some rock solid software in C. In space missions commonly the RAD750 is used (with it's non-hardened version, the MCP), along with the Leon family of processors. Test beds and other ground hardware are often little-endian Intel processors. VxWorks is commonly used on many missions and ground systems, but so is QNX, Linux, RTEMS, etc... The only common thing the diverse set of hardware, operating systems, and compiler tool chains all support is ANSI C. This means that nifty languages like Erlang or whatever - though there may be a solid case for using them - is not practical in this circumstance.
I know some clever folks in the business have done interesting work on ML-to-C compilers, but it's still in the early R&D phase at this point - the compiler itself would have to be thoroughly vetted.
- jensnockert 14y agoI didn't read it as arguing against C, just noting that there seems to be a lot of commonality between the ways the code in the Mars rovers are designed, and the way that robust Erlang applications are typically designed.
- jlouis 14y agoPrecisely. One thing very must against using Erlang for this problem is that you need hard real-time behaviour. Erlang does not provide that. The other point, you need static allocation almost everywhere, is also detrimental to using Erlang for the Rovers. That leaves you with very few languages you can use, and C is a good predictable one for the problem. Its tool support is also quite good with static verification etc. And it is a good target for compilation. As someone else notes, most of those 2.5 Megalines are auto-generated.
- angrycoder 14y agoreading the article is awesome.
- _delirium 14y agoSince much of those 2.5-MLOC are auto-generated, wouldn't it be accurate to say that they did use a something-to-C compiler, only instead of, say, ML-to-C, it was their own in-house something-to-C compiler? And that 'something' seems to have borrowed a number of features from Erlang.
- vbtemp 14y agoBut a compiler in the sense of translating a higher level language down into C? Or from something isomorphic to C, essentially plugging in values into a boilerplate template? The latter is far more likely
- dllthomas 14y agoIf you don't read the article, at least read the tl;dr: "TL;DR - Some of the traits of the Curiosity Rovers software closely resembles the architecture of Erlang. Are these traits basic for writing robust software?"