Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

David August

Fall 2006


Directory
General Information | Schedule | Lecture Notes | Assignments | Announcements | Policies


The schedule will change throughout the course.  Please check it frequently.


Week 1: 9/11 - 9/17

Reading (required): C Programming (King) 1, 2 (lightly, noting the differences between C and Java)

Reading (recommended): Programming with GNU Software (Loukides & Oram) 1

Lecture 1: (Thursday) Introduction; The C Programming Language: Fundamentals


Week 2: 9/18 - 9/24

Reading (required): C Programming (King) 3, 4, 5, 6 (lightly, noting the differences between C and Java)

Reading (recommended): Programming with GNU Software (Loukides & Oram) 2, 3, 4

Precept 1: (Monday/Tuesday) Introduction; The Program Preparation Process

Lecture 2: (Tuesday) Character Input/Output in C

Precept 2: (Wednesday/Thursday) UNIX and Xemacs

Lecture 3: (Thursday) Variables, Pointers, and Arrays


Week 3: 9/25 - 10/1

Reading (required): C Programming (King) 7, 8, 9, 16.5, 21, 24.1

Reading (required): The Practice of Programming (Kernighan & Pike) 1, 5, 6

Reading (recommended): Programming with GNU Software (Loukides & Oram) 6

Precept 3: (Monday/Tuesday) Simple C Programs

Lecture 4: (Tuesday) Good Programming

Precept 4: (Wednesday/Thursday) Gdb; C Fundamentals; C Multi-File Programs

Lecture 5: (Thursday) Scoping and Testing

(Sunday) De-Comment Assignment Due


Week 4: 10/2 - 10/8

Reading (required): C Programming (King) 11, 12, 13, 14, 15

Reading (required): The Practice of Programming (Kernighan & Pike) 4

Precept 5: (Monday/Tuesday) The C Programming Language: Pointers and Arrays

Lecture 6: (Tuesday) Memory Allocation

Precept 6: (Wednesday/Thursday) The C Programming Language: Pointers and Arrays (cont.), Strings, Constants

Lecture 7: (Thursday) Abstract Data Types

(Sunday) String Module Assignment Due


Week 5: 10/9 - 10/15

Reading (required): C Programming (King) 16.1-3, 17, 19.1-3, 22

Reading (required): The Practice of Programming (Kernighan & Pike) 2

Precept 7: (Monday/Tuesday) The C Programming Language: Command-Line Arguments, Files, Structures, Dynamic Memory Management

Lecture 8: (Tuesday) Function Pointers and Abstract Data Types

Precept 8: (Wednesday/Thursday) The Meminfo Tool; The C Programming Language: Abstract Data Types

Lecture 9: (Thursday) Hash Tables


Week 6: 10/16 - 10/22 

Reading (required): C Programming (King) 20.1

Precept 9: (Monday/Tuesday) The C Programming Language: Void Pointers and Abstract Data Types; The Symbol Table Assignment

Lecture 10: (Tuesday) Representations (Part 1)

Precept 10: (Wednesday/Thursday) The C Programming Language: Function Pointers and Abstract Data Types; A DynArray ADT

Lecture 11: (Thursday) Representations (Part 2)

(Sunday) Symbol Table Assignment Due


Week 7: 10/23 - 10/29

Reading (required): C Programming (King) 10, 18

Precept 11: (Monday/Tuesday) The C Programming Language: Declarations and Definitions; Exam Preparation

Lecture 12: (Tuesday) Exam Preparation

Precept 12: (Wednesday/Thursday) NO PRECEPT

Lecture 13: (Thursday) Midterm Examination (Exams from Previous Semesters, This Semester's Exam, This Semester's Exam with Answers)


Week 8: 10/30 - 11/5

(Monday - Sunday) Fall Recess


Week 9: 11/6 - 11/12

Reading (required): C Programming (King) 16.4

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.7 (distributed in precepts and available through Blackboard)

Reading (required): http://gee.cs.oswego.edu/dl/html/malloc.html

Precept 13: (Monday/Tuesday) The C Programming Language: Abstract Objects; The Heap Manager Assignment: Introduction, The Baseline Implementation

Lecture 14: (Tuesday) Implementing Malloc and Free

Precept 14: (Wednesday/Thursday) The C Programming Language: Unions; The Heap Manager Assignment: The Baseline Implementation Code, The First Assignment Implementation

Lecture 15: (Thursday) Optimizing Malloc and Free


Week 10: 11/13 - 11/19

Reading (required): Programming from the Ground Up (Bartlett) 1, 2, 3, 10, B, E

Reading (recommended): Programming with GNU Software (Loukides & Oram) 7, 9

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 1: Basic Architecture; Using as, the GNU Assembler

Precept 15: (Monday/Tuesday) The Heap Manager Assignment: The First and Second Assignment Implementations

Lecture 16 (alias Precept 16): (Tuesday) Assembly Language: Getting Started

Precept 17: (Wednesday/Thursday) Assembly Language: Fundamentals, Control Transfer

Lecture 17: (Thursday) Make and Gprof

(Sunday) Heap Manager Assignment Due


Week 11: 11/20 - 11/26

Precept 18: (Monday/Tuesday) Assembly Language: Gdb (Part 1), Instruction Operands, Local Variables

Lecture 18: (Tuesday) Computer Architecture and Assembly Language

(Thursday - Friday) Thanksgiving Holiday


Week 12: 11/27 - 12/3

Reading (required): Programming from the Ground Up (Bartlett) 4, 9, F

Reading (recommended): Programming from the Ground Up (Bartlett) 5, 6, 7, 8, 11, 12, 13, C

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 2: Instruction Set Reference

Precept 19: (Monday/Tuesday) Assembly Language: Functions, Gdb (Part 2)

Lecture 19: (Tuesday) Function Calls in Assembly Language (cont.)

Precept 20: (Wednesday/Thursday) Assemblers and Linkers; Machine Language

Lecture 20: (Thursday) Assemblers and Linkers

(Sunday) UNIX Commands in Assembly Language Assignment Due


Week 13: 12/4 - 12/10

Reading (recommended, for reference only): Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification

Precept 21: (Monday/Tuesday) The Buffer Overrun Attack Assignment

Lecture 21: (Tuesday) Operating Systems: General Concepts

Precept 22: (Wednesday/Thursday) UNIX Signals and Alarms

Lecture 22: (Thursday) Operating Systems: Security

(Sunday) Buffer Overrun Attack Assignment Due


Week 14: 12/11 - 12/17

Reading (required): The Practice of Programming (Kernighan & Pike) 7, 8

Precept 23: (Monday/Tuesday) Gprof; The Execution Profiler Assignment: Simplified Version

Lecture 23: (Tuesday) Operating Systems: Signals and Alarms

Precept 24: (Wednesday/Thursday) The Execution Profiler Assignment: Complete Version (no handouts)

Lecture 24: (Thursday) Portable Programming; Course Wrap-Up


Week 15: 12/18 - 12/24

(Monday - Sunday) Winter Break


Week 16: 12/25 - 12/31

(Monday - Sunday) Winter Break


Week 17: 1/1 - 1/7

(Monday - Sunday) Winter Break


Week 18: 1/8 - 1/14

(Monday - Sunday) Reading Period


Week 19: 1/15 - 1/21

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Execution Profiler Assignment Due

(Wednesday - Sunday) Final Examinations


Week 20: 1/22 - 1/28

(Monday - Saturday) Final Examinations

(Monday, Tuesday) Exam Prep Sessions

(Thursday) Final Examination, 9:00 AM, Friend Center 101 (Exams from Previous Semesters)


All lecture notes are copyright 2001, 2002, 2003, 2004, 2005, 2006 by David August, Vivek Pai, Jennifer Rexford, Kai Li, Andrew W. Appel, Thomas Funkhouser, David R. Hanson, Larry Peterson, and/or Randolph Wang. All precept handouts are copyright 2001, 2002, 2003, 2004, 2005, 2006 by Robert M. Dondero, Jr. Permission to reproduce these notes for not-for-profit educational purposes is hereby granted. These notes may not be reproduced for commercial purposes without the express written consent of the author.