TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Brenner <[log in to unmask]>
Reply To:
Mike Brenner <[log in to unmask]>
Date:
Tue, 18 Aug 1998 13:04:41 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
There are several companies that sell tools that do cross-referencing,
including, in alphabetical order, McCabe and Reasoning. In addition,
there will eventually be a version of gnat that does ASIS so you can
program your own cross reference easily. And yes, global variables are
not just bad style, but they are the primary path along which bugs travel
from package to package.

At the same time as you are removing the global variables, make the
small data types all PURE, and make the large data types PREELABORABLE
using both PRAGMA PREELABORATE and PRAGMA REMOTE_TYPES, so they can
be used in distributed systems. Even if you do not distribute, the bugs
you will fix in making the types limited private so the packages can be
PURE will amaze you.

That relates to the easiest way to remove the hanging pointers and
memory leakages from C and C++ and Java packages. First, convert them
to Ada limited private pure (or preelaborable for large classes) types.
Second, write a test program for the boundary conditions of each variable
in each path. Finally, after passing thoses tests, convert back to the
target language. This has worked for me many times.

Mike Brenner [log in to unmask]

ATOM RSS1 RSS2