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,a85c723067c60e9a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-21 14:23:00 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3B325B9E.483CAF25@ftw.rsc.raytheon.com> From: Wes Groleau X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en,es,fr,pt MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: pragma Pure/Preelaborate - tools, practice? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 21 Jun 2001 15:39:58 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 993156000 151.168.144.162 (Thu, 21 Jun 2001 16:40:00 EDT) NNTP-Posting-Date: Thu, 21 Jun 2001 16:40:00 EDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:9004 Date: 2001-06-21T15:39:58-05:00 List-Id: I have seen advice that one use pragma Pure where ever possible, Preelaborate next, etc. In a way, this seems like bad advice to me. If I find the need to use "access" in a package body, then I have to change pragma Pure to Preelaborate in the spec. If I have to add an initialization action to the body elaboration (yes, there IS an alternative, but...) then I have to remove Pure or Preelaborate from the spec. This in turn means I have to change EVERY pure or preelaborate body or spec that directly or indirectly depends on the one that had a "real" change. Even some specs that will still compile may have to be changed because their bodies are no longer compatible with the pragma. So, putting in pragma Pure or preelaborate is risking huge future maintenance actions, is it not? BUT, supposing one decided to follow the advice. Is there a tool (ASIS?) that can analyze a file and everything it depends on (recursively) including bodies (because whether a spec can be Pure depends on its body) and tell whether it is potentially Pure? "potentially" meaning everything it depends on could legally be pure, even if the pragma isn't there. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau