From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-03 12:24:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!ppp-1-188.5800-14.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Refactoring and Ada Date: Sun, 3 Feb 2002 19:23:14 -0000 Message-ID: References: <3C5AB0B7.9D75D49A@grammatech.com> <5ee5b646.0202030553.6431291a@posting.google.com> NNTP-Posting-Host: ppp-1-188.5800-14.telinco.net (212.1.148.188) X-Trace: fu-berlin.de 1012767842 42848824 212.1.148.188 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:19568 Date: 2002-02-03T19:23:14+00:00 List-Id: "Robert Dewar" wrote in message news:5ee5b646.0202030553.6431291a@posting.google.com... > "Nick Roberts" wrote in message news:... > > I think it's arguable whether that actually counts as > > refactoring. > > > Do the semantics really remain the same > > Yes > > > could the change have been made, > > Yes > > > safely, by a purely mechanised algorithm? > > Yes, > > > (I don't think so. And if it could, the algorithm would > have to be fiendishly complex, no?) > > No I'm intrigued. Could you show a real-life example demonstrating this please? > > I have never personally heard of any Ada 83 program being > > re-engineered into Ada 95 whilst -- and this is the > > crucial bit -- retaining the same semantics (not just > > 'effectively the same', as above). > > I find this surprising, since we see it all the time. Nick > I can't guess what Ada environment you inhabit if you never > saw this. It is indeed common for users to take large Ada 83 codes and > reengineer them into Ada 95, using Ada 95 > constructs to clean up the code (Pat's use type example), > or to improve efficiency (e.g. replacing "passive" tasks > by protected types). Well, I have never come across an example of this myself. Perhaps that's simply a consequence of blind chance. Perhaps your experiences, Robert, are not actually typical of the Ada community in general. > Another example is adding pragnma > Preelaborate where possible to reduce elaboration checking > (that's something that could certainly be automated). If you're talking about the automated detection of packages which are eligible to be pre-elaborated, is it not the case that, in pratice, many packages which are eligible cannot be detected automatically (because it depends on dynamic behaviour beyond the grasp of static analysis)?