Programming Languages: An Active Learning Approach

Front Cover
Springer Science & Business Media, Dec 15, 2008 - Computers - 282 pages

Programming Languages: An Active Learning Approach introduces students to three programming paradigms: object-oriented/imperative languages using C++ and Ruby, functional languages using Standard ML, and logic programming using Prolog. This interactive textbook is intended to be used in and outside of class. Each chapter follows a pattern of presenting a topic followed by a practice exercise or exercises that encourage students to try what they have just read. This textbook is best-suited for students with a 2-3 course introduction to imperative programming.

Key Features:

  • Accessible structure guides the student through various programming languages
  • Seamlessly integrated practice exercises
  • Classroom-tested
  • Online support materials

Advance Praise for Lee’s Programming Languages: An Active Learning Approach

"The Programming Languages book market is overflowing with books, but none like this. In many ways, it is precisely the book I have been searching for to use in my own programming languages course. One of the main challenges I perpetually face is how to teach students to program in functional and logical languages, but also how to teach them about compilers. This book melds the two approaches very well."

-- David Musicant, Carleton College

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Introduction
1
11 Historical Perspective
2
12 Models of Computation
4
13 The Origins of a Few Programming Languages
7
14 Language Implementation
12
15 Where do we go from here?
17
16 Exercises
18
17 Solutions to Practice Problems
19
510 Datatypes
133
511 Parameter Passing in Standard ML
136
513 Tail Recursion
138
514 Currying
140
515 Anonymous Functions
141
516 HigherOrder Functions
142
517 Continuation Passing Style
148
518 Input and Output
149

18 Additional Reading
20
Specifying Syntax
21
22 Backus Naur Form BNF
23
23 The EWE Language
24
24 ContextFree Grammars
28
25 Derivations
29
26 Parse Trees
30
27 Parsing
31
28 Parser Generators
32
29 BottomUp Parsers
33
212 Abstract Syntax Trees
37
213 Infix Postfix and Prefix Expressions
38
215 Exercises
40
216 Solutions to Practice Problems
41
217 Additional Reading
46
ObjectOriented Programming with C++
47
31 Application Development
48
32 The Token Class
55
33 Implementing a Class
57
34 Inheritance and Polymorphism
59
35 A Historical Look at Parameter Passing
62
36 Const in C++
67
37 The AST Classes
70
38 The Scanner
73
39 The Parser
75
310 Putting It All Together
81
311 Exercises
84
312 Solutions to Practice Problems
87
313 Additional Reading
90
ObjectOriented Programming with Ruby
91
41 Designing Calc
93
42 The Token Class
94
43 Parameter Passing in Ruby vs C++
95
44 Accessor and Mutator methods in Ruby
96
45 Inheritance
97
47 Polymorphism in Ruby
100
48 The Scanner
102
49 The Parser
103
410 Putting It All Together
107
411 Static vs Dynamic Type Checking
109
412 Exercises
112
413 Solutions to Practice Problems
114
414 Additional Reading
116
Functional Programming in Standard ML
117
51 Imperative vs Functional Programming
118
52 The Lambda Calculus
119
53 Getting Started with Standard ML
122
54 Expressions Types Structures and Functions
123
55 Recursive Functions
125
56 Characters Strings and Lists
127
57 Pattern Matching
129
58 Tuples
130
59 Let Expressions and Scope
131
519 Programming with Sideeffects
150
520 Exception Handling
152
521 Encapsulation in ML
153
522 Type Inference
155
523 Exercises
158
524 Solutions to Practice Problems
161
525 Additional Reading
168
Language Implementation in Standard ML
169
61 Using MLlex
170
62 The Calculator Abstract Syntax Definition
172
63 Using MLyacc
173
64 Code Generation
175
65 Compiling in Standard ML
179
66 Extending the Language
181
67 Let Expressions
182
68 Defining Scope in Block Structured Languages
185
69 IfThenElse Expressions
186
610 Functions in a BlockStructured Language
188
611 Sequential Execution
195
612 Exercises
197
613 Solutions to Practice Problems
199
614 Additional Reading
202
Logic Programming
203
71 Getting Started with Prolog
205
72 Fundamentals
206
73 Lists
208
74 Builtin Predicates
211
76 Input and Output
212
77 Structures
213
78 Parsing in Prolog
215
79 Prolog Grammar Rules
220
710 Exercises
222
711 Solutions to Practice Problems
223
712 Additional Reading
225
Formal Semantics
226
81 Attribute Grammars
229
82 Axiomatic Semantics
232
83 Action Semantics
234
84 Exercises
245
85 Solutions to Practice Problems
246
The C++ Scanner Class Implementation
247
The Ruby Scanner Class Implementation
251
Standard ML Basis Library
255
C3 The Real Structure
256
C4 The Char Structure
258
C5 The String Structure
259
C7 The TextIO Structure
260
SML Calculator Compiler
262
The Factorial Programs Code
267
Small Action Semantic Description
270
References
277
Index
279
Copyright

Other editions - View all

Common terms and phrases

Bibliographic information