CS 457 Functional Languages

Credit Hours: 4
Course Coordinator: Andrew Tolmach
Course Description: Introduction to functional notation, recursion, higher-order functions, reasoning about functions, and models for the evaluation of applicative expressions. Use of functional languages. Prerequisites: CS 202, 311.
Prerequisites: Expected background of a senior or graduate student in CS.
Goals: Ability to solve programming problems with a functional language;
basic understanding of theoretical foundations of the functional paradigm.

Upon the successful completion of this course students will be able to:

  1. Describe the key characteristics of the functional paradigm.
  2. Use a functional language to write simple programs manipulating lists and trees.
  3. Use higher order functions, including maps, folds, and composition, to perform tasks on lists.
  4. Define algebraic datatypes to model useful domains.
  5. Define and use appropriate higher order functions on arbitrary algebraic data types.
  6. Illustrate how higher-order function values can be used to store data.
  7. Convert functional abstract data type specifications into implementations.
  8. Prove properties of simple functional programs using equational reasoning and induction.
  9. Explain and use polymorphic functions and data types, and interpret type error messages.
  10. Write functional programs that perform I/O, using either monadic or direct methods.
  11. Explain the differences between eager and lazy evaluation, and their significance.
  12. Write programs using simple infinite data structures.
  13. Explain the basic implementation considerations for a functional language.
  14. Design and implement a non-trivial application program in a functional language.
Example Textbooks: Haskell: The Craft of Functional Programming, 2nd ed., Simon Thompson, Addison Wesley, 1999.
References: On-line user and reference manuals for the programming language compilers used in the course.
Major Topics:
Functional paradigm
Algebraic data types and recursion
Polymorphism
Higher-order functions
Program transformation
Monads
Laziness
Type checking
Laboratory Exercises: Haskell programming exercises (6, 1 week each)
Large application program in Haskell (4 weeks)

CAC Category Credits Core Advanced
Data Structures
Algorithms
Software Design 1.0
Computer Architecture
Programming Languages 3.0

Oral and Written Communications: None.
Social and Ethical Issues: None.
Theoretical Content: Lambda-calculus (0.5 week)
Type systems and monads (1.5 week)
Evaluation semantics (1 week)
Problem Analysis: The large project will require students to define a computing problem (based on a suggested list or of their own invention), analyze it, and program a solution in a functional language.
Solution Design: Many of the homework exercises, and the course project, will require students to design functional language solutions (including design of data structures and algorithms) for set problems.