Study Guide 3
Covers 2.4, 2.6
2.4 Kernel language semantics
- How does static scope of variables behave differently from dynamic scope?
- Give two reasons why static scoping is better as a default.
- When is dynamic scope useful?
- What happens in the environment when a procedure with external references is called?
- What is the difference between an unbound variable versus a free identifier?
- Given a fragment of code, know how to determine which identifiers are free and which are bound.
- How can the semantics of a local statement be expressed using a combination of procedure values and procedure calls? Can the inverse be done? Why or why not?
- How can the semantics of a case statement be expressed using an if statement, or vice versa?
- Can you think of a way to express the semantics of a skip using one or more other statements in the kernel language?
2.6 From kernel language to practical language
- What syntactic conveniences and linguistic abstractions does the full declarative Oz language offer, and how do they map to the kernel language?
- What is the meaning of the nesting marker?
- When function calls are nested inside of data structures, which is executed first: the construction of the data structure or the function call? Why is the order important?