3.20 Type Inference
Complete this assignment with Team Three.
You must submit this in an archive named "wtypei.zip". This archive must contain a folder named "wtypei". This folder must contain all the files specified below. You must attach "wtypei.zip" to an email whose subject is "BYU - Fall 2011 - CS 330 - wtypei" and whose message body contains the name of everyone on your team (each on a separate line.) You must send this email to jay@cs.byu.edu before 5pm (Provo time) on 12/1. Ensure that what you are satisfied with what you submit, because only your chronologically first submission will be graded. Ensure that you follow these instructions exactly, since submissions that do not meet these requirements (i.e. do not have the correct format) will receive no credit, despite the time and energy you put into the assignment. Please see Turn In Policy for more information.
You must submit this in a file named "wtypei.pdf".
3.20.1 Constraint Generation and Satisfaction
Generate constraints for this program. Isolate the smallest set of these constraints that, solved together, identify the type error.
Feel free to label the sub-expressions above with superscripts for use when writing and solving constraints.
3.20.2 Type Inference
{fun {f : B1} : B2 {fun {x : B3} : B4 {fun {y : B5} : B6 {cons x {f {f y}}}}}}
3.20.3 Application
In 850 words or less, describe if and how your knowledge of type inference will help you in your future programming practice. Good answers might discuss how this concept can be applied in interesting programming environments or how knowledge of its subtleties clarifies or improves existing practices, techniques, tools, etc.