The F-35 fighter jet uses a special version of C++ that prohibits exception handling and recursive functions.

by
The F-35 fighter jets operated by the U.S. Air Force and the Japan Air Self-Defense Force are equipped with software coded in C++. This C++ code is written in accordance with a coding standard called the Joint Strike Fighter Air Vehicle C++ Coding Standards (JSF AV C++) . Google researcher Laurie Wired (Laurie Kirk) , who is also an expert in aircraft programming, explains the features of JSF AV C++.
Why Fighter Jets Ban 90% of C++ Features - YouTube
In June 1996, the European Space Agency launched the Ariane 5 rocket for the first time. However, the rocket exploded several tens of seconds after liftoff, resulting in a launch failure. The failure was believed to be caused by an unhandled exception in the rocket's software.

Like rockets, fighter jets also contain software containing complex code, and the number of lines of code increases exponentially with each generation of fighter jet. The F-35 contains nearly 10 million lines of code, so it was important to create a system for highly secure coding.

Fighter aircraft developed before the F-35 used a programming language called '

The contents of JSF AV C++ are publicly available and are also available on the personal website of Bjarne Stroustrup, the creator of C++.
JOINT STRIKE FIGHTER AIR VEHICLE C++ CODING STANDARDS FOR THE SYSTEM DEVELOPMENT AND DEMONSTRATION PROGRAM
(PDF file) https://www.stroustrup.com/JSF-AV-rules.pdf

JSF AV C++ includes features that restrict C++ functionality such as 'exception handling,' 'recursive functions,' and 'dynamic memory allocation.'

Stroustrup's official website has

LaurieWired explains the effectiveness of JSF AV C++ using the flight simulator '

If the code did not comply with JSF AV C++, the system would become inoperable when an exception occurred. If the code complies with JSF AV C++, an error code is returned and the system can proceed to the next process even if an exception occurs.

The ideas behind JSF AV C++ have been passed down to later projects, and NASA has established an ecosystem called '

Additionally, in the automotive industry, a standards development organization called

However, JSF AV C++ is an outdated rule at the time of writing, so it is important to refer to the latest

The source code for the multi-function information display developed by LaurieWired is available at the following link, where you can compare
GitHub - LaurieWired/XplaneFlightData: Xplane Demo for JSF C++ Standard
https://github.com/LaurieWired/XplaneFlightData

The video also explains the differences by showing examples of JSF AV C++ compliant and non-compliant code.

Related Posts:







