• Keine Ergebnisse gefunden

Task3:Universalquantificationintermsofexistentialquantification Task2:Derivationtreewithexistentialtypes Task1:Infinitestreams Homework12–WS18 ProgrammingLanguages2

N/A
N/A
Protected

Academic year: 2022

Aktie "Task3:Universalquantificationintermsofexistentialquantification Task2:Derivationtreewithexistentialtypes Task1:Infinitestreams Homework12–WS18 ProgrammingLanguages2"

Copied!
1
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 12 – WS 18

Tübingen, 24. 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 31, 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: Infinite streams

Consider the type {∃S,{seed : S,step : S → {Nat, S}}} as the type of infinite streams of natural numbers. Define a term that given two streams of natural numbers returns a stream of pairs of natural numbers by zipping the two streams pointwise.

The term should have type:

{∃S,{seed :S,step :S→ {Nat, S}}} → {∃S,{seed :S,step :S→ {Nat, S}}} → {∃S,{seed :S,step :S→ {{Nat,Nat}, S}}}

Task 2: Derivation tree with existential types

Show that your term from Task 1 indeed has the required type by drawing a derivation tree.

Task 3: Universal quantification in terms of existential quantification

In classical logic we have that∀x.A↔ ¬∃x.¬A. Which problem do you encounter when you try to re- moveall universal quantification from a program by replacing it by existential quantification exploiting this equivalence?

Referenzen

ÄHNLICHE DOKUMENTE

Drone advocates generally point to three technical advantages of unmanned systems: (1) drones minimize the risk to the life of the pilot; (2) drones are not subject to natural human

Zavershynskyi, “On the complexity of higher order abstract Voronoi dia- grams,” Proceedings of the 40th International Colloquium on Automata, Languages and Programming (ICALP’13),

Then the number of swtiches in the first k positions for 2N consecutive per- mutations ist at most kn. In other words, the number of ≤ k-sets of n points is at

Let the reduction relation −→ and the function size for terms in untyped lambda calculus be defined as in

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, January 10, either via email to Philipp Schus- ter (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

In the second part some effective representations of the open subsets of the real numbers are introduced and

In the second part of this section we consider an equation that determines the limit of the empirical measures and give a theorem concerning existence and uniqueness of the