Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-qsmjn Total loading time: 0 Render date: 2024-04-24T21:58:44.678Z Has data issue: false hasContentIssue false

13 - Overall Structure

Published online by Cambridge University Press:  05 July 2014

Get access

Summary

In this chapter we discuss the hierarchical library structure and other mechanisms for separate compilation which were outlined in Chapter 4.

Many languages ignore the simple fact that programs are written in pieces, compiled separately and then joined together. Indeed large programs should be thought of as being composed out of a number of subsystems which themselves have internal structure. There are in fact two distinct requirements.

There is a requirement for decomposing a large coherent program into a number of internal subcomponents. Such a decomposition has particular advantages when a large program is being developed by a team.

There is also a requirement for the creation of a program library where subsystems are written for general use and consequently are written before the programs that use them. Within this structure it is convenient to decompose the interface presented to future clients so that they may select only those parts of a system that are required.

This chapter also contains a further discussion on scope and visibility and summarizes the curious topic of renaming.

Library units

We will start by considering which units of Ada can be compiled separately and the general idea of dependency.

The most common units of compilation are package specifications and bodies and subprograms. Such units may be compiled individually or for convenience several could be submitted to the compiler together. Thus we could compile the specification and body of a package together but, as we shall see, it may be more convenient to compile them individually.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2014

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Overall Structure
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.020
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Overall Structure
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.020
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Overall Structure
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.020
Available formats
×