Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Solution Proposal Functional Programming --Sheet 12 (a) Consider Y = #f.(#x.f (x x)) (#x.f (x x)). Then we have
 

Summary: Solution Proposal Functional Programming -- Sheet 12
Exercise 1
(a) Consider Y = #f.(#x.f (x x)) (#x.f (x x)). Then we have:
Y z
= (#f.(#x.f (x x)) (#x.f (x x))) z
# # (#x.z (x x)) (#x.z (x x))
# # z ((#x.z (x x)) (#x.z (x x)))
# # z ((#f.(#x.f (x x)) (#x.f (x x))) z)
= z (Y z)
(b) As z ((#x.z (x x)) (#x.z (x x))) reduces with # # to z (z ((#x.z (x x)) (#x.z (x x)))),
there is no chance to ever reach z ((#f.(#x.f (x x)) (#x.f (x x))) z). The reason is
that a term z (z (...)) can never reduce to a term z ((#f. ...) ...) with # # .
Note that one can apply # # ­reduction not only on the outermost application of a
#­abstraction to a term (i.e., (#f. ...) z), but also on the application (#x. ...) (...)
further inside the term. Nevertheless, there similar reasoning allows to conclude that
z (Y z) cannot be reached.
Exercise 2
(a) W(A 0 , #x. if x x)
W(A 0 + {x :: b 1 }, if x x)
W(A 0 + {x :: b 1 }, if x)

  

Source: Ábrahám, Erika - Fachgruppe Informatik, Rheinisch Westfälische Technische Hochschule Aachen (RWTH)

 

Collections: Computer Technologies and Information Sciences