Skip to main content Accessibility help
×
Hostname: page-component-586b7cd67f-t7fkt Total loading time: 0 Render date: 2024-11-25T23:14:34.618Z Has data issue: false hasContentIssue false

Chapter 14 - Declarations

Published online by Cambridge University Press:  19 January 2010

Peter D. Mosses
Affiliation:
Aarhus Universitet, Denmark
Get access

Summary

  • Declarations include definitions of constants and packages. Expressions include identifiers, as well as aggregates for arrays and records and selection of components. Statements include blocks with local declarations.

  • The semantic description of declarations, etc., illustrates the use of the declarative action notation introduced in Chapter 7.

  • Semantic entities now include general array and record values, and packages.

Declarations in programs are constructs that are similar to mathematical definitions, in that they introduce symbols and determine their interpretation. The symbols introduced are called identifiers. Declarations are said to bind identifiers to their interpretation.

The scope of a declaration is the part of the program in which its binding is valid. This is usually the rest of the block statement in which it occurs, except for inner blocks where the same identifier is re-declared, thus making a hole in the scope of the outer-level declaration. Declarations can also occur in modules, which are called packages in ADA. A module may limit the scope of the declarations in it, and it declares a module identifier which may be used to import the bindings of the declarations into other modules.

The processing of a declaration is called its elaboration. Declarations may involve expressions that are to be evaluated, so their elaboration generally has a computational aspect—in contrast to mathematical definitions.

A record value is similar to a module or package entity, in that its field identifiers can be regarded as bound to component values.

Type
Chapter
Information
Action Semantics , pp. 152 - 162
Publisher: Cambridge University Press
Print publication year: 1992

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 [email protected] 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.

  • Declarations
  • Peter D. Mosses, Aarhus Universitet, Denmark
  • Book: Action Semantics
  • Online publication: 19 January 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569869.019
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.

  • Declarations
  • Peter D. Mosses, Aarhus Universitet, Denmark
  • Book: Action Semantics
  • Online publication: 19 January 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569869.019
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.

  • Declarations
  • Peter D. Mosses, Aarhus Universitet, Denmark
  • Book: Action Semantics
  • Online publication: 19 January 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511569869.019
Available formats
×