,Instructor's Solutions Manual
to
Concepts of Programming Languages
Eleventh Edition
R.W. Sebesta
,Preface
Changes for the Eleventh Edition
he goals, overall structure, and approach of this eleventh edition of
T Concepts of Programming Languages remain the same as those of the ten
earlier editions. The principal goals are to introduce the fundamental
constructs of contemporary programming languages and to provide the
reader with the tools necessary for the critical evaluation of existing and
future programming languages. A secondary goal is to prepare the reader for the
study of compiler design, by providing an in-depth discussion of programming
language structures, presenting a formal method of describing syntax, and
introducing approaches to lexical and syntactic analysis.
The eleventh edition evolved from the tenth through several different kinds of
changes. To maintain the currency of the material, much of the discussion of older
programming languages, particularly Ada and Fortran, has been removed. For
example, the descriptions of Ada's records, union types, and pointers were
removed from Chapter 6. Likewise, the description of Ada's for statement was
removed from Chapter 8 and the discussion of Ada's abstract data types was
removed from Chapter 11.
On the other hand, a section on reflection that includes two complete program
examples was added to Chapter 12, a section on exception handling in Python and
Ruby was added to Chapter 14, and a table of the design choices of a few
common languages for support for object-oriented programming was added to
Chapter 12.
In some cases, material has been moved. For example, Section 9.10 was
moved backward to become the new Section 9.8.
In one case, example program MAIN_2 in Chapter 10 was rewritten in
JavaScript, previously having been written in Ada.
Chapter 12 was substantially revised, with several new paragraphs, two new
sections, and numerous other changes to improve clarity.
2
, The Vision
This book describes the fundamental concepts of programming languages by
discussing the design issues of the various language constructs, examining the
design choices for these constructs in some of the most common languages, and
critically comparing design alternatives.
Any serious study of programming languages requires an examination of
some related topics, among which are formal methods of describing the syntax
and semantics of programming languages, which are covered in Chapter 3. Also,
implementation techniques for various language constructs must be considered:
Lexical and syntax analysis are discussed in Chapter 4, and implementation of
subprogram linkage is covered in Chapter 10. Implementation of some other
language constructs is discussed in various other parts of the book.
The following paragraphs outline the contents of the eleventh edition.
Chapter Outlines
Chapter 1 begins with a rationale for studying programming languages. It then
discusses the criteria used for evaluating programming languages and language
constructs. The primary influences on language design, common design trade-
offs, and the basic approaches to implementation are also examined.
Chapter 2 outlines the evolution of the languages that are discussed in this
book. Although no attempt is made to describe any language completely, the
origins, purposes, and contributions of each are discussed. This historical
overview is valuable, because it provides the background necessary to
understanding the practical and theoretical basis for contemporary language
design. It also motivates further study of language design and evaluation. Because
none of the remainder of the book depends on Chapter 2, it can be read on its
own, independent of the other chapters.
Chapter 3 describes the primary formal method for describing the syntax of
programming language-BNP. This is followed by a description of attribute
grammars, which describe both the syntax and static semantics of languages. The
difficult task of semantic description is then explored, including brief
introductions to the three most common methods: operational, denotational, and
axiomatic semantics.
Chapter 4 introduces lexical and syntax analysis. This chapter is targeted to
3
to
Concepts of Programming Languages
Eleventh Edition
R.W. Sebesta
,Preface
Changes for the Eleventh Edition
he goals, overall structure, and approach of this eleventh edition of
T Concepts of Programming Languages remain the same as those of the ten
earlier editions. The principal goals are to introduce the fundamental
constructs of contemporary programming languages and to provide the
reader with the tools necessary for the critical evaluation of existing and
future programming languages. A secondary goal is to prepare the reader for the
study of compiler design, by providing an in-depth discussion of programming
language structures, presenting a formal method of describing syntax, and
introducing approaches to lexical and syntactic analysis.
The eleventh edition evolved from the tenth through several different kinds of
changes. To maintain the currency of the material, much of the discussion of older
programming languages, particularly Ada and Fortran, has been removed. For
example, the descriptions of Ada's records, union types, and pointers were
removed from Chapter 6. Likewise, the description of Ada's for statement was
removed from Chapter 8 and the discussion of Ada's abstract data types was
removed from Chapter 11.
On the other hand, a section on reflection that includes two complete program
examples was added to Chapter 12, a section on exception handling in Python and
Ruby was added to Chapter 14, and a table of the design choices of a few
common languages for support for object-oriented programming was added to
Chapter 12.
In some cases, material has been moved. For example, Section 9.10 was
moved backward to become the new Section 9.8.
In one case, example program MAIN_2 in Chapter 10 was rewritten in
JavaScript, previously having been written in Ada.
Chapter 12 was substantially revised, with several new paragraphs, two new
sections, and numerous other changes to improve clarity.
2
, The Vision
This book describes the fundamental concepts of programming languages by
discussing the design issues of the various language constructs, examining the
design choices for these constructs in some of the most common languages, and
critically comparing design alternatives.
Any serious study of programming languages requires an examination of
some related topics, among which are formal methods of describing the syntax
and semantics of programming languages, which are covered in Chapter 3. Also,
implementation techniques for various language constructs must be considered:
Lexical and syntax analysis are discussed in Chapter 4, and implementation of
subprogram linkage is covered in Chapter 10. Implementation of some other
language constructs is discussed in various other parts of the book.
The following paragraphs outline the contents of the eleventh edition.
Chapter Outlines
Chapter 1 begins with a rationale for studying programming languages. It then
discusses the criteria used for evaluating programming languages and language
constructs. The primary influences on language design, common design trade-
offs, and the basic approaches to implementation are also examined.
Chapter 2 outlines the evolution of the languages that are discussed in this
book. Although no attempt is made to describe any language completely, the
origins, purposes, and contributions of each are discussed. This historical
overview is valuable, because it provides the background necessary to
understanding the practical and theoretical basis for contemporary language
design. It also motivates further study of language design and evaluation. Because
none of the remainder of the book depends on Chapter 2, it can be read on its
own, independent of the other chapters.
Chapter 3 describes the primary formal method for describing the syntax of
programming language-BNP. This is followed by a description of attribute
grammars, which describe both the syntax and static semantics of languages. The
difficult task of semantic description is then explored, including brief
introductions to the three most common methods: operational, denotational, and
axiomatic semantics.
Chapter 4 introduces lexical and syntax analysis. This chapter is targeted to
3