Thanks for posting! The existing answer had almost no detail, so I wrote another: http://programmers.stackexchange.com/a/159687/61021
You dug up a great talk, but I could not find the PDF. There's no link, and the expected file FSW10_Cichy.pdf is not present with all the other PDFs in the download directory. The author, Ben Cichy, was the guy in Flight Control during the landing last night, sitting behind the position marked "Flight Software". So he's definitely a good source for the background ;-)
What is the Mars Curiosity Rover's software built in?
21–29 of 29 posts
Re: What is the Mars Curiosity Rover's software built in?
#22So much programming language research in the past 40 years, but C is, no doubt, still king.
Re: What is the Mars Curiosity Rover's software built in?
#23Earlier quoted context omitted.
They make models of the software before writing any code, and a lot of the code can be generated from the models . There's a guarantee that if the model is correct so is the code. Or, you don't have to check that your hand-written C actually matches the system you were building.
What do you mean by model?
To model individual processes, one could use automata, for interaction of processes there are process calculi.
Re: What is the Mars Curiosity Rover's software built in?
#24I believe the confusion between '500,000 lines' in the question vs '2.5 million/3.5 million' in the answers is the context. The 500,000 number is involved in the entry, descent, and landing (EDL) process specifically, and the rover systems are millions overall. Not sure why the values are 1m different, but the 2.5m citation is what is in the linked PDF.
Guess on 1 million difference: 2.5m citation is dated 2009, 3.5m citation is dated 2010.
As the one who posted the larger figure, I'd say it's more reliable because it comes from the man who sat at the Flight Control station in the control center :D
Re: What is the Mars Curiosity Rover's software built in?
#25Not sure what means that most of the C code is auto generated. From what?
Simulink is a possibility. It's a MATLAB component popular among mechanical engineers, and therefore most navigation & control engineers, and allows them to 'code' and simulate things without thinking they're coding.
Model-based programming is definitely a thing that the industry is slowly becoming aware of, but I don't know how well it's catching on at JPL or if they would have chosen to use it when the project started.
The third and most likely possibility is for the communication code. With all space systems, you need to send commands to the flight software from the ground software, and receive telemetry from the flight software and process it with the ground software. Each command/telemetry packet is a heterogeneous data structure, and is is necessary that both sides are working from the exact same packet definition, and format the packet so it is correctly formatted on the one side, and parsed on the other side. This involves getting a whole lot of things right, including data type, size, and endianness (although the latter is usually a global thing, you could have multiple processors onboard with different endianness).
But that's just the surface. You need lots of repetitive code on both sides to handle things like logging, command/telemetry validation, limit checking, and error handling. And then you can do more sophisticated things. Say you have a command to set a hardware register value, and that value is sent back in telemetry in a particular packet. You could generate ground software that monitors that telemetry point to ensure that when this register value is set, eventually the telemetry changes to reflect the change. And of course, some telemetry points are more important than others (e.g. main bus current), and are designated to come down in multiple packets, which involves extra copying on the flight side and data de-duplication on the ground side.
With all that, it's much easier (in my opinion) to write one collection of static text files (in XML, csv, or some DSL/what-have-you), run them through a perl/python script, and presto! Code!
Re: What is the Mars Curiosity Rover's software built in?
#26Earlier quoted context omitted.
They make models of the software before writing any code, and a lot of the code can be generated from the models . There's a guarantee that if the model is correct so is the code. Or, you don't have to check that your hand-written C actually matches the system you were building.
What do you mean by model?
http://compcert.inria.fr/compcert-C.html
http://www.cs.utah.edu/~regehr/papers/
http://lambda-the-ultimate.org/node/4571
-------------
The "Related Work" section in this UVa dissert probably most closely answere your question
http://www.cs.virginia.edu/~jck/publications/Xiang.Yin.disse...
Re: What is the Mars Curiosity Rover's software built in?
#27Thanks for posting! The existing answer had almost no detail, so I wrote another: http://programmers.stackexchange.com/a/159687/61021
You dug up a great talk, but I could not find the PDF. There's no link, and the expected file FSW10_Cichy.pdf is not present with all the other PDFs in the download directory. The author, Ben Cichy, was the guy in Flight Control during the landing last night, sitting behind the position marked "Flight Software". So he's definitely a good source for the background ;-)