News for hackers. Stuff that matters.
Re:Formal methods: Just good engineering practice? by xigoi on Monday June 24, 2024 @05:09AM (#40773875)
Tests are not a proof. Just like you can’t prove a mathematical statement by checking it for a million random numbers.
Re:Formal methods: Just good engineering practice? by lucumo on Monday June 24, 2024 @05:46AM (#40774081)
Tests are a basis for every engineering discipline. In software we have the luxury of being able to test each delivered project. Other engineered projects often only have their components tested, and then need to rely on calculations to determine the end result.

Tests proof that something can handle the exact scenario that we're testing. The forces on a software system are just different and in some ways less predictable than for e.g. a building. But in software the consequences of failure are often less catastrophic[1] and it's a lot cheaper to run a battery of tests.

[1] And if they are not less catastrophic than a collapsing building, you'd better test it far more extensively than an average system. That's engineering too, making a trade-off between the costs of failure and the cost of preventing failure.

Re:Formal methods: Just good engineering practice? by high_na_euv on Monday June 24, 2024 @06:45AM (#40774423)
Incorrect.

Proof by exhaustion, also known as proof by cases, proof by case analysis, complete induction or the brute force method, is a method of mathematical proof in which the statement to be proved is split into a finite number of cases or sets of equivalent cases, and where each type of case is checked to see if the proposition in question holds.

Re:Formal methods: Just good engineering practice? by xigoi on Monday June 24, 2024 @06:47AM (#40774440)
I know. Tests are not the same thing – usually they check only a subset of all possible cases.
Re:Formal methods: Just good engineering practice? by high_na_euv on Monday June 24, 2024 @06:48AM (#40774454)
Because usually people do not write critical/important software :)
Re:Formal methods: Just good engineering practice? by xigoi on Monday June 24, 2024 @06:52AM (#40774481)
That’s irrelevant. I was just responding to a comment saying that tests are a proof.
Re:Formal methods: Just good engineering practice? by high_na_euv on Monday June 24, 2024 @08:14AM (#40775105)
And they definitely can be