comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: XX(PL/I)  to Ada translator/lessons learned
Date: 26 May 93 15:29:59 GMT	[thread overview]
Message-ID: <1993May26.152959.22778@seas.gwu.edu> (raw)

In article <1993May26.070218.5567@sctc.com> stachour@sctc.com (Paul Stachour) w
rites:

[other good stuff deleted]
>
>Well, not quite true.  As an experiment, I translated the same
>PL/I code into Ada.  Yes, it was still a little wierd.  Not as
>bad as the C, but still weird.  So I compiled the code (no error
>messages), and ran a few test-cases.  Bamb! Took an exception
>(arressing outside the bounds of an array) on the first test.
>
>Analysis time.  Yep, the code is "coincidentally correct".
>The element of the array that's out-of-bounds is combined
>with other data in such a way that it never affects the 
>results of the computation.
>
>But, it is a lurking boundary condition just waiting to happen.
>Some day, with some compiler, it'll lay out the data-structures
>to put that "wrong element" in the next page of memory, which
>my program doesn't own.  And then it won't be a benign error;
>it'll be a real failure.
>
I KNEW there was a good reason to hate Ada, but I couldn't put my
finger on it till now. It's all that DAMN run-time bounds checking!
Wouldn't you rather not have known about this? After all, the crash
would probably have occurred on someone else's watch... :-) :-) :-)

(Oh, what the hell. Just use pragma SUPPRESS...)

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman
co-chair, SIGAda Education Committee

Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)

"The most important thing is to be sincere, 
and once you've learned how to fake that, you've got it made." 
-- old show-business adage
------------------------------------------------------------------------

             reply	other threads:[~1993-05-26 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-26 15:29 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-26 18:08 XX(PL/I) to Ada translator/lessons learned dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!ux1.cso.uiuc.edu!moe.ksu.ksu.edu!kuhub.cc.ukans.edu!hawk!billk
1993-05-26  7:02 Pa ul Stachour
replies disabled

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