Revised April 28, 2011

CS 145: Designing Functional Programs (advanced version)


(Emphasized text represents additional material not found in CS 135.)

Goals

Logistics

Intended for 1A students in the Faculty of Mathematics. Normally available Fall.

Related courses (see calendar for official details)

Successors: CS 146, 136, 116.
Conflicts: CS 115, 135, 137, 138.
Software used: Racket (dialect of Scheme).

Typical Reference(s)

M. Felleisen, R. Findler, M. Flatt, S. Krishnamurthi, How To Design Programs.

Required preparation

The main prerequisites for CS 145 are aptitude and enthusiasm. Prior experience is not required. Instructor consent is required unless the student has achieved a mark of 80 in the Euclid contest, or Honourable Mention or above on the senior Canadian Computing Contest. Because of the lack of textbook support for much of the enrichment material, listening comprehension skills are more important than in CS 135 or the advanced Math courses.

Learning objectives

At the end of the course, students should have the ability to:

Typical syllabus

An introduction to functional programming

Function application and definition. Formal grammar and syntax. The substitution model. Types in Scheme. Conditional expressions. Structures. Lists. Types of recursion: structural, accumulative, generative. Recursion on lists and integers. Algorithm analysis.

Data abstraction

Immutable abstract data types. The table ADT. Association lists. Binary trees and binary search trees. Braun trees. Mutual recursion. Leaf-labelled and node-labelled trees. S-expressions. Simple interpreters.

Functional abstraction

Functions as values. Anonymous functions. Higher-order functions. Local definitions. Lexical scope. Interpreter implementations.

Accumulative and generative recursion

Termination arguments. Efficiency. Invariants. String processing. Graph algorithms.

Purely-functional data structures

Queues and deques. Braun heaps. Treaps.

Advanced programming

I/O in Scheme. Macros. Domain-specific languages. Continuations. Continuation-passing style.


Campaign Waterloo

David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1

Tel: 519-888-4567 x33293
Fax: 519-885-1208

Contact | Feedback: cs-uops@cs.uwaterloo.ca | David R. Cheriton School of Computer Science | Faculty of Mathematics


Valid HTML 4.01!Valid CSS! Last modified: Wednesday, 15-Feb-2012 10:21:29 EST


Menu:ShowHide