Correction to previous post 
Author Message
 Correction to previous post

Someone pointed out to me that an example I previously posted was wrong,
I must have cut-and-pasted the wrong versoin, GRRR!

Here is the example I meant to post:

with Text_IO; use Text_IO;

procedure S is
   Sum : Integer;
begin
   for J in 1 .. 10 loop
      Sum := Sum + J;
   end loop;

   Put_Line (Integer'Image (Sum));
end;

<<the bad one I posted printed out J and was of course illegal>>

And once again, my point was that on some systems, the above program
will give the right result, and therefore pass exhaustive testing,
even though it has a blatant bug.

The point is that even exhaustive testing is not enough to prove that
a program meets its specifications. Now of course white box testing
using use-def chaining, could with the addition of tools that pointed
out uninitialized paths, find this error, but of course white-box
testing is not an option open to the ACVC testing.

Actually exhuastive coverage and path testing would be a very difficult
task on a program as complex as a compiler for a complex language. The
effort would be huge, and the trouble is that compilers are fluid enough
that the testing would be rapidly out of date, even if you could afford
to do it. I certainly am not aware of any commercial compiler for
Ada, C++, or even C that has been subjected to complete coverage and
path testing (including of course use-def path testing, since that i
is what is involved here).



Sun, 20 Sep 1998 03:00:00 GMT  
 Correction to previous post

  [snip]

:    ...  I certainly am not aware of any commercial compiler for
: Ada, C++, or even C that has been subjected to complete coverage and
: path testing (including of course use-def path testing, since that i
: is what is involved here).

How can we continue to claim that Ada is a better programming language
than C++, or even C, if we continue to group Ada with these languages
when it is convenient?

;-)

Mike
###

--
---------------------------------------------------------------------
Michael J Cordes
Phone: (817) 935-3823
Fax:   (817) 935-3800

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



Sun, 20 Sep 1998 03:00:00 GMT  
 Correction to previous post

: Here is the example I meant to post:

: with Text_IO; use Text_IO;

: procedure S is
:    Sum : Integer;
: begin
:    for J in 1 .. 10 loop
:       Sum := Sum + J;
:    end loop;

:    Put_Line (Integer'Image (Sum));
: end;

  Or howabout the equivalent,

      with Text_IO;
      procedure S is
         J : Integer := 10;
      begin
       Text_IO.Put_Line(Integer'Image( (J * (J + 1)) / 2 );
      end S;

  Surely that is provable.  :-)    :-)  :-)

  Richard Riehle

--


AdaWorks Software Engineering
Suite 27
2555 Park Boulevard
Palo Alto, CA 94306
(415) 328-1815
FAX  328-1112



Sun, 20 Sep 1998 03:00:00 GMT  
 Correction to previous post
Mike said (with smiley)

":    ...  I certainly am not aware of any commercial compiler for
: Ada, C++, or even C that has been subjected to complete coverage and
: path testing (including of course use-def path testing, since that i
: is what is involved here).

How can we continue to claim that Ada is a better programming language
than C++, or even C, if we continue to group Ada with these languages
when it is convenient?"

Well of course we are not talking about use f the language here, but
implementation, and I regard the issues of implementing Ada to be similar
to those of implementing C++.



Mon, 21 Sep 1998 03:00:00 GMT  
 Correction to previous post
Richard, you posted:

      with Text_IO;
      procedure S is
         J : Integer := 10;
      begin
       Text_IO.Put_Line(Integer'Image( (J * (J + 1)) / 2 );
      end S;

I know you had lots of smileys, but I don't get the point of the joke.
Obviously the above program is trivially provable, as would be mine
if I fixed the obvious serious bug.

What's your point? I must be missing semething!



Tue, 22 Sep 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Correction to previous post, asterik should be replaced with apostrophe

2. Correction of my previous posting.

3. STD - correction to previous information that I have posted

4. minor correction to my previous post

5. side effects, correction of previous goof

6. ANNOUNCE: Winico 0.4 prerelease (correction from previous announcement)

7. Sorry Happy.Exe previous posting

8. loop variants (Re: ^^^^^ignore the previous post)

9. views,dynamic binding, addendum to my previous posting

10. Retraction of previous posting

11. omit previous post about intrument drivers

 

 
Powered by phpBB® Forum Software