Winter 2026, CSCI 512, Test 2 Review
Quick review: Chapters 3, 4, and 6 in your text.
This review is produced to help you study. This is
not a guarantee that all topics are listed in the
following topic review list.
Topic review:
- Chapter 3 -- Names, Scopes, and Bindings
- Binding times
- Object lifetime and storage management: global, stack, heap, garbage collectors
- Scope Rules: static, nested subroutines, nested scopes, ...
- Access to non-local objects, reference environments
- Declarations vs Definitions
- Modules, imports, exports, objects
- Dynamic scope
- Scope search rules
- Aliases, overloading, operator overloading
- Reference Environments: Deep vs Shallow bindings, closures
- First class, second class and third class values
- Macro expansions and issues with macros
- Chapter 4 -- Program Semantics
- Core idea of semantics, things not defined by a CFG
- Abstract Syntax Trees -- output of a parser
- Building an AST, checking semantics as part of AST building
- One pass compiler and operation
- Dynamic semantics vs Static semantics
- Chapter 6 -- Control Flow
- Order of operations is control flow
- expression evaluation -- precedence, associativity, parenthesis
- Issues with precedence in languages
- standard associativity
- language examples of precedence
- programmer defined precedence and associativity
- Assignment as operators in expressions
- language classes: pure functional, mostly functional, mostly imperative with functional features, imperative
- l-value, r-values, assignment issues
- Orthogonality of features
- Side effects and assignment
- Initialization
- Operator ordering
- Short circuit evaluation
- Assembly language flow control
- Goto statement, issues, "goto letter", goto from deep in code
- Functions as flow control
- Exception methods, deep returns
- Continuations
- Sequencing
- Selection, if statements (varieties), switch/case statements
- Iteration, logic controlled, enumeration controlled
- Various looping constructs in languages
- Iterators, iterator functions, iterator classes
Example questions:
- A Pascal for loop looks like: "for cv := e1 to e2 do s;"
- e1 and e2 are both evaluated at loop entry
- e1 is evaluated at loop entry, e2 is evaluated before each time through the loop
- cv is a read only "variable".
- s is always executed at least once.
- What is a continuation?
- Explain an access method to non-global, non-local variables in a language with nested procedures and functions.
Last modified: Jan 26, 26