comp.lang.ada
 help / color / mirror / Atom feed
* File name conventions for Ada units
@ 1990-09-28 20:25 SSUID Craig E Warsaw
  1990-09-29 16:29 ` stt
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: SSUID Craig E Warsaw @ 1990-09-28 20:25 UTC (permalink / raw)



I'd like to start a discussion about file naming conventions
for ada units.  It would be ideal if people could quote from
any standards documents they are using.  The Ada Style Guide
used by NASA GSFC says nothing about file naming conventions.

I've been using the following (the convention used in my first
Ada class):

	package spec:	package_.ada
	package body:	package.ada
	subunit:	package__subunit.ada

I've also seen

	package spec:	package_spec.ada	or package_s.ada
	package body:	package_body.ada	or package_b.ada

By the way, there is an annoying aspect of all of these schemes.
If I use wildcarding to print or list files, all of the package
bodies occur before the package specs.  I'd prefer the specs
before the bodies, but that's not too important.

Thanks.

Craig Warsaw
Century Computing, Inc.
1014 West Street
Laurel, MD  20707
Internet:  cew@fox.gsfc.nasa.gov

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: File name conventions for Ada units
@ 1990-10-05 12:04 munck
  0 siblings, 0 replies; 19+ messages in thread
From: munck @ 1990-10-05 12:04 UTC (permalink / raw)


Alex Blakemore writes:

>Even better, some systems (e.g. Rational) don't view source as files
>- you edit the actual library units.  This problem never arises. 

and Robert Firth replies:

> And this, surely, is the right answer. ...

Well, maybe.  It seems to me that it just moves the problem under discussion,
since the library itself is a file (always?) with the possibility of being
named "name.type".  The REAL problem, of course, is that UNIX, MSDOS, VMS,
and everything else in wide use allow names of that form, leading good Ada
programmers to equate the ".type" with the TYPE of an Ada object.  Encoding
the type of something in its name is a state-of-the-art solution made popular
by FORTRAN I, except that FORTRAN enforced the IJK.. convention and these
"modern" OSs do not.

The real right answer is that of modern PSE data repositories such as
CAIS-A, PCTE+, and ATIS, the strongly-typed Entity-Relationship-Attribute
data structure.  Ada source code, if that's what your system uses, should
be contained in an object of type AdaSource, with CompiledInto relationships
to objects of type AdaLibrary.  Better, of course, would be what TeleSoft
is said to be doing on PCTE+, implementing the library as an ERA structure.
Then all the tools that need to operate on data found in the library - editors,
compilers, analyzers, linkers, etc - can "see" the entities and relationships
in the library.

Bob Munck

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

end of thread, other threads:[~1990-10-12  5:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1990-09-28 20:25 File name conventions for Ada units SSUID Craig E Warsaw
1990-09-29 16:29 ` stt
1990-09-29 22:04 ` Dan Rittersdorf
1990-10-01 14:56   ` David Emery
1990-10-06 14:37   ` Rik Palo
1990-09-30  2:49 ` Michael Feldman
1990-10-02 17:10   ` arny.b.engelson
1990-10-04 15:05     ` Michael Feldman
1990-10-02 21:55   ` Erland Sommarskog
1990-10-03  2:00     ` Alan Adamson
1990-10-03 17:00     ` Alex Blakemore
1990-10-04  9:37       ` Mike Harrison
1990-10-04 12:10       ` Robert Firth
1990-10-04  1:55     ` Michael Feldman
1990-10-04 17:22       ` Brian Hanafee
1990-10-08 17:33 ` Andy DeFaria
1990-10-11  8:59   ` Dan Bernstein
1990-10-12  5:29 ` Andy DeFaria
  -- strict thread matches above, loose matches on Subject: below --
1990-10-05 12:04 munck

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