Written work 7
Due on March 29th @ 3:00 PM (in class, to Drew, or at Engineering front office)
Not accepted late
Question 1

Show the AST for the following code snippet, with each appropriate node annotated with its type

int a(int arg){
	int[2] p;
	return p[2]+arg;
int b(){

Question 2

Explain why a purely pass-by-reference language (i.e. a language in which ALL arguments are ALWAYS passed by reference) cannot handle constants for arguments.

Question 3

Is type analysis sound or complete? Justify your answer.

Question 4

Describe what an lvalue is. Give an example of a c program that issues an error message about lvalues.