Book contents
- Frontmatter
- Contents
- List of Boxes
- Preface
- Part I Introduction
- Part II Action Notation
- Part III Semantic Descriptions
- Chapter 11 Statements
- Chapter 12 Literals
- Chapter 13 Expressions
- Chapter 14 Declarations
- Chapter 15 Variables
- Chapter 16 Subprograms
- Chapter 17 Tasks
- Part IV Conclusion
- Appendices
- Bibliography
- Symbol Index
- Concept Index
Chapter 11 - Statements
Published online by Cambridge University Press: 19 January 2010
- Frontmatter
- Contents
- List of Boxes
- Preface
- Part I Introduction
- Part II Action Notation
- Part III Semantic Descriptions
- Chapter 11 Statements
- Chapter 12 Literals
- Chapter 13 Expressions
- Chapter 14 Declarations
- Chapter 15 Variables
- Chapter 16 Subprograms
- Chapter 17 Tasks
- Part IV Conclusion
- Appendices
- Bibliography
- Symbol Index
- Concept Index
Summary
Basic statements include sequencing, choices, loops, and exits.
The semantic description of statements illustrates the use of the basic action notation introduced in Chapter 4.
No special semantic entities are required.
Statements, sometimes called commands, are basic constructs of many programming languages. Together with other constructs, they mainly serve to specify the order in which parts of a program are intended to be performed. We call the performance of a statement its execution.
Implementations usually follow the intended order of performance, although any order providing the same observable behaviour is allowed. Moreover, when the intended order is only partially specified, implementations are free to choose any order consistent with the specified order. Of course, when different orders of performance can lead to different observable behaviours, an implementation only provides one of the possible behaviours in each execution.
The so-called imperative programming languages contain a wide variety of statements. This is in contrast to functional programming languages, where the primary concern is with data rather than with order of performance. Most statements, however, have other kinds of phrases as components, such as expressions and declarations. The few statements that do not involve other kinds of construct don't provide much of a programming language: they allow for sequences, nondeterministic choices, and loops, but not much else. Nevertheless, the semantic description of these simple statements does provide some illustration of the use of the basic action notation introduced in Chapter 4.
- Type
- Chapter
- Information
- Action Semantics , pp. 131 - 135Publisher: Cambridge University PressPrint publication year: 1992