CSCE-622 Generic Programming (Fall 2015)
|Course||CSCE-622 : Generic Programming, TR 09:35–10:50 am HRBB 126|
|Office hours||By appointment (my office is 416)|
In a nutshell
Study of the generic programming approach to design and systematic classification of software components. Techniques for achieving correctness, efficiency, and generality of algorithms, data structures, and memory management. Methods of structuring a library of generic software components for maximum usability are practiced in a significant design and implementation project, or analyzed in a research project.
The main programming tool used in the course is C++, but we take a close look of language constructs for generic programming in several other programming languages, including Generics in Java (or C#), and Haskell, We will also get acquainted with new language features of C++ that improve support for generic programming in C++.
- Note to a prospective student:
If you are thinking of a research career in programming languages, or in such areas of software engineering as reusable software libraries, generic or generative programming etc., you are well advised to take the course. Research in this area is very active: generics in several mainstream languages are evolving constantly, as well as the mechanisms to exploit genericity to change and improve programming practices.
Schedule and material
Some of the slides are based on earlier presentations, or other material, contributed by numerous people, in particular, Andrew Lumsdaine, Jeremiah Willcock, Jeremy Siek, Dave Musser, Alex Stepanov, Dave Abrahams, and Doug Gregor.
|Tue, Sep 1||Introduction (pdf), C++ template features (pdf)||McIlroy's paper|
|Thu, Sep 3||C++ template features|
|Tue, Sep 8||C++ template features|
|Thu, Sep 10||GP Process, STL (pdf)|
|Tue, Sep 15||no class; rescheduled to Sep 21|
|Thu, Sep 17||no class; rescheduled to Oct 14|
|Mon, Sep 21||Rescheduled class; GP foundations (pdf)|
|Tue, Sep 22||STL|
|Thu, Sep 24||Function objects (pdf); Lambda functions (pdf)|
|Tue, Sep 29||no class; rescheduled to Oct 19|
|Thu, Oct 1||no class; rescheduled to Nov 2|
|Tue, Oct 6||Lambda functions;|
|Thu, Oct 8||Adapters, allocators, traits classes|
|Tue, Oct 13||Rvalue references (pdf)|
|Wed, Oct 14||Rescheduled class; Rvalue references, Runtime polymorphism|
|Thu, Oct 15||Runtime polymorphism (pdf)|
|Mon, Oct 19||Rescheduled class; Runtime polymorphism, BGL (pdf)|
|Tue, Oct 20||BGL|
|Thu, Oct 22||BGL|
|Tue, Oct 27||No class; rescheduled to another time|
|Thu, Oct 29||Type deduction with auto and decltype (pdf)|
|Mon, Nov 2||Rescheduled class; Initializer lists (pdf)|
|Tue, Nov 3||Variadic templates (pdf)|
|Thu, Nov 5||Concurrency in C++14 (pdf)|
|Tue, Nov 10||Concurrency in C++14|
|Thu, Nov 12||Concurrency in C++14|
|Mon, Nov 16||Rescheduled class; Implementing task-based concurrency (pdf)|
|Tue, Nov 17||Metaprogramming (pdf)|
|Thu, Nov 19||Metaprogramming|
|Tue, Nov 24|
|Thu, Nov 26||No class — Thanksgiving|
|Tue, Dec 1||Project presentations|
|Thu, Dec 3||Project presentations|
|Tue, Dec 8||Project presentations|
The course will have (about) five programming assignments and one final project. The final project is either a large design and implementation project done in a group, or a research project, that can be individual.
Assignments will be managed and turned in electronically (preferably via CSNET). You may be required to demonstrate your programs to the instructor. Some assignments, as well as the final project, will be done in groups of two or three students. You may form groups on your own, but you will be in the same group for the entire semester. For the problem sets, each group will turn in one copy of the assignment, with the names of all group members on it.
Each programming assignment will cover a major course topic and may (will) involve a significant amount of programming. Do not wait until the night before an assignment is due to start working on it!
Late work will be accepted, but a penalty of 5% per calendar day late will be applied; work that is late more than two days will not be accepted. Assignments are due at 11:59PM on their due date, unless otherwise instructed.
Your course grade will be based on assignments (50%), and term projects (50%). Class presentations affect the grading of term projects. After assigning the grade based on the above criteria, not participating in classes can reduce your grade by up to 10 percent points. A perfect attendance is not required, but expect this clause to be in effect if I rarely see you in class.
A grade of 90% or above guarantees an A, 80% or above a B, 70% or above a C, and 60% or above a D.
All grade assignments are final—unless there was a mistake made in recording your semester grades or in computing your final grade. If all numbers are correctly recorded and computed, I will not discuss changing the resulting letter grades.
There are situations that may warrant regrading a particular assignment. For example, making addition errors in computing your score, not seeing or recognizing an answer that you gave, or not understanding an answer that you gave. Requests for regrading of assignments must be made within one week after the graded work has been handed back.
Academic Integrity Policy: An Aggie does not lie, cheat, or steal or tolerate those who do. The Honor Council Rules and Procedures are available on the web http://www.tamu.edu/aggiehonor.
Americans with Disabilities Act (ADA) Policy: The Americans with Disabilities Act (ADA) is a federal anti-discrimination statute that provides comprehensive civil rights protection for persons with disabilities. Among other things, this legislation requires that all students with disabilities be guaranteed a learning environment that provides for reasonable accommodation of their disabilities. If you believe you have a disability requiring an accommodation, please contact the Department of Student Life, Services for Students with Disabilities, in Room 126 of the Koldus Building or call 845-1637.
The following is a tentative list of topics discussed during the course:
- Motivation for genericity, software components, reuse
- Some necessary C++ background relevant for generic programming
- The design principles of the STL part of the C++ standard library
- Process of generic programming
- Concept taxonomies in library design
- Concepts as constraints to type parameters
- Performance of generic code (and how to measure it)
- Analyzing language features that support generic programming (we look at languages such as C#, Java, Haskell, …)
- Dissecting the Boost Graph Library
- Metaprogramming (Boost Metaprogramming Library, Expression Templates, MetaOCaml, …)
- Generative programming
- C++ ``concepts'' — constrained generics in C++
- C++11/14 features (lambdas, variadic templates, initializer lists, rvalue references and move semantics)
The projects instruction page.
The main tool you will be needing in this course is a C++ compiler. Get your hands on one by whatever means you wish. I will also ask your returned assignments to come equipped with Makefiles that build your programs; familiarize yourself with make. Also, be prepared to create pdf files by some means; pdf is the format that you are required to return your write-ups in. A handy tool for this is LaTeX.
Instructions on other software tools we may possibly need will be given later.
The following list of books contain useful reference or otherwise related material for the course (but you do not need to acquire them for just this course):
- Andrew Koenig and Barbara Moo: Accelerated C++, Addison-Wesley, 2000.
- Bjarne Stroustrup: The C++ Programming Language, 3rd edition, Addison-Wesley, 1997.
- David Vandevoorde, Nicolai M. Josuttis: C++ Templates: The Complete Guide, Addison-Wesley, 2003.
- Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine, The Boost Graph Library Addison-Wesley, 2001.
- Matthew H. Austern: Generic Programming and the STL: Using and Extending the C++ Standard Template Library, Addison-Wesley, 1998.
- David R. Musser, Gillmer J. Derge, and Atul Saini: STL Tutorial and Reference Guide, Second Edition: C++ Programming with the Standard Template Library, Addison-Wesley, 2001.
- David Abrahams and Aleksey Gurtovoy, C++ Template Metaprogramming: Tools and Techniques from the Boost Libraries, Addison-Wesley, 2004.