comp.lang.ada
 help / color / mirror / Atom feed
From: Wes Groleau <wwgrol@ftw.rsc.raytheon.com>
Subject: pragma Pure/Preelaborate - tools, practice?
Date: Thu, 21 Jun 2001 15:39:58 -0500
Date: 2001-06-21T15:39:58-05:00	[thread overview]
Message-ID: <3B325B9E.483CAF25@ftw.rsc.raytheon.com> (raw)

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



             reply	other threads:[~2001-06-21 20:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-21 20:39 Wes Groleau [this message]
2001-06-22 11:52 ` pragma Pure/Preelaborate - tools, practice? Colin Paul Gloster
2001-06-26 14:32 ` Stephen Leake
replies disabled

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