[Solved] CS40032 Assignment 3- Typed -Calculus

$25

File Name: CS40032_Assignment_3__Typed__Calculus.zip
File Size: 348.54 KB

SKU: [Solved] CS40032 Assignment 3- Typed λ-Calculus Category: Tag:
5/5 - (1 vote)

Instructions: Please solve the questions using pen and paper and scan the images. Every image should contain your roll number and name.

  1. 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

  1. 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

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS40032 Assignment 3- Typed -Calculus[Solved] CS40032 Assignment 3- Typed -Calculus
$25