News for hackers. Stuff that matters.
Re:Resources about programming practices for writing safety-... by throwme_1980 on Monday March 06, 2017 @06:51PM (#13807175)
c++ is not considered safe for any RTOS system, in fact you won't find it used in Aviation embedded devices (referring to the big 3 ) Tools yes, you can higher level languages to your heart's content.
Re:Resources about programming practices for writing safety-... by vonmoltke on Monday March 06, 2017 @07:55PM (#13807498)
Huh? The F-22A, F-35, P-8, and P-3 are all flying C++ code. Those are just the programs I have personally touched (not necessarily the code, though). Where did you get the idea that it "is not considered safe for any [real-time] system"?
Re:Resources about programming practices for writing safety-... by jordanb on Tuesday March 07, 2017 @02:06AM (#13808786)
The F-22 avionics are mostly Ada. F-35 is mostly C++ though. If you want a good face-palm go read up on the "decision-makers" advocating making the switch. I saw a quote by a general blaming the F-22's cost overruns on the "Ada Operating System".

But don't worry, C++ is a "COTS Industry Standard" so you can bet there were no overruns on the F-35. /s

Re:Resources about programming practices for writing safety-... by vonmoltke on Tuesday March 07, 2017 @09:27AM (#13810509)
> The F-22 avionics are mostly Ada.

Yes, including the piece I directly touched. It was deemed to minor to be worth the cost of rewriting.. Hell, when I left the program we still had an arthritic VAX to build on, should we ever need to rebuild the code.

As for your last line, see my comment elsewhere about blaming the carpenters instead of the tools. :-)

Re:Resources about programming practices for writing safety-... by pjmlp on Tuesday March 07, 2017 @07:59AM (#13809960)
The cost of the F-35 program shows how good that decision has been.
Re:Resources about programming practices for writing safety-... by unboxed_type on Tuesday March 07, 2017 @02:21AM (#13808826)
As far as I understand all vehicles you mentioned are not subject to DO-178 regulation. If they were then C++ code would have been much less likely be used. It is because C++ code is much more difficult to prove correct either using 100% test case coverege (DO-178B) or thru formal methods (DO-178C). Please correct me if I am wrong, I am doing a research on a similar topic.
Re:Resources about programming practices for writing safety-... by planteen on Tuesday March 07, 2017 @08:36AM (#13810148)
The F-35 (JSF) is DO-178B. The RTOS itself (INTEGRITY) is mostly C and C++.

http://www.militaryaerospace.com/articles/2013/10/software-c...

Re:Resources about programming practices for writing safety-... by unboxed_type on Tuesday March 07, 2017 @09:56AM (#13810737)
Well the article says that F-35 runs operating system compliant with DO-178B, right. But it does not say that control logic software (applied software) was a subject to DO-178B certifcation. Anyone can buy a license for DO-178B RTOS, it is not very expensive actually. But to certify your own control avionics algorithms is a whole different story. Agree?
Re:Resources about programming practices for writing safety-... by planteen on Tuesday March 07, 2017 @01:57PM (#13813418)
I agree development of the avionics is different from the RTOS. But what makes you say that the avionics algorithms aren't DO-178B? That is something the customer (gov't) would specify to the contractor. I didn't ever work on the JSF avionics code to know the development process. Did you? A lack of press releases about it does not mean it is not DO-178B compliant.

Reading the JSF coding standard, it sounds like all libraries must be DO-178B: "All libraries used must be DO-178B level A certifiable or written in house and developed using the same software development processes required for all other safety-critical software. This includes both the run-time library functions as well as the C/C++ standard library functions. [10,11] Note that we expect certifiable versions of the C++ standard libraries to be available at some point in the future. These certifiable libraries would be allowed under this rule. "

Re:Resources about programming practices for writing safety-... by unboxed_type on Wednesday March 08, 2017 @06:49AM (#13819631)
Good point. As far as I know there are no DO-178B complient C++ libraries available yet (STL, for example). If you know any please point out. My reasoning is as follows: While civil avionics must comply with regulatory safety standards, military avionics is not. So economically speaking there is a little sense for them to do such costly certification just to ensure quality.
Re:Resources about programming practices for writing safety-... by throwme_1980 on Tuesday March 07, 2017 @09:42AM (#13810637)
i can go on all day about this, but this comment has summarised it nicely, you have to understand that to be compliant with DO-178b/c you need to do an un-godly amount of v&v and other things that literally cost millions $ per quarter in a span of a single project, c is much easier to prove right and can easily achieve a good test coverage, c++ on the otherhand is considered a "high level language" and is used for instrument panels and such things, down the stack however you will see people using much more conservative languages.
Re:Resources about programming practices for writing safety-... by planteen on Tuesday March 07, 2017 @08:37AM (#13810167)
What? The most popular choice for aircraft RTOS seems to be INTEGRITY which is written C/C++ itself.

http://www.militaryaerospace.com/articles/2013/10/software-c...