Case Studies and Worked Examples


As noted in the Message from the Author, Programming Language Pragmatics is focussed heavily on concepts, rather than on the details of individual programming languages. At the same time, it takes the opportunity in many places to place these concepts in context by examining case studies from particular languages. It also includes many detailed, worked examples.

case studies pages  
Bootstrapping a Pascal Compiler 12-13
Separate Compilation in C 151-153
The IEEE Floating-Point Standard 212-214
The MIPS and MC680x0 Machine Architectures 220-225
Operator Precedence in Fortran, Pascal, C, and Ada 253
Iterators in Clu 287-288
Generators in Icon 288-291
Tail Recursion in Scheme 299-300
Nondeterminacy in SR 306-308
The ML Type System 344-351
Constrained Types in Ada 362-364
Array Slices (Sections) in Fortran 90 367-368
Pointers and Arrays in C 389-391
Text I/O in Fortran, Ada, C, and C++ 408-414
C Subroutines on a MIPS Machine 434-437
Pascal Subroutines on an MC680x0 437-441
Parameter Modes in Ada 446-448
References in C++ 448-449
Generics (Templates) in Ada and C++ 460-464
The Diana Intermediate Language 498-500
The RTL Intermediate Language 499-503
Dynamic Linking in Irix 519-520
Type Extensions in Ada 95 544-546
Mix-In Inheritance in Java 573-575
The Object Model of Smalltalk 577-580
An Introduction to Scheme 594-602
An Introduction to Prolog 625-641
Message Passing in Java 708-709
worked examples pages
Compilation of a Simple Program 1, 17, 20-23
Recursive Descent Parsing 54-55
Trace of a Table-Driven Top-Down Parse 63
Generation of a Top-Down Parser 64, 67-68
CFSM for a Bottom-Up Parser 81-82
Trace of a Bottom-Up Parser 83
DFAs and Regular Expressions 88-92
Annotation of Parse Trees 171, 173, 177, 178
Trace of an Attribute Evaluator 188
Type Checking with an Attribute Grammar 194-196
Short Circuit Expression Evaluation 273-274
Case Statement Code Generation 276-277
For Loop Code Generation 283-285
Enumerating in C 291-292
Type Coercions in C 338
Record Layout in Memory 353-355, 359, 364
A Life Game in Ada 372
Row Pointers and Arrays in C 375
Array Subscript Computation 375-378
Discrete Event Simulation 480-483
Code Generation for a GCD Program 494-495, 505-508
Static and Dynamic Linking 516, 520
A DFA Program in Scheme 603-604
Evaluation of a Recursive Lambda Expression 620
A Tic-Tac-Toe Program in Prolog 632-634, 639
Conversion of a Logical Statement to Clausal Form 642-643
A Bounded Buffer in Ada, Occam, and SR 715-718
Optimization of a Simple Function 740-767, 775-778


Back to the evaluation guide

Back to the book home page

Last Change: 30 October 2005 / Michael Scott's email address