comp.lang.ada
 help / color / mirror / Atom feed
* pragma Pure/Preelaborate - tools, practice?
@ 2001-06-21 20:39 Wes Groleau
  2001-06-22 11:52 ` Colin Paul Gloster
  2001-06-26 14:32 ` Stephen Leake
  0 siblings, 2 replies; 3+ messages in thread
From: Wes Groleau @ 2001-06-21 20:39 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-26 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21 20:39 pragma Pure/Preelaborate - tools, practice? Wes Groleau
2001-06-22 11:52 ` Colin Paul Gloster
2001-06-26 14:32 ` Stephen Leake

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