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

3.2. Meeting outlines and code

  1. Lecture 1 was introductory
  2. Lecture 2 meeting outline, lec0102.hs (code)
  3. Lecture 3 meeting outline.
  4. Lecture 4 meeting outline, primes.hs, base60.hs
  5. Lecture 5 notes, wordpuzzle.hs, words.txt, wordssmall.txt, wordsfail.txt
  6. Lecture 6 meeting outline, fibmemo.hs
  7. Lecture 7 meeting outline, binarytree.hs
  8. Lecture 8 meeting outline. (code: binarytree)
  9. Lecture 9 meeting outline. myMaybe.hs
  10. Lecture 10 meeting outline. io1.hs,io2.hs,io3.hs,io4.hs,io5.hs
  11. 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

  1. Miran Lipovača: "Learn You a Haskell for Great Good!," No Starch Press (April 2011).
  2. Bryan O'Sullivan, John Goerzen, Donald Bruce Stewart. "Real World Haskell", O'Reilly Publishers, 2008.
  3. Graham Hutton, "Programming in Haskell", 2007.
  4. 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

  1. Dave Thomas, Andy Hunt, Chad Fowler "Programming Ruby", 4th ed., Pragmatic Bookshelf, 2013.

An advanced book in Ruby is:

  1. Paolo Perrotta, "Metaprogramming Ruby", Pragmatic Bookshelf, 2013.

Created: 2024-09-18 Wed 14:13

Validate