I'm coming down on the side of the cause of these accidents was due to the failure to properly type certify the aircraft. Because they were trying to avoid that they failed to do the system analysis and testing including simulator testing that would have easily found this.
It's not about software verification. In this case, the verifier would have given it a pass (with respect to this particular accident).
It's about bad management/bad requirements:
- "minimization of pilot training is the overarching requirement"
- "it's okay to feed only a single sensor into MCAS, even though there are two of them on the plane"
- "it's okay to sell critical safety equipment as options costing extra"
- "it's okay to not tell any pilot about any of this, since we practically didn't change anything".
This particular one is not about C++.