CS 350 2024-25 Semester I
Table of Contents
1. Aims of the course
To introduce students to alternative and important paradigms in programming including functional programming. To give an overview of programming language semantics for full-fledged programming languages and theoretical models like the lambda calculus.
2. Syllabus
We will cover the following two languages in a fair amount of detail, with emphasis on programming in these languages, and their semantics.
- Haskell (an example of a functional language)
- Ruby (an example of an Object-oriented language)
We will also discuss the fundamentals of functional languages using the untyped lambda calculus, with special emphasis on combinators, and simply typed lambda calculus, with emphasis on type inference.
In the past, we followed a text by van Roy and Haridi. Even though the text is good, the language Oz does not seem to be under active development. Some topics in this text will be adapted to the languages at hand. In particular, we will explain the Unification Algorithm using, perhaps a fictitious expression language to be described in class.
3. Notes
Lecture notes and code examples will be provided. The notes will be self-contained.
3.1. Comprehensive notes
- Notes on Haskell (this is comprehensive. In addition, there will also be outlines of individual lectures, and code we discuss in class, listed below.)
- A writeup about Monads
- A writeup about Monad Laws
- Notes on the \(\lambda\) calculus.
3.2. Meeting outlines and code
- Lecture 1 was introductory
- Lecture 2 meeting outline, lec0102.hs (code)
- Lecture 3 meeting outline.
- Lecture 4 meeting outline, primes.hs, base60.hs
- Lecture 5 notes, wordpuzzle.hs, words.txt, wordssmall.txt, wordsfail.txt
- Lecture 6 meeting outline, fibmemo.hs
- Lecture 7 meeting outline, binarytree.hs
- Lecture 8 meeting outline. (code: binarytree)
- Lecture 9 meeting outline. myMaybe.hs
- Lecture 10 meeting outline. io1.hs,io2.hs,io3.hs,io4.hs,io5.hs
- Lecture 11 meeting outline. (code: myMaybe.hs) (see also: A writeup about monads and Monad Laws)
4. Grading
Grading will be based on:
- 2 homeworks (individual effort) : 2x10 = 20 percent
- 1 project (team of up to 3): 1x15 = 15 percent
- best 2 out of 3 quizzes: 2x10 = 20 percent
- 1 midsem : 20 percent
- 1 endsem : 25 percent
5. Textbooks
The lecture notes will be self contained. We will follow contents from various books on Haskell including
- Miran Lipovača: "Learn You a Haskell for Great Good!," No Starch Press (April 2011).
- Bryan O'Sullivan, John Goerzen, Donald Bruce Stewart. "Real World Haskell", O'Reilly Publishers, 2008.
- Graham Hutton, "Programming in Haskell", 2007.
- Vitaly Bragilevsky, "Haskell in Depth", Manning, 2021
The primary online resource will be HaskellWiki: https://wiki.haskell.org
For Ruby, we will follow online material and books including
- Dave Thomas, Andy Hunt, Chad Fowler "Programming Ruby", 4th ed., Pragmatic Bookshelf, 2013.
An advanced book in Ruby is:
- Paolo Perrotta, "Metaprogramming Ruby", Pragmatic Bookshelf, 2013.