Noeud « Next »: , Noeud « Previous »: Modern Compiler Implementation, Noeud « Up »: Tools



5.2 Bibliography

Below is presented a selection of books, papers and web sites that are pertinent to the Tiger project. Of course, you are not requested to read them all, except Modern Compiler Implementation. A suggested ordered small selection of books is:

  1. Modern Compiler Implementation
  2. Effective C++
  3. Design Patterns: Elements of Reusable Object-Oriented Software
  4. Effective STL

The books are available at the EPITA Library: you are encouraged to borrow them there. If some of these books are missing, please suggest them to Francis Gabon. To buy these books, we recommend Le Monde en Tique, a bookshop which has demonstrated several times its dedication to its job, and its kindness to EPITA students/members.

— Web Site: Bjarne Stroustrup

Bjarne Stroustrup is the author of C++, which he describes as (The C++ Programming Language):

C++ is a general purpose programming language with a bias towards systems programming that
  • is a better C
  • supports data abstraction
  • supports object-oriented programming
  • supports generic programming.

His web page contains interesting material on C++, including many interviews. The interview by Aleksey V. Dolya for the Linux Journal contains thoughts about C and C++. For instance:

I think that the current mess of C/C++ incompatibilities is a most unfortunate accident of history, without a fundamental technical or philosophical basis. Ideally the languages should be merged, and I think that a merger is barely technically possible by making convergent changes to both languages. It seems, however, that because there is an unwillingness to make changes it is likely that the languages will continue to drift apart–to the detriment of almost every C and C++ programmer. [...] However, there are entrenched interests keeping convergence from happening, and I'm not seeing much interest in actually doing anything from the majority that, in my opinion, would benefit most from compatibility.

His list of C++ Applications is worth the browsing.

— Web Site: Boost.org

The Boost.org web site reads:

The Boost web site provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ Standard Library. One goal is to establish "existing practice" and provide reference implementations so that the Boost libraries are suitable for eventual standardization. Some of the libraries have already been proposed for inclusion in the C++ Standards Committee's upcoming C++ Standard Library Technical Report.

In addition to actual code, a lot of good documentation is available. Amongst libraries, you ought to have a look at the Spirit object-oriented recursive-descent parser generator framework, the Boost Smart Pointer Library, the Boost Variant Library etc.

— Book: Compilers: Principles, Techniques and Tools – Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman
— Book: The Dragon Book

assignments.img/compilers-principles-techniques-and-tools.jpg

Published by Addison-Wesley 1986; ISBN 0-201-10088-6.

This book is the bible in compiler design. It has extensive insight on the whole architecture of compilers, provides a rigorous treatment for theoretical material etc. Nevertheless I would not recommend this book to EPITA students, because

it is getting old
It doesn't mention RISC, object orientation, functional, modern optimization techniques such as ssa, register allocation by graph coloring 1 etc.
it is fairly technical
The book can be hard to read for the beginner, contrary to Modern Compiler Implementation.

Nevertheless, curious readers will find valuable information about historically important compilers, people, papers etc. Reading the last section of each chapter (Bibliographical Notes) is a real pleasure for whom is interested.

It should be noted that the French edition, “Compilateurs: Principes, techniques et outils”, was brilliantly translated by Pierre Boullier, Philippe Deschamp, Martin Jourdan, Bernard Lorho and Monique Lazaud: the pleasure is as good in French as it is in English.

— Web Site: Cool: The Classroom Object-Oriented Compiler

The Classroom Object-Oriented Compiler, from the University of California, Berkeley, is very similar in its goals to the Tiger project as described here. Unfortunately it seems dead: there are no updates since 1996. Nevertheless, if you enjoy the Tiger project, you might want to see its older siblings.

— Paper: CStupidClassName – Dejan Jelovi´c

This short paper, CStupidClassName, explains why naming classes CLikeThis is stupid, but why lexical conventions are nevertheless very useful. It turns out we follow the same scheme that is emphasized there.

— Book: Design Patterns: Elements of Reusable Object-Oriented Software – Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides

assignments.img/design-patterns.jpg

Published by Addison-Wesley; ISBN: 0-201-63361-2.

A book you must have read, or at least, you must know it. In a few words, let's say it details nice programming idioms, some of them you should know: the Visitor, the FlyWeight, the Singleton etc. See the Design Patterns Addison-Wesley Page. A pre-version of this book is available on the Internet as a paper: Design Patterns: Abstraction and Reuse of Object-Oriented Design.

You may find additional information about Design Patterns on the Portland Pattern Repository.

— Book: Effective C++ – Scott Meyers

assignments.img/effective-c++.jpg

288 pages; Publisher: Addison-Wesley Pub Co; 2nd edition (September 1997); ISBN: 0-201-92488-9

An excellent book that might serve as a C++ lecture for programmers. Every C++ programmer should have read it at least once, as it treasures C++ recommended practices as a list of simple commandments. Be sure to buy the second edition, as the first predates the C++ standard. See the Effective STL Addison-Wesley Page.

In this document, ECn refers to item n in Effective C++.

— Book: Effective STL – Scott Meyers

assignments.img/effective-stl.jpg

Published by Addison-Wesley; ISBN: 0-201-74962-9

A remarkable book that provides deep insight on the best practice with STL. Not only does it teach what's to be done, but it clearly shows why. A book that any C++ programmer should have read. See the Effective STL Addison-Wesley Page.

In this document, ESn refers to item n in Effective STL.

— Technical Report: Generic Visitors in C++ – Nicolas Tisserand

This report is available on line from Visitors Page: Generic Visitors in C++. Its abstract reads:

The Visitor design pattern is a well-known software engineering technique that solves the double dispatch problem and allows decoupling of two inter-dependent hierarchies. Unfortunately, when used on hierarchies of Composites, such as abstract syntax trees, it presents two major drawbacks: target hierarchy dependence and mixing of traversal and behavioral code.

CWI's visitor combinators are a seducing solution to these problems. However, their use is limited to specific “combinators aware” hierarchies.

We present here Visitors, our attempt to build a generic, efficient C++ visitor combinators library that can be used on any standard “visitable” target hierarchies, without being intrusive on their codes.

This report is in the spirit of Modern C++ Design, and should probably be read afterward.

— News: Guru of the Week

Written by various authors, compiled by Herb Sutter

Guru of the Week (GotW) is a regular series of C++ programming problems created and written by Herb Sutter. Since 1997, it has been a regular feature of the Internet newsgroup comp.lang.c++.moderated, where you can find each issue's questions and answers (and a lot of interesting discussion).

The Guru of the Week Archive (the famous GotW) is freely available. In this document, GotWn refers to the item number n.

— Book: Lex & Yacc – John R. Levine, Tony Mason, Doug Brown

Published by O'Reilly & Associates; 2nd edition (October 1992); ISBN: 1-565-92000-7.

Because the books aims at a complete treatment of Lex and Yacc on a wide range of platforms, it provides too many details on material with little interest for us (e.g., we don't care about portability to other Lexes and Yacces), and too few details on material with big interest for us (more about exclusive start condition (Flex only), more about Bison only stuff, interaction with C++ etc.).

— Article: Making Compiler Design Relevant for Students who will (Most Likely) Never Design a Compiler – Saumya K. Debray

This paper about teaching compilers justifies this lecture. It should be noted that the paper is addressing compilation lectures, not compilation projects, and therefore it misses quite a few motivations we have for the Tiger project.

— Book: Modern C++ Design – Generic Programming and Design Patterns Applied – Andrei Alexandrescu

assignments.img/modern-c++-design.jpg

Published by Addison-Wesley in 2001; ISBN: 0-52201-70431-5

A wonderful book on very advanced C++ programming with a heavy use of templates to achieve beautiful and useful designs (including the classical design patterns, see Design Patterns: Elements of Reusable Object-Oriented Software). The code is available in the form of the Loki Library. The Modern C++ Design Web Site includes pointers to excerpts such as the Smart Pointers chapter.

Read this book only once you have gained good understanding of the C++ core language, and after having read the “Effective C++/STL” books.

— Book: Modern Compiler Implementation in C, Java, ML – Andrew W. Appel

Published by Cambridge University Press; ISBN: 0-521-58390-X

Voir Modern Compiler Implementation. In my humble opinion, most books give way too much emphasis to scanning and parsing, leaving little material to the rest of the compiler, or even nothing for advanced material. This book does not suffer this flaw.

— Book: Parsing Techniques – A Practical Guide – Dick Grune and Ceriel J. Jacob

Published by the authors; ISBN: 0-13-651431-6

A remarkable review of all the parsing techniques. Because the book is out of print, its authors made it freely available: Parsing Techniques – A Practical Guide.

— Report: spot : une bibliothèque de vérification de propriétés de logique temporelle à temps linéaire – Alexandre Duret-Lutz & Rachid Rebiha

This report presents spot, a model checking library written in C++ and Python. Parts were inspired by the Tiger project, and reciprocally, parts inspired modifications in the Tiger project. For instance, you are encouraged to read the sections about the visitor hierarchy and its implementation. Another useful source of inspiration is the use of Python and Swig to write the command line interface.

— Book: The Design and Evolution of C++ – Bjarne Stroustrup

assignments.img/the-design-and-evolution-of-c++.jpg

Published by Addison-Wesley, ISBN 0-201-54330-3.

No comment, since I still have not read it. It is quite famous though.

— Book: The Elements of Style – William Strunk Jr., E.B. White

assignments.img/the-elements-of-style.jpg

Published by Pearson Allyn & Bacon; 4th edition (January 15, 2000); ISBN: 020530902X.

This little book (105 pages) is perfect for people who want to improve their English prose. It is quite famous, and, in addition to providing useful writing thumb rules, it features rules that are interesting as pieces of writing themselves! For instance “The writer must, however, be certain that the emphasis is warranted, lest a clipped sentence seem merely a blunder in syntax or in punctuation”.

You may find the much shorter (43 pages) First Edition of The Elements of Style on line.

— Book: Thinking in C++ Volume 1 – Bruce Eckel

Published by Prentice Hall; ISBN: 0-13-979809-9

Available on the Internet: Thinking in C++ Volume 1

— Book: Thinking in C++ Volume 2 – Bruce Eckel and Chuck Allison

Available on the Internet: Thinking in C++ Volume 2.

— Article: Traits: a new and useful template technique – Nathan C. Myers

The first presentation of the traits technique is from this paper, Traits: a new and useful template technique. It is now a common C++ programming idiom, which is even used in the C++ standard.

— Book: Writing Compilers and Interpreters – An Applied Approach Using C++ – Ronald Mak

Published by Wiley; Second Edition, ISBN: 0-471-11353-0

This book is not very interesting for us: the compiler material is not very advanced (no real ast, not a single line on optimization, register allocation is naive as the translation is stack based etc.), and the C++ material is not convincing (for a start, it is not standard C++ as it still uses #include <iostream.h> and the like, there is no use of STL etc.).

— Web site: STL Home

SGI's STL Home Page, which includes the complete documentation on line.


Notes de bas de page

[1] To be fair, the Dragon Book leaves a single page (not sheet) to graph coloring.