In this assignment, you will build a type inferencer for MiniML. Your type inferencer should handle the full MiniML language, including recursive functions, polymorphic functions, nested polymorphic functions, and equality types, except for the following restrictions:
You can start the assignment from the version of MiniML in /cse/courses/cse505/02au/hw3. This is the same interpreter as used in the second assignment, with the following changes:
Your job is to provide implementations of the stubbed-out functions in unify and typecheck. You don't have to use any of our code if you don't want to, but given all the subtleties in performing type inference in the face of nested polymorphic functions and non-generalizable type variables, equality types, circular unification constraints, etc., you'll want to understand things carefully before you launch off in your own direction. Also, you should carefully read the unify.sml and typecheck.sml files to understand how the unification data structures work and how to use them in the typecheck functions. Feel free to ask questions of Craig or Todd to clarify your understanding (Craig wrote the code this time).
As with the previous assignment, we have produced an executable of our sample solution, for Linux and Solaris systems:
sml @SMLload=MiniML.x86-linuxThis will start up the MiniML interpreter directly.
The first person who finds a bona fide bug in the type inferencer sample solution wins a $1 prize.