• Keine Ergebnisse gefunden

Task2:Selfapplicationistypeable Task1:SystemF Homework9–WS18 ProgrammingLanguages2

N/A
N/A
Protected

Academic year: 2022

Aktie "Task2:Selfapplicationistypeable Task1:SystemF Homework9–WS18 ProgrammingLanguages2"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Fachbereich Informatik

Programmiersprachen und Softwaretechnik

Prof. Dr. Klaus Ostermann

Responsible for the lab Philipp Schuster

philipp.schuster@uni-tuebingen.de

Programming Languages 2

Homework 9 – WS 18

Tübingen, 2. Januar 2019

In order to be admitted to the exam, you have to successfully submit your homework every week, except for 2 weeks. A successful submission is one where you get at least 1 point.

Handin Please submit this homework until Thursday, January 10, either via email to Philipp Schus- ter (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning of the lab.

Groups You can work in groups of up to 2 people. Please include the names and Matrikelnummern of all group members in your submission.

Points For each of the Tasks you get between 0 and 2 points for a total of 6 points. You get:

1 point, if your submission shows that you tried to solve the task.

2 points, if your submission is mostly correct.

Task 1: System F

We consider System F as presented in the lecture. Show that termthas typeT in contextΓ, where

t=λC. const [Nat] [C] 5 T =∀C. C→Nat

Γ = const :∀A.∀B.A→B→A, Nat, 5 : Nat Draw a derivation tree for the typing relation.

Task 2: Self application is typeable

Find suitable substitutions for the question marks, such that the following System F term is typeable in the empty context.

λX. λf : ?. f ? (f ?)

Draw a derivation tree for the typing relation.

(2)

Task 3: Type checker for System F

Implement a type checker for System F in a programming language of your choice. Do not try to write a parser but assume a representation of terms in memory. Examples for a representation of terms and types in Haskell and Java are on the website.

Seite 2/2

Referenzen

ÄHNLICHE DOKUMENTE

Hint: To avoid the following construction becoming excessively large, restrict the domain to vectors of states that can actually occur.. b) Construct the parity word automaton

Handin Please submit this homework until Thursday, October 25, either via email to Philipp Schus- ter (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

Handin Please submit this homework until Thursday, November 08, either via email to Philipp Schuster (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

Implement an algorithm that tests if two lambda terms are alpha equivalent in a language of your choice. This might turn out to be

Handin Please submit this homework until Thursday, December 13, either via email to Philipp Schuster (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

Handin Please submit this homework until Thursday, December 20, either via email to Philipp Schuster (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

Handin Please submit this homework until Thursday, January 24, either via email to Philipp Schus- ter (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

Es gibt in der UB Hildesheim seit über einem Jahr (Stand: Mai 2020) Beratungen und Schulungen (Coffee Lectures, Workshops und andere Veranstaltungen) zum