CS 313  Fall 2012
Programming Languages
Announcements

Course wrapup and short quiz on Thursday 12/6.
Assignments
 Homework 1 (grammars) due Tuesday 9/18 in class.
(Solutions)
 Homework 2 (Pascal) due Tuesday 9/25 in class.
(Solutions)
 Homework 3 (C) due Tuesday 10/2 in class.
(Solutions)
 Homework 4 (Pascal/C/Python) due Tuesday 10/9 in class.
(Solutions).
 Homework 5 (Smalltalk/Python) Part 1 due Thursday 10/18,
Part 2 due Thursday 10/25.
(Solutions).
 Homework 6 (Scheme) due Tuesday 11/6 in class.
(Solutions).
 Homework 7 (Scheme) due Tuesday 11/13 in class.
(Solutions).
 Homework 8 (ML) due Tuesday 11/20 in class.
(Solutions).
 Homework 9 (Prolog) due Thursday 11/29 in class.
(Solutions).
 Homework 10 (various) due Friday 12/7 at midnight.
Lectures & Readings
 Tuesday 9/11  Course introduction, syntax vs. semantics,
contexfree grammars,
expressions, pre/in/postfix (Ch 1, 2)
 Thursday 9/13  Expression grammars,
History of programming languages
(Ch 1, Slides)
 Tuesday 9/18  Pascal,
hello.p,
max1.p,
max2.p
(Ch 2.5, 3.14, 4.14, 15.1,
Pascal Tutorial)
 Thursday 9/20  Quiz; Pascal pointers, parameter passing, scope, activation records,
makemaze.p,
stack.p,
qsort.p
(Ch 4.7, 5.24, 15.2)
 Tuesday 9/25  C functions, pointers, arrays,
division.c,
stack.c
(Ch 4.8, 15.2)
 Thursday 9/27  C structs, strings, I/O,
wordcount.c,
itob.c
(Ch 4.8, 15.2)
 Tuesday 10/2  Python lists, functions; Intro to OO programming,
test.py,
matrix.py
(Ch 5.57)
 Thursday 10/4  Quiz; Smalltalk,
lab: README,
Smalltalk/X
(tutorial,
method list) (Ch 7.7, 15.4)
 Tuesday 10/9  Smalltalk method and class definition,
MyQueue
 Thursday 10/11  Smalltalk: class vs. instance methods, linked list,
IntList (Ch 7.78)
 Tuesday 10/16  Midterm recess  no class
 Thursday 10/18  Midterm exam  in class
 Tuesday 10/23  Python: classes, inheritance, modules, tuples, string
formatting,
point.py,
rect.py,
square.py
 Thursday 10/25 
Functional programming, intro to Scheme (Ch 10,
R5RS,
mitscheme,
other tutorials)
 Tuesday 10/30  Scheme: lists, quoting, list functions,
tail recursion,
sample.scm,
tailrec.scm
(Ch 10.13, 10.6, 15.6)
 Thursday 11/1  Scheme: higherorder functions,
lambda, let, equivalence predicates,
sumfun.scm,
numderiv.scm
(Ch 10.13, 10.6)
 Tuesday 11/6  Scheme: Symbolic differentiation,
deriv.scm
 Thursday 11/8  Intro to ML
(Ch 10.45, 8.14, 15.5)
 Tuesday 11/13  ML: let expressions, lists, function definitions by cases,
datatypes, sample.ml
(Ch 8.5, 9.12, 9.5,
handout)
 Thursday 11/15  ML: higherorder functions, Curried functions, map, filter, reduce
(Ch 9.5, 9.3)
 Tuesday 11/20  Logic Programming, intro to Prolog,
SWI Prolog,
family.pl,
family2.pl,
Pete's puzzle,
pete1.pl
(Ch 11.12)
 Tuesday 11/27  Prolog: lists, list functions,
tail recursion, binary search trees,
fib.pl,
bst.pl
(Ch 11.34)
 Thursday 11/29  Prolog: rule order, goal order,
execution model, unification
 Tuesday 12/4  Prolog: control, cut,
pete1a.pl,
negation;
searching with Prolog and Scheme,
goat.pl,
goat.scm
(Ch 11.56)
 Thursday 12/6  Postscript,
examples,
Adobe's "Blue book",
Tcl/Tk,
examples,
Course summary
Related Links