[net.lang.ada] MIL-HBK-287, Use of Ada with MIL-STD-2167

fischer@hermix.UUCP (10/18/85)

I'm distributing by snail mail the Ada coding standards for review,
but one section is short enough to type in, namely, the section which
covers use of Ada and its mapping into '2167 terminology.  That section
is typed in via this message, and your review comments are kindly
requested.  All comments received, will be forwarded to the Council
of Space and Defense Industry Associations (CODSIA) task group
responsible for coordination of industry comment.  

I believe the Deadline for comments has been extended to the second week
in November, and will confirm by separate message to this net when I
verify this.

    Herm Fischer   Arpa: HFischer@eclb
		   Uucp: {randvax, cepu!ucla-an}!hermix!fischer
		   AT&T: 818/995 7671
		   Toll free via SBS: 950-1088, wait for tone,
			then dial FISHER (347437)

Section 4.4.17 of DoD HBK 287

    [the following paragraphs cannot be printed on an upper-case only
    printer, because unit (lower case) means Ada defined unit, and
    Unit (capitolized) means M/S 2167 defined unit]

    [inserts in square brackets are not part of the handbook]

4.4.17 USE OF ADA WITH DOD-STD-2167 AND ASSOCIATED STANDARDS

The Ada*  programming language is now the preferred high order language of
the DoD.  This language, because of its advanced constructs, needs its own
set of coding standards, as well as an explanation of how it maps to
DoD-STD-2167 terminology.  Appendix B [which is available by snail mail
upon request to H. Fischer] provides a general set of coding standards
that can be implemented on all Ada programs.  The mapping of DoD-STD-2167
terminology to Ada is as follows:

      a.  A DOD-STD-2167 CSCI [Computer Software Configuration Item,
    software which is designated by the contracting agency for
    configuration management] corresponds to a subset of the library
    Units making up an Ada program together with all associated
    bodies and lower-level program elements.  The library Units
    grouped into the CSCI should have a strong cohesiveness to
    warrent the grouping.  In a case where the entire software
    system consists of more than one Ada program, a single CSCI
    should contain no more than one program.  It is reasonable to
    break a program up into several CSCIs, but one CSCI should not
    contain more than one program.
    
      b.  An Ada program unit is a TLCSC ["Top-Level Computer
    Software Component, which consists of Lower-Level Computer
    Software Components, LLCSCs, which consist of other LLCSCs or
    Units, where Units are the smallest logical entities, and the
    actual physical entities implemented in code." ref:2167]
    if the declaration of the program unit is not contained in any
    other program unit.  A proper TLCSC contains the declarations of
    at least one other Ada program unit.  An Improper TLCSC does not
    contain declarations of other Ada program units.  Strong
    cohesiveness between program units is required to warrant the
    inclusion of these program unit declarations in the TLCSC.  An
    Ada program will consist of one or more TLCSCs; whereas no TLCSC
    will consist of more than one Ada program.
    
      c.  An Ada program unit is a LLCSC [see def'n above] if the
    declaration of the program unit is contained in another program
    unit.  A proper LLCSC contains the declaration of at least one
    other Ada program unit;  whereas an improper LLCSC does not
    contain declarations of any other Ada program unit.  Strong
    cohesiveness between program units is required to warrant such
    declarations.  A program unit corresponding to a LLCSC may
    contain zero or more program units that are LLCSCs.  As desired,
    a program unit corresponding to a TLCSC may contain zero or more
    program units that are LLCSCs;  however, a program unit
    corresponding to a LLCSC cannot contain any program units that
    are TLCSCs.
    
      d.  Each Ada program unit has an associated [2167-named] Unit
    [see 2167 def'n of Unit in paragraph b insert above].  The Unit
    consists of the entire executable and most of the declarative
    portion of the corresponding Ada program unit.  All type,
    constant, variable, and exception declarations of the Ada
    program unit are part of the Unit.  Moreover, the specification
    portion (the part before the IS) of any Ada program unit
    contained within the higher level program unit is part of the
    Unit.  The program unit in which the Unit is contained may be
    TLCSC or LLCSC.  As dictated by the structure, each program unit
    corresponds to either a TLCSC or LLCSC and may contain one or
    more other Units.