News for hackers. Stuff that matters.
Re:Resources about programming practices for writing safety-... by Qworg on Monday March 06, 2017 @07:08PM (#13807276)
C/C++ is almost the only choice on most embedded systems, which is where most safety critical code lives.
Re:Resources about programming practices for writing safety-... by Qwertious on Monday March 06, 2017 @07:34PM (#13807396)
That doesn't make any sense - Pascal and Ada and whatnot that were around in the 1980s, which means the fundamental problem can't be performance on any modern embedded chip. Besides which, you don't trade away stability for performance on a safety-critical chip!
Re:Resources about programming practices for writing safety-... by Jtsummers on Monday March 06, 2017 @07:44PM (#13807441)
It's not a technical challenge, but a political/business one. C/C++ won out.

> you don't trade away stability for performance on a safety-critical chip!

In a sane world, no. But we don't live in a sane world. We live in one where (on one system I worked on) it turned out a plane having an overheat (not fire) on one engine would cause the overheat on the other to fail to report to the pilots (corrected or I'd name and shame). And that wasn't just an issue of language, but of sound (or unsound in this case) logic. No one sits down and develops these things correctly. 10k lines of code (at most) on that project and most of it was just cobbled together in an ad hoc fashion.

Re:Resources about programming practices for writing safety-... by throwaway729 on Monday March 06, 2017 @07:21PM (#13807330)
> embedded systems, which is where most safety critical code lives

For how much longer?

The machines running self-driving cars aren't tiny little processors running single threaded code. They're basically full server racks worth of compute with multi-core cpus, gpus, and who knows what else.

The current approach of "use crufty-but-trustworthy hardware and never do anything too complex" doesn't scale to the next generation of "embedded".

Re:Resources about programming practices for writing safety-... by Qworg on Monday March 06, 2017 @07:29PM (#13807375)
Self driving machine code is inherently unsafe, as we don't have observability for the neural networks that run the most advanced models. The safety critical portion of the code focuses around running the base functions of the car.

One of the major hurdles to real Level 5 systems is proving their correctness.

Re:Resources about programming practices for writing safety-... by throwaway729 on Monday March 06, 2017 @07:35PM (#13807402)
> The safety critical portion of the code focuses around running the base functions of the car.

There's the rub. They don't meet the standards of safety-critical code, but they are safety critical.

I'm not sure how this challenge will be addressed, but I doubt the answer is "write everything in C". That approach works when your code is relatively simple, but doesn't scale when the code is actually extremely complex.

Re:Resources about programming practices for writing safety-... by nerdponx on Monday March 06, 2017 @07:57PM (#13807507)
But the deep networks and such that power a self-driving car aren't written in C anyway. Or are they?
Re:Resources about programming practices for writing safety-... by Fricken on Monday March 06, 2017 @10:48PM (#13808121)
C++ skills are strongly desired by self driving car companies

https://hackernoon.com/five-skills-self-driving-companies-ne...

Re:Resources about programming practices for writing safety-... by throwaway729 on Tuesday March 07, 2017 @09:53PM (#13817479)
They are but that doesn't make them analyzable... Dealing with C craziness AND dnn craziness is silly. And the latter craziness is essential.
Re:Resources about programming practices for writing safety-... by blackflame7000 on Monday March 06, 2017 @08:53PM (#13807726)
They most likely are written in C/C++ because the training algorithms are computationally intensive.
Re:Resources about programming practices for writing safety-... by planteen on Tuesday March 07, 2017 @08:31AM (#13810114)
A team of PhDs using modern control theory can prove stability of an aerospace control loop across all different operating conditions.

A team of software engineers can then implement that with static analyzers and run time checkers during development to give confidence to an implementation.

Can you prove stability of a deep learning system across all possible operating conditions it may encounter?

Re:Resources about programming practices for writing safety-... by throwaway729 on Tuesday March 07, 2017 @09:13AM (#13810405)
Can you do the perception tasks that self driving platforms do using only control theory?
Re:Resources about programming practices for writing safety-... by planteen on Tuesday March 07, 2017 @01:50PM (#13813351)
I'm not talking about self driving at all. I took your earlier comment to mean that the you thought the future of avionics control and other classical embedded problems would be using DNNs. Maybe that's not what you meant.
Re:Resources about programming practices for writing safety-... by throwaway729 on Tuesday March 07, 2017 @09:51PM (#13817469)
No. That would be crazy. Well maybe not really as planes become more autonomous and airspace more crowded, delivery drones and so on, but we are still a long way from that.

I was thinking more of self driving though.

Re:Resources about programming practices for writing safety-... by pjmlp on Tuesday March 07, 2017 @07:49AM (#13809921)
There are options available, namely Basic, Pascal, Ada, Java, Oberon compilers all the way down to microcontrolers (PIC and Cortex classes).

The main problem is that C and C++ won the political war and many devs don't even bother to look elsewhere.

Actually even C++, in spite of its safety improvements over C, has issues to cater to embedded devs.

Thankfully the IoT of shame is already making people aware that another path has to be taken.

Re:Resources about programming practices for writing safety-... by kristianp on Tuesday March 07, 2017 @01:54AM (#13808755)
Interestingly there was a comment about an Oberon Embedded IDE today: https://news.ycombinator.com/item?id=13806367