home .. forth .. colorforth mail list archive ..

RE: [colorforth] abort


> If your specification is a test, that is likely not a very thorough
> specification. To give an example:
> 
> If your specication for addition is:
> 
> 2 + 2 = 4
> 
> this is fine if you only add 2 and 2, but inadequate if you consider the
> addition of arbitrary integers modulo 2^32 .

All software projects are built on a certain basic set of assumptions, one of
those being that the hardware works as advertised.  The idea is that you test
only what can break, and of what is of critical importance to you.  Otherwise,
the specification has no value.

If I were designing a software simulator for a new 32-bit microprocessor, you
better believe I'll be doing exhaustive tests on its math unit.  While working
for Hifn, Inc., I did almost precisely this, but with 1024-bit integer math
coprocessors for public key encryption, with *programmable* modulos.  It wasn't
fully exhaustive of course -- to test that chip, with all 32 1024-bit
registers, with all possible opcodes, all possible modulos, and all possible
logical operations, it would take longer than the current age of the universe
to test.  Therefore, we test "semi-exhaustively," where the input numbers are
chosen specifically to exercise critical circuit paths as heavily as possible,
while ignoring "redundant" numbers that tend to not test anything.  It turns
out such tests were just as valuable as a fully exhaustive test, and proved the
chip's capabilities to better than one part in several billion.  In effect, it
was effectively exhaustively tested.

For software that is being built *for* the new processor, there is zero need to
test such facilities -- it's assumed to work by both the developers and the
customers.  Thus, you test higher level functionality, which more often than
not does not have so many input combinations.

Please, let's try to retain an open mind about things.  This list is
characteristically accepting of different ideas, and I wish not to start a war
about the virtues of unit testing.  There is a wealth of information publicly
available on the concept, and I encourage people to read what's available, and
to give it a try.  You'll be surprised at how difficult such a simple concept
is to implement at first.  But once you get the hang of it, you'll never want
to go back.

--
Samuel A. Falvo II


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com