What language are airplanes written in...

what language are airplanes written in? how can we be sure they wont crash if software can never be proven to be correct ?

Attached: th-3782803198.jpg (474x438, 23.57K)

Other urls found in this thread:

archive.adaic.com/projects/atwork/boeing.html
en.wikipedia.org/wiki/SPARK_(programming_language)
twitter.com/SFWRedditVideos

Probably ASM or C

>what language are airplanes written in?
Probably assembly, Ada and C/C++.

Fortran back in the day. Now C++, Ada, C, SPARK and sometimes assembly.

archive.adaic.com/projects/atwork/boeing.html

en.wikipedia.org/wiki/SPARK_(programming_language)

Attached: 777-head.gif (391x104, 3.17K)

They have something like 3 CPUs running in parallel for redundancy, if one of the CPUs give a wrong output it's ignored

>what language are airplanes written in?
A lot of it's Ada.
>how can we be sure they wont crash if software can never be proven to be correct?
We can't, and they sometimes do crash. Despite this, they are still the safest method of transportation per passenger mile due to having a multitude of redundant systems for keeping the plane safe. Every time a plane crashes, an incident report is generated and they figure out what regulations need to be made to prevent that mistake from happening again.

Also they have multiple computers that have to agree with each other.
But that's not to say this hasn't already happened cand caused a crash

Attached: drug_meido.jpg (384x384, 36.39K)

This.
Being a commercial airplane pilot versus driving with randos on the road with vehicles they have maintained or lack there of.

Attached: desktop.jpg (1920x1080, 330.19K)

why ada instead of c/c++?

C, C++ and ADA

If they have a program that can tell what the correct output for every input is, why not just use that program instead

C and C++ are languages that are very fast, and give you a lot of low level access, but they offer little in the way of safety. Ada was designed with safety in mind, and has a very powerful type system that can enforce contracts with the programmer. Part of that type system includes subtyping. So, for instance, you can define a type that can store integers between 1 and 7, and nothing else. If you try to assign a 0 to a variable of such type, you'll get a compiler error. If you somehow try to perform an operation at runtime that would result in a different value, you'll get an exception.

Ada also avoids a lot of very dumb mistakes from C. For instance, in C, the = operator is used for assignment, but if you use it for comparison, you will not get a compiler error, because it will evaluate to whatever was assigned. In Ada, you have := for the assignment operator, and = for the comparison operator, and never can the two be mixed.

CSS, HTML, JavaScript
this plane is going down

I literally cant tell the difference between bait and genuine ignorance anymore

user... The correct output is the output that is given by the majority

Having the incorrect output is based on the fact that it differs from the other 3 CPUs. Think about this: you're 30k feet up in the air, and cosmic bit flips can fuck you. If you have 4 copies of the program running, and one of them starts behaving differently, something went wrong with that machine physically, and it needs to be disregarded.

Ada has a very anal type system, has tools to verify the compiler's output to ensure its correctness, can freeze verified modules and can do a lot without using dynamic memory allocation. C and C++ depend on dynamic memory allocation which means more points of failure. At least, that's what I read years ago.

Ada, the original rust

>how can we be sure they wont crash if software can never be proven to be correct ?
Ada Spark CAN be proven to be correct

What if they have 3 different outputs, or if the majority have the wrong output?

>let the computer "prove" itself correct
>"oh yes sirs this code is infallible'
>crashes plane
>no survivors

Attached: dark-troll-face.gif (640x600, 417.77K)

If you have three different outputs, your computers are unreliable.