News for hackers. Stuff that matters.
Re:How the Boeing 737 Max disaster looks to a software Devel... by crimsonalucard on Thursday April 18, 2019 @04:48PM (#19694639)
No, we can literally prove it correct based off of a specification.

https://en.wikipedia.org/wiki/Correctness_(computer_science)

In science nothing can be proven but in the world of logics and math, things can be proven. Bugs can arise where programs intersect in the real world.

Re:How the Boeing 737 Max disaster looks to a software Devel... by tluyben2 on Thursday April 18, 2019 @04:56PM (#19694686)
If the spec is complex you are probably proving the bugs in the spec are indeed correctly implemented...

Edit: that said, spending the formal spec time will probably reduce the number of bugs far below than what we find normal now. But money...

Re:How the Boeing 737 Max disaster looks to a software Devel... by softwaredoug on Thursday April 18, 2019 @04:52PM (#19694665)
Yeah and then the specification at that level of specificity IS the code. How do you prove the specification is bug free?
Re:How the Boeing 737 Max disaster looks to a software Devel... by crimsonalucard on Thursday April 18, 2019 @04:57PM (#19694705)
Define what is a bug in a spec? I defined the program to do one thing and one thing only. What does does it mean when I have a bug in my definition? There's a definition for the definition? Makes no sense.
Re:How the Boeing 737 Max disaster looks to a software Devel... by throwaway2048 on Thursday April 18, 2019 @05:12PM (#19694823)
You can argue that no code ever has bugs by that logic, after all you defined the program to do one thing, and it did it, it was merely human expectation that was in error.
Re:How the Boeing 737 Max disaster looks to a software Devel... by crimsonalucard on Thursday April 18, 2019 @11:49PM (#19696956)
That's what I'm arguing. Code can be proven correct against a formal spec.

However, because we don't do proofs in software, there are bugs.

Re:How the Boeing 737 Max disaster looks to a software Devel... by throwaway2048 on Thursday April 18, 2019 @11:52PM (#19696971)
Code is itself a specification.
Re:How the Boeing 737 Max disaster looks to a software Devel... by crimsonalucard on Friday April 19, 2019 @02:56AM (#19697609)
It can be, but generally it is not.
Re:How the Boeing 737 Max disaster looks to a software Devel... by aassddffasdf on Thursday April 18, 2019 @05:05PM (#19694769)
It means that the one thing you defined it to do was not the right thing.
Re:How the Boeing 737 Max disaster looks to a software Devel... by AnimalMuppet on Thursday April 18, 2019 @06:29PM (#19695360)
> Bugs can arise where programs intersect in the real world.

Well, the context is flight control software for airplanes. If that code is bug-free but doesn't intersect the real world, that's rather useless. And if it intersects the real world but therefore is not bug-free, that's not a great argument for proofs of formal correctness.

But all of that is kind of beside the point. The MCAS specification was the wrong thing. Proving the implementation correct is useless. (You asked what is a bug in a spec? MCAS shows you the answer. Only taking input from one sensor is the wrong thing. Repeatedly applying nose-down is the wrong thing. It seems like I'm missing one or two more.)

Re:How the Boeing 737 Max disaster looks to a software Devel... by crimsonalucard on Friday April 19, 2019 @12:12AM (#19697044)
You can prove the code correct against the spec. However you can't prove that the spec will do what you expect it to do because the spec is where the intersection with the real world occurs. Therefore, you must test the spec. Everything that falls under the spec can be formally verified to 100% correctness.