Question: Problem 5 [14pt] Consider the simply typed A-calculus and its typing rules defined in Note 4 (with type inference) a) (7pt) What constraints are generated
![Problem 5 [14pt] Consider the simply typed A-calculus and its typing](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4580f16d73_35866f4580eaa906.jpg)
Problem 5 [14pt] Consider the simply typed A-calculus and its typing rules defined in Note 4 (with type inference) a) (7pt) What constraints are generated for the term ( z. ( y)) if we use the type system defined in Note 4? Justify your answer by writing down the proof tree for this term. b) (7pt) Suppose that during type inference, a compiler generates the following constraints to be solved: Solve those constraints by the unification algorithm in Note 4. You need to write down the steps during constraint solving. Problem 5 [14pt] Consider the simply typed A-calculus and its typing rules defined in Note 4 (with type inference) a) (7pt) What constraints are generated for the term ( z. ( y)) if we use the type system defined in Note 4? Justify your answer by writing down the proof tree for this term. b) (7pt) Suppose that during type inference, a compiler generates the following constraints to be solved: Solve those constraints by the unification algorithm in Note 4. You need to write down the steps during constraint solving
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
