Due on March 29th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
Due on March 29th @ 3:00 PM (in class, to Drew, or at Engineering front office) |
Not accepted late |
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(){ a(7); }
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.
Is type analysis sound or complete? Justify your answer.
Describe what an lvalue is. Give an example of a c program that issues an error message about lvalues.