COMP 40 Schedule
Note: This schedule is subject to change without notice at any
time.
Expect it to change approximately weekly throughout the semester.
For pointers to lecture notes, and for more information about what's
going on, consult the syllabus.
- Wednesday, 9/7
- From C++ to C to the machine
Read:
- Friday, 9/9
- Lab: getting started with C and interfaces
- Monday, 9/12
- Interfaces and implementations: tables and polymorphism
Design for intro: Introduction: Software Design with Interfaces in C (also in PDF) due at 11:59 PM.
- Wednesday, 9/14
- Anatomy of an abstraction: Arrays
- Thursday, 9/15
- Not a class day, but Assignment for intro: Introduction: Software Design with Interfaces in C (also in PDF) due at 11:59 PM.
- Friday, 9/16
- Lab: Points, Lines, and Planes
- Monday, 9/19
- Contracts, invariants, and implementation: Hanson's Arrays, continued
- Tuesday, 9/20
- Not a class day, but Design for iii: Interfaces, implementations, and images (also in PDF) due at 11:59 PM.
- Wednesday, 9/21
- Realizing interfaces using separate compilation and libraries
Read:
- Friday, 9/23
- Lab: problem-solving and removing black edges
- Sunday, 9/25
- Not a class day, but Assignment for iii: Interfaces, implementations, and images (also in PDF) due at 11:59 PM.
- Monday, 9/26
- From Newton to Einstein---locality and the costs of storage
Read:
- Bryant and O'Hallaron: Chapter 1 (skim)
- Bryant and O'Hallaron, Section 1.7 (read)
- Bryant and O'Hallaron, Sections 6.2 to 6.5
- Wednesday, 9/28
- The how and why of caching: associativity, locality, kinds of cache misses
- Friday, 9/30
- Lab: Striding through memory
- Sunday, 10/2
- Not a class day, but Design for locality: Machine storage and locality (also in PDF) due at 11:59 PM.
- Monday, 10/3
- Cache misses, alignment; C types and memory layout
- Wednesday, 10/5
- Arithmetic: positional notation, finite-precision decimal arithmetic, Floating point, normalized floating point
Read: Bryant and O'Hallaron, Sections 2.1–2.4
- Thursday, 10/6
- Not a class day, but Assignment for locality: Machine storage and locality (also in PDF) due at 11:59 PM.
- Friday, 10/7
- Lab: testing image compression
- Monday, 10/10
- Columbus Day. No class.
- Wednesday, 10/12
- Normalized floating-point review; Binary representation of signedintegers and its arithmetic
Design for arith: Data! Bits, bytes, words, and arithmetic (also in PDF) due at 11:59 PM.
- Friday, 10/14
- Lab: testing the Bitpack interface
- Sunday, 10/16
- Not a class day, but Assignment for arith: Data! Bits, bytes, words, and arithmetic (also in PDF) due at 11:59 PM.
- Monday, 10/17
- Review of past work; prepartion for exam; in memoriam Dennis Ritchie
- Wednesday, 10/19
- Midterm exam in class: Interfaces and implementations; caches and locality; machine arithmetic.The midterm will focus on material from the first three assignments and on material from in-class exercises. I will also expect you to have some grasp of floating-point arithmetic.You will be expected to read and write C code, although if you can't remember some syntax, you can make it up and explain its meaning.
- Thursday, 10/20
- Not a class day, but Assignment for arith-challenge: Image-Compression Challenge (also in PDF) due at 11:59 PM.
- Friday, 10/21
- Lab: The Data Display Debugger
Read:
- If you have the second (new) edition of Bryant and O'Hallaron:
- New material in Sections 3.1–3.7 (but be aware this material uses the wrong machine for examples)
- Section 3.13 on the AMD64
- Material for review in Sections 3.8–3.10
- If you have the first (old) edition of Bryant and O'Hallaron:
- New material in Sections 3.1–3.7 (but be aware this material uses the wrong machine for examples)
- The AMD64 supplement
- Material for review in Sections 3.8–3.11
- Monday, 10/24
- Introduction to AMD64 assembly: registers, AMD64 parameters and results
- Wednesday, 10/26
- Control flow: compare and test instructions; condition codes; translating switch statements; translating control flow (if plus boolean short-circuit)
- Friday, 10/28
- Lab: From C to assembler (closing the loop on reverse engineering)
- Monday, 10/31
- A Universal (virtual) Machine
- Tuesday, 11/1
- Not a class day, but Assignment for code: From C code to machine instructions (also in PDF) due at 11:59 PM.
- Wednesday, 11/2
- Machine emulation: a classic technique
- Thursday, 11/3
- Not a class day, but Design for um: Machine code: Virtual Machines (also in PDF) due at 11:59 PM.
- Friday, 11/4
- Lab: Unit testing for Universal Machines
- Monday, 11/7
- Advice on documenting and implementing the Universal Machine
- Tuesday, 11/8
- Lab: Compiler sprints, Universal Machine support
- Wednesday, 11/9
- Refactoring; review of binary representation
- Friday, 11/11
- Veterans' Day. No class.
- Sunday, 11/13
- Not a class day, but Assignment for um: Machine code: Virtual Machines (also in PDF) due at 11:59 PM.
- Monday, 11/14
- Profiling I
Read:
- Bryant and O'Hallaron, sections of Chapter 5 (for details, see homework)
- Documentation for valgrind and kcachegrind (for reference)
- Wednesday, 11/16
- Profiling II
- Friday, 11/18
- Lab: COMP 40 speed profiling
- Monday, 11/21
- Profiling wrapup: Function inlining and specialization
- Tuesday, 11/22
- Not a class day, but Assignment for profile: Profiling and Code Tuning (also in PDF) due at 11:59 PM.
- Wednesday, 11/23
- Thanksgiving. No class.
- Friday, 11/25
- Thanksgiving. No class.
- Monday, 11/28
- Universal Machine macro assembly language
Read:
- Wednesday, 11/30
- Programming in assembly language
- Friday, 12/2
- Lab ideas for 2011: (1) finishing implementation of the macro assembler: using algebraic laws to justify macros x = ((x << 19) >> 19) | ((x >> 13) << 13)
- Sunday, 12/4
- Not a class day, but Assignment for asm: From assembly code to machine code (also in PDF) due at 11:59 PM.
- Monday, 12/5
- Implementing procedure calls; a print function
Read: Programming the Universal Machine (also in PDF)
- Tuesday, 12/6
- Not a class day, but Design for asmcoding: Programming in assembly code (also in PDF) due at 11:59 PM.
- Wednesday, 12/7
- Implementing the RPN calculator
- Friday, 12/9
- Lab: Understanding the implementation plan
- Sunday, 12/11
- Not a class day, but Assignment for asmcoding: Programming in assembly code (also in PDF) due at 11:59 PM.
- Monday, 12/12
- Review for the final exam
- Friday, 12/16
- Final exam: 12:00 PM, Halligan 111A