9

Today my lecturer mentioned the reason why the aircraft system is programmed in assembly language is due to the program being written have less error . Is this statement true ? Because when he asked about our opinion I said assembly can create faster program thus it is a good language for real-time oriented aircraft system program . I search around google but can't seem to find an article clarifying my lecturer's statement .

11
  • 24
    Either you misunderstood your lecturer or your lecturer is an idiot.
    – Paul R
    Oct 23, 2012 at 7:55
  • 3
    You do not want to write real-time critical-equipment control software in assembly. There are much better languages available for both real-time-software development and critical software development.
    – user
    Oct 23, 2012 at 8:08
  • 5
    Just wondering about your lecturer's age. Anyway, he might have only tried to point out, (kinda failing, apparently) that a number of modern languages, such as java, are off-limits (java has this spelled out in it's accompanying license, btw) for aircraft-related mission-critical applications.
    – ZJR
    Oct 23, 2012 at 8:43
  • 1
    @ZJR: Actually, AFAIK, a German UAV manufacturer uses Java for the flight control system. Maybe they bought a different license? Oct 23, 2012 at 11:56
  • 1
    @JörgWMittag: a UAV might be able to kill people by other methods, but the 'U' means a failure of flight control means it isn't immediately jeopardizing human life. The Java license says it isn't suitable for mission-critical systems, but that doesn't prevent anyone from making that choice.
    – DaveE
    Oct 23, 2012 at 17:59

2 Answers 2

29

Your lecturer's statement is provably false. The Joint Strike Fighter's control code is written in C++. The 777 from Boeing uses 99%+ ADA. The JPL uses mostly C to drive spaceships.

I'm sure there are more examples but I suspect many are proprietary or classified.

Here is a paper that goes into some detail on the subject of testing avionics software on a more general level.

3
  • Some NASA projects also used a Lisp dialect in the past. A German UAV manufacturer even uses Java. Oct 23, 2012 at 11:55
  • The B2 bomber's was recently rewritten in C. Source: tech.slashdot.org/story/08/07/14/1934228/…
    – user16764
    Oct 23, 2012 at 14:15
  • Back in the Dark Ages (early 1980s), F-16A/B used assembly language for the Stores Management Set and JOVIAL J3B for the Firecontrol Computer. F-16C/D used JOVIAL J73 for everything for the first few blocks, and I believe they switched over to Ada in later years. I don't know what they're using today. Oct 23, 2012 at 16:51
5

I work on OBOGS, which is a component that gets plugged into various aircraft. We typically use C for the devices that fly, but looking through the historical files, there are a couple of assembly projects in there.

It's fashion, honestly. Languages rise and fall. The reasons people use one or the other vary all over the place and are mostly subjective. I find it completely plausible that someone at some point argued that assembly was the right choice for some project somewhere entirely because it would have less errors than in any other language. And he was probably right, but that's because the guy didn't know how to code in C worth a damn. By and far the best language for the job is the one you know. (And the best language for your personal growth is one you don't.)

You can objectively say that assembly is closer to the hardware, less abstracted, more direct, with more instructions to the same thing in other languages. You can even say that it's in the realm of possibility that assembly can be written to cut out overhead and be smoking fast. If you know what you're doing. But as for error-prone-ness, speed of development, readability, and the ability to cure cancer? All that depends on the ability of the programmer and what they've worked in for the last 20 years. Measurements of which projects with which language have X amount of bugs are subject to sociological factors, largely making them worthless metrics. No, it's all just so much fashion.

It's good to know what your code boils down to, so I'm going to say that it's important to learn assembly. If only a little. But I wouldn't write any avionics in it.

1
  • 1
    I the end, writing assembly means less machine code overall if you know what you're doing, and you know pretty much exactly what the resulting machine code will look like; you don't have to trust a compiler to get it right for you.
    – Hawken
    Jan 6, 2013 at 2:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.