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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!