

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Dr. Ferucio Laurent¸iu T¸ IPLEA Visiting Professor School of Computer Science University of Central Florida CSB # Orlando, FL 32816- Tel: (407) 823- E-mail: [email protected]
COP 5021 (Program Analysis) Spring 2006
Assignment #1 recursive programs/denotational semantics
Let B = (T 0 , V, F) be a basis satisfying:
Let I be the interpretation given by:
(a) t = 3 < x; (b) t = [λx.3 + x]; (c) t = λx.3 + x; (d) t = [λF.F (3, x)]; (e) t = λF.F (3, x); (f) t = [λx, y.x + y];
(g) t = [λx.[λy.x + y]]; (h) t = [λx.[λx.x + y]]; (i) t = λx.[λy.x + y]; (j) t = [λx.λy.x + y].
(a) (S, 1)
F 1 (x) ⇐ if x = 0 then 0 else F 2 (x − 1) F 2 (x) ⇐ if x = 0 then 1 else F 1 (x − 1)
(b) (S, 1)
F 1 (x) ⇐ if x = 0 then 1 else F 1 (x − 1) + F 2 (x − 1) F 2 (x) ⇐ if x = 0 then 0 else F 2 (x + 1)
(c) (S, 1)
F 1 (x) ⇐ if x > 100 then x − 10 else F 1 (F 2 (x + 11)) F 2 (x) ⇐ if x > 100 then x − 10 else F 2 (F 1 (x + 11))