Re: How to develop a random number generation device
- From: MooseFET <kensmith@xxxxxxxxx>
- Date: Wed, 19 Sep 2007 18:49:42 -0700
On Sep 19, 2:03 pm, Rich Grise <r...@xxxxxxxxxxx> wrote:
Static analysis tools can only find some bugs. Some code has to be
stepped through to see if it ever gets stuck or goes into a loop. I'm
thinking of things like:
while (X > 1) do
if (X is even) X = X/2;
else X = 3 * X + 1;
It is really hard to see whether for some values of X this sticks in a
loop or not.
It didn't take me any time at all to see that this has no bounds checking;
what happens if someone passes X=1.42857 to it?
X is an integer. Most other readers understood what I meant by the
comment.
This little example-oid was clearly written by one of those lame
programmer-wannabees who keeps sniveling "All Software Has Bugs And
There's Nothing You Can Do About It!!!" as an excuse for his
incompetence/laziness.
No, it is an example of a proof that you can't check your code by
running it through a compiler, or static checker, no matter how clever
that code may be unless you are willing to have the compiler take
weeks to compile. Problems of this sort require either a new method
be found or that all cases be explored.
Cheers!
Rich
.
- References:
- Re: How to develop a random number generation device
- From: Nobody
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: David Brown
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: David Brown
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: David Brown
- Re: How to develop a random number generation device
- From: John Larkin
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: Martin Brown
- Re: How to develop a random number generation device
- From: MooseFET
- Re: How to develop a random number generation device
- From: Martin Brown
- Re: How to develop a random number generation device
- From: Rich Grise
- Re: How to develop a random number generation device
- Prev by Date: Re: Water Cooled Power Resistor Gets Rusty
- Next by Date: Re: I just plonked Andy
- Previous by thread: Re: How to develop a random number generation device
- Next by thread: Re: How to develop a random number generation device
- Index(es):
Relevant Pages
|