Place the specification of each library unit package in a separate
file from its body.
Create an explicit specification, in a separate file, for each library
unit subprogram.
Use subunits for the bodies of large units which are nested in other
units.
Place each subunit in a separate file.
Use a consistent file naming convention.
Use subprograms to enhance abstraction.
Restrict each subprogram to the performance of a single action.
Use a function when the subprogram's primary purpose is to provide a
single value.
Minimize the side effect of a function.
Use packages for information hiding.
Use packages with private types for abstract data types.
Use packages to model abstract entities appropriate to the problem
domain.
Use packages to group together related type and object declarations
(e.g., common declarations for two or more library units).
Use packages to group together related program units for configuration
control or visibility reasons.
Encapsulate machine dependencies in packages. Place a software
interface to a particular device in a package to facilitate a change to a
different device.
Place low-level implementation decisions or interfaces in subprograms
within packages.
Use packages and subprograms to encapsulate and hide program details
that may change.
Make each package serve a single purpose.
Use packages to group functionally related data, types, and
subprograms.
Avoid collections of unrelated objects and subprograms.
Avoid putting variables in package specifications.
Use tasks to model abstract, asynchronous entities within the problem
domain.
Use tasks to control or synchronize access to tasks or other
asynchronous entities (e.g., asynchronous I/O, peripheral devices, interrupts).
Use tasks to define concurrent algorithms for multiprocessor
architectures.
Use tasks to perform concurrent, cyclic, or prioritized activities.
Put only what is needed for the use of a package into its
specification.
Minimize the number of declarations in package specifications.
Do not include extra operations simply because they are easy to build.
Minimize the context (with) clauses in a package specification.
Reconsider subprograms which seem to require large numbers of
parameters.
Do not manipulate global data within a subprogram or package merely to
limit the number of parameters.
Avoid unnecessary visibility; hide the implementation details of a
program unit from its users.
Nest package specifications within another package specification only
for grouping operations, hiding common implementation details, or presenting
different views of the same abstraction.
Restrict the visibility of program units as much as possible by
nesting them inside other program units and hiding them inside package bodies.
Minimize the scope within which with clauses apply.