Re: "RESET"

Liste des GroupesRevenir à e design 
Sujet : Re: "RESET"
De : blockedofcourse (at) *nospam* foo.invalid (Don Y)
Groupes : sci.electronics.design
Date : 27. May 2025, 22:13:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <10159t3$2q2ds$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 5/25/2025 12:33 PM, Joe Gwinn wrote:
Exactly.  I recall a customer wanting us to verify all possible paths
through a bit of air traffic control radar software, about 100,000
lines of plain C.  Roughly one in five executable line was an IF
statement, which is 20,000 IF statements.  So there are 2^20000 =
10^6020 such paths.
And probably 99.9% of them are superfluous.
if (x % 2) {
    x++
}
if (y == green) {
    // do something
}
if (z < 0) {
    // something else
}
The first conditional just deals with making "odd" values of x into even ones.
That can be completely tested regardless of which -- if any -- of the following
or preceding conditionals are invoked.  I.e., you don't need to test for
   x even, y green
   x odd, y green
   x even, y notgreen
   x odd, y notgreen
Rather, you verify the correct operation of the first conditional with
a range of even and odd values (more than two are required to address
the proper operation with negative numbers, "zero" and any other special cases
that your compiler might tickle.
Then, with x now guaranteed to be even, you can try y as green and notgreen.
Then, with z positive vs non-negative.
I.e., approximately two cases for each conditional so 3*2=6 cases instead
of geometric explosion (2^3=8)
Experience teaches you to construct your code so that testability is
enhanced.  Instead of waiting until it seems to be "done" and then
trying to reassure yourself that it works as intended -- usually by
throwing EXPECTED conditions at it and hoping for the expected
results (that's not testing).
You need 2^20000 if there are 2^20000 distinct outcomes (leaf nodes) in
your code.  I strongly doubt that to be the case.

The testing campaign will have only scratched the surface when the Sun
runs out of hydrogen and goes supernova.  Tomorrow's problem.
How do you test an electronic circuit?  Let's impose an infinite number of
discrete voltages on each of the input signals and verify the correct
outputs for each?  (Do you deliberately verify all ranges of signal values
and frequencies?  Or, just say "operation outside of these conditions is
indeterminate"?)

Date Sujet#  Auteur
24 May 25 * "RESET"42Don Y
24 May 25 +- Re: "RESET"1Don Y
25 May 25 +- Re: "RESET"1john larkin
25 May 25 +* Re: "RESET"26Carlos E. R.
25 May 25 i+* Re: "RESET"3Don Y
25 May 25 ii`* Re: "RESET"2Carlos E. R.
25 May 25 ii `- Re: "RESET"1Don Y
27 May 25 i+* Re: "RESET"20Don Y
28 May 25 ii`* Re: "RESET"19Joe Gwinn
28 May 25 ii +- Re: "RESET"1Don Y
28 May 25 ii `* Re: "RESET"17David Brown
28 May 25 ii  `* Re: "RESET"16Joe Gwinn
30 May 25 ii   `* Re: "RESET"15David Brown
30 May 25 ii    `* Re: "RESET"14Joe Gwinn
4 Jun 25 ii     `* Re: "RESET"13David Brown
4 Jun 25 ii      +* Re: "RESET"8Joe Gwinn
4 Jun 25 ii      i`* Re: "RESET"7David Brown
4 Jun 25 ii      i `* Re: "RESET"6Joe Gwinn
5 Jun 25 ii      i  +* Re: "RESET"2David Brown
5 Jun 25 ii      i  i`- Re: "RESET"1Carlos E.R.
5 Jun 25 ii      i  `* Re: "RESET"3Martin Brown
5 Jun 25 ii      i   +- Re: "RESET"1Joe Gwinn
5 Jun 25 ii      i   `- Re: "RESET"1Don Y
6 Jun 25 ii      +* Re: "RESET"3David Brown
6 Jun 25 ii      i`* Re: "RESET"2Carlos E.R.
10 Jun 25 ii      i `- Re: "RESET"1David Brown
6 Jun 25 ii      `- Re: "RESET"1john larkin
28 May 25 i`* Re: "RESET"2Martin Brown
28 May 25 i `- Re: "RESET"1Don Y
25 May 25 +* Re: "RESET"6Ralph Mowery
25 May 25 i+* Re: "RESET"3Don Y
25 May 25 ii`* Re: "RESET"2Carlos E. R.
25 May 25 ii `- Re: "RESET"1Don Y
25 May 25 i`* Re: "RESET"2Carlos E. R.
25 May 25 i `- Re: "RESET"1Don Y
25 May 25 +* Re: "RESET"2Ian
25 May 25 i`- Re: "RESET"1Don Y
25 May 25 +* Re: "RESET"2Theo
25 May 25 i`- Re: "RESET"1Don Y
25 May 25 `* Re: "RESET"3Martin Brown
25 May 25  +- Re: "RESET"1Don Y
25 May 25  `- Re: "RESET"1Carlos E. R.

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal