{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 001 -...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ‘C——_—-———_.————————————— 53725;! kappa EWQH 1/2/ Fall 2007 Advanced Theory of Programming Languages Test #1 Name 1. (20 points) _..a')’ Draw a picture that explains the relation (8’ 9 T’) <: (S 9 T). I D b) Give a code segment in CH- or Java that requires the relation to be true (even though that code may not compile properly!) Be sure to highlight that portion of your code relevant to the relation and its usage. I? J. (10) Explain what the notation (((W, X) 9 Y) 9 Z) 9 <(S 9 T), (U 9 V)> means. I 7 33/ (10) In “How Do I Correctly Implement the equals( ) Method?”, Tal Cohen claims that equals( ) must satisfy certain properties. Name and deﬁne these properties. 51'. (20) The following function is given in the untyped k-calculus: kalba (b ﬂs tru) b What does the ﬁmction do and what is its common name? You may assume that the l 0 function is applied to the Booleans tru and/or ﬂs. Show the work you used to determine your answer. “VS. (20) Deﬁne Pair in the following way: 6 Pair := laththIa b Head := Ag.g(7ta_?tb.a) Tail := lggOtaJLbb) Prove the correctness of these deﬁnitions for Tail(Pa.ir p q). Be sure to underline that part of the expression involved in each evaluation. 6 (20) Write the type-checking rule in ; : 3/ 0 state ment using the same rule format as used for Conditional. Be careful Conditional 5 l- B: Boolean, 8 l— M: T, 8 l- N: T Sl—ithheMMlelsefN}: T 7. (Extra credit — 3 points) Give the name or the Unicode value for l- or |-. ow it is used is not worth any credit) 0 (calling it “half-ladder” or describing h ...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern