CS 5314: Concepts of Programming Languages
Spring 2016
Study Homework: Lambda Calculus and Virtual Method Problems

1. Evaluate the following lambda expressions. Note: we use "^" to denote lambda here.

2. Analyze the following lambda-expressions and tell which variables are
free or bound in each expression.

3. Give an example of a lambda expression that would evaluate differently if we used call-by-value versus call-by-name. Do not use any examples from the class notes as your answer!

4. Examine the following Java program and for each call, tell what method is the actual target of the call.

class A {  public z(E e) {...} }
class B extends A 
{  public void z(E e){...};
   public void z(F f) {...}'
class C extends A
{  public void z(F f){..}
class E{...}
class F extends E{...}

E e = new E();
F ff = new F();
A a = new A();
A ab = new B();
A ac = new C();
B b = new B();
C c = new C();


last changed at 12:08pm on April 25, 2016 BGR