comp.lang.ada
 help / color / mirror / Atom feed
* testing Generics
@ 1993-03-05 13:14 Jeff Etrick
  1993-03-08 18:19 ` Stephe Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Etrick @ 1993-03-05 13:14 UTC (permalink / raw)


I wanted to know what the net's opion on generic testing was.

I believe a generic procedure should be simple enough to test using a
test
driver which multiply instantiates the procedure for each intended use. If
this is not practical, then the generic is likely too complicated and
perhaps should be disected into more easily managed/tested parts.

Generics is Ada-ese for reusable objects, much the same way that objects
in
C++ or other OOP languages. Once a reusable object has been tested, it
should not have to be retested as it is imbedded into other applications.


Thanks,

Jeff

---------------------------------------------------------------
Jeffery R. Etrick    NET:  jeffe@osiris.CSS.GOV
ENSCO INC.       MAIL: 445 Pineda Ct.  Melbourne, Fl.  32940
---------------------------------------------------------------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: testing Generics
@ 1993-03-07 18:59 John Goodsen
  0 siblings, 0 replies; 6+ messages in thread
From: John Goodsen @ 1993-03-07 18:59 UTC (permalink / raw)


jeffe@osiris.CSS.GOV (Jeffery R. Etrick) writes:
>
>Generics is Ada-ese for reusable objects, much the same way that objects
>in
>C++ or other OOP languages. Once a reusable object has been tested, it
>should not have to be retested as it is imbedded into other applications.
>
Generics should not be related to C++ objects (classes) or similar concepts
in other OO languages.  Generics are quite orthogonal classes and a welcome
augmentation to the power of classes.  This is why C++ has (is) adopting 
Template classes (inspired by Ada generics)...

--
John Goodsen                           PCIS Programme
Software Process & Environments        Ada Joint Program Office       
EVB Software Engineering               goodsenj@ajpo.sei.cmu.edu
jgg@evb.com

-- 
John Goodsen
Software Process & Environments
EVB Software Engineering
jgg@evb.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: testing Generics
@ 1993-03-07 19:10 John Goodsen
  0 siblings, 0 replies; 6+ messages in thread
From: John Goodsen @ 1993-03-07 19:10 UTC (permalink / raw)


Oops, edit that last post to read:

in other OO languages.  Generics are quite orthogonal to classes and a welcome
                                                     ^^^^
                                                    insert

:-)

-- 
John Goodsen
Software Process & Environments
EVB Software Engineering
jgg@evb.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: testing Generics
  1993-03-05 13:14 testing Generics Jeff Etrick
@ 1993-03-08 18:19 ` Stephe Leake
  0 siblings, 0 replies; 6+ messages in thread
From: Stephe Leake @ 1993-03-08 18:19 UTC (permalink / raw)


In article <226@hathor.CSS.GOV>, jeffe@hathor.CSS.GOV (Jeff Etrick) writes...
>I wanted to know what the net's opion on generic testing was.
> 
>I believe a generic procedure should be simple enough to test using a
>test
>driver which multiply instantiates the procedure for each intended use. If
>this is not practical, then the generic is likely too complicated and
>perhaps should be disected into more easily managed/tested parts.
> 
>Generics is Ada-ese for reusable objects, much the same way that objects
>in
>C++ or other OOP languages. Once a reusable object has been tested, it
>should not have to be retested as it is imbedded into other applications.

Part of the point of using a generic is that it reduces testing. If you have a 
generic that accepts a generic scalar type parameter, you do not need to test it
will all possible scalar types (a totally impossible task!); you only need to
test it with representative samples from each class; integer, enumeration. You need
to be careful when writing the body not to make any assumptions about the type
(like integer types start at 0). The careful use of Ada attributes usually 
eliminates this kind of assumption.

Stephen Leake	NASA Goddard Robotics Lab
internet : nbssal@robots.gsfc.nasa.gov



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: testing Generics
@ 1993-03-09  5:26 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!ha
  0 siblings, 0 replies; 6+ messages in thread
From: agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!ha @ 1993-03-09  5:26 UTC (permalink / raw)


In article <8MAR199313194203@bambam> nbssal@bambam (Stephe Leake) writes:

>In article <226@hathor.CSS.GOV>, jeffe@hathor.CSS.GOV (Jeff Etrick) writes...
>>I wanted to know what the net's opion on generic testing was.

>Part of the point of using a generic is that it reduces testing. If you have a
 
>generic that accepts a generic scalar type parameter, you do not need to test 
it
>will all possible scalar types (a totally impossible task!); you only need to
>test it with representative samples from each class; integer, enumeration.

Keep in mind that this testing can be more rigorous than testing of
non-generic code. By its very nature, a generic is usable (after
instantiation, of course) over an entire class of types. The tester has
to consider all possible forms of instantiations. If your generic has
several formal type parameters, all 'private', then there are a lot of
possibilities!

Where the real benefit lies is in reuse. If the same generic code is
used by several applications, then the likelihood of bugs being found
and corrected is quite high. This is what makes component libraries
appealing.

>Stephen Leake	NASA Goddard Robotics Lab
>internet : nbssal@robots.gsfc.nasa.gov


-- 
Mike Berman
University of Maryland, Baltimore County	Fastrak Training, Inc.
berman@umbc.edu					(301)924-0050

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: testing Generics
@ 1993-03-11  0:22 cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!uw
  0 siblings, 0 replies; 6+ messages in thread
From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!uw @ 1993-03-11  0:22 UTC (permalink / raw)


In article <8MAR199313194203@bambam> you write:
>In article <226@hathor.CSS.GOV>, jeffe@hathor.CSS.GOV (Jeff Etrick) writes...
>>I wanted to know what the net's opion on generic testing was.
>> 
>>I believe a generic procedure should be simple enough to test using a
>>test
>>driver which multiply instantiates the procedure for each intended use. If
>>.... stuff deleted ...

>Part of the point of using a generic is that it reduces testing. If you 
>have a generic that accepts a generic scalar type parameter, you do not
>need to test itwill all possible scalar types (a totally impossible task!);
>you only need to test it with representative samples from each class;
>integer, enumeration. 
> ..... stuff deleted .....

If you design your components well, then the above statement applies to
non-scalar types as well.  I.e., you don't need to test with all 
possible non-scalar types to be sure that it works correctly with
each (an equally impossible task).

See the arguement for "local certifiability" of the properties composability
and correctness in the following:

------------------------------------------------------------------------

    Hollingsworth, J.E.
    "Software Component Design-for-Reuse: A Language-Independent
        Discipline Applied to Ada"
    Department of Computer and Information Science
    August 1992

To get a copy, FTP to "archive.cis.ohio-state.edu" and login as
"anonymous", giving your own user id as password (e.g., "xy@abc.com").
Then "cd" to directory "pub/tech-report/TR1-1993" where you will find
a "README.txt" file and several compressed PostScript files
(approximately one per chapter of the dissertation).  You'll need to
get all these files.  You should read the "README.txt" file and follow
directions there.  Of course, make sure you uncompress all the other
files before attempting to preview or print them.
------------------------------------------------------------------------


Cheers,

Joe
jholly@isu.indiana.edu
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1993-03-11  0:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-03-05 13:14 testing Generics Jeff Etrick
1993-03-08 18:19 ` Stephe Leake
  -- strict thread matches above, loose matches on Subject: below --
1993-03-07 18:59 John Goodsen
1993-03-07 19:10 John Goodsen
1993-03-09  5:26 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!ha
1993-03-11  0:22 cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!uw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox