←back to thread

327 points AareyBaba | 4 comments | | HN request time: 0s | source
Show context
barfoure ◴[] No.46183842[source]
Do avionics in general subscribe to MISRA C/C++ or do they go even further with an additional (or different) approach?
replies(3): >>46183870 #>>46184021 #>>46184148 #
stackghost ◴[] No.46184148[source]
Depends on the company in my experience. I've seen some suppliers that basically just wire up the diagram in Matlab/simulink and hit Autocode. No humans actually touch the C that comes out.

Honestly I think that's probably the correct way to write high reliability code.

replies(2): >>46184199 #>>46192932 #
garyfirestorm ◴[] No.46184199[source]
You’re joking right? That autogenerated code is generally garbage and spaghetti code. It was probably the reason for Toyotas unintended acceleration glitch.
replies(6): >>46184323 #>>46184469 #>>46184508 #>>46184621 #>>46185898 #>>46186758 #
1. AnimalMuppet ◴[] No.46184469[source]
> It was probably the reason for Toyotas unintended acceleration glitch.

Do you have any evidence for "probably"?

replies(1): >>46184872 #
2. garyfirestorm ◴[] No.46184872[source]
I know for the fact simulink generates spaghetti and spaghetti code was partially blamed for Toyotas problems. Hence the inference

See https://www.safetyresearch.net/toyota-unintended-acceleratio...

replies(2): >>46185569 #>>46185954 #
3. CamouflagedKiwi ◴[] No.46185569[source]
That's a nonsensical connection. "Spaghetti code" is a very general term, that's nowhere near specific enough for the two to be related.

"I know for a fact that Italian cooks generate spaghetti, and the deceased's last meal contained spaghetti, therefore an Italian chef must have poisoned him"

4. stackghost ◴[] No.46185954[source]
SRS is a for-profit corporation whose income comes from lawsuits, so their reports/investigations are tainted by their financial incentive to overstate the significance of their findings.