This is the last of the assignments developing wiki pages for your languages. The two topics for this one are functions and memory management.
Functions - develop a wiki page for each of your languages that gives
examples of function calls and function definitions. Topics your page
needs to address include the following.
- Syntax of a function definition.
- Syntax of a function call.
- Use of functions in expressions.
- Use of function labels as l-values.
- Function side-effects.
- Semantics of a function call, similar to prior semantics descriptions.
- Describe the memory management capabilities of your languages. Give examples of memory allocation and de-allocation (if applicable). Discuss the kind of information about allocated memory the system must maintain in order to implement the memory management scheme.
- Describe functions and memory management for a third language.
- For the memory management example, try writing a functionally equivalent example in C, explicitly handling the kinds of information required for the memory management system of your chosen language.
- Dig into the documentation for your language and see if you can figure out exactly how the system implements functions. What is in the activation record? How does it keep track of static context?
The writeup for this week is the assignment itself, plus the code, which should be integrated with your writeup. Once you have written up your assignment, give your main page for this week the label: