Instructions: Please solve the questions using pen and paper and scan the images. Every image should contain your roll number and name.
- Derive the type of each lambda expression. Show all derivation steps.
[3 * 5 = 15]
- Given E0 y : bool :
y := true
- Given type constants func1 : A B and func2 : (C B) :
(x : A).(func1 x);(q : C).(func2 q)
- Given | be a constant of type Bool Bool Bool and type of true is Bool ( : Bool ). (x : Bool). ( (x | true))
- Given + is type constant with the type S
(f : S C). (x : S). f(+x)
- Given E0 = {x : Ref Bool, y : Bool} and the constants succ : Int Int, true : Bool, 4 : Int :
succ 4; x := true
- Derive the type of each of the following expression. Any assumptions are welcome. [5 * 2 = 10]
- Given the type of is Float Integer
((p : Float Integer). (f : Float Float). (y : Float). p (f (f y)))
- Given be the constant with the type Bool Bool Bool and true with the type Bool (func1 : Bool Char). ( : Bool). func1 ( true)
1

![[Solved] CS40032 Assignment 3- Typed -Calculus](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] CS40032 Assignment 2 -Calculus](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.