CSE230 Fa16 - Homework #4, Due Sunday, Dec 11, 2016 (23:59:59 PST)



> module Hw4 where

Instructions

To complete this homework,

  1. Download the virtual machine The VM contains everything you need to complete HW4.

  2. Open the hw4 folder on the desktop (or tar -zxvf hw4.tar.gz) or download Hw4.tar.gz to see files for each part:

  3. Fill in the code where noted.

  4. Package the files into Hw4.tar.gz by running make package.

  5. Submit by emailing Hw4.tar.gz to cse230@goto.ucsd.edu with the subject “Hw4”; you will receive a confirmation email after submitting.

Notes

Snapshots

The VM has a custom build of Liquid Haskell that snapshots each file you verify. We will use these snapshots to improve Liquid Haskell; the submission and snapshots will not affect your grade; the grade depends only on the final code submitted.

Emacs

We have also configured emacs to automatically run Liquid Haskell as you work. If you’re not already comfortable using emacs, feel free to run Liquid Haskell from the command-line, by:

$ liquid file.lhs

Problem 1: Type Inference

This problem is simply about extending the type inference algorithm we saw in lecture; there are no refinement types involved.

Problem 2: Refined Lists

Problem 3: MapReduce

Problem 4: KMeans Clustering

Problem 5: Interpreter