Exam 2 Topics - Fall 2010


Updates: Last modified on


  1. Material:
    1. Chapter 4: Lexical Analysis
    2. Chapter 4: Names, Binding, Scope
    3. Python

  2. Chapter 4 (and possibly a little grammars from Chapter 3): Part 1 - Lexical Analysis
    1. Lexical vs syntactic: define each and describe relationship between

    2. Lexical analysis

  3. Chapter 5: NAMES, BINDINGS, TYPE CHECKING, SCOPE
    1. Memory allocation and organization:
      1. flat vs 3 areas
      2. 3 areas
      3. lifetime
      4. alloc and dealloc
      5. aliases
    2. Identifiers: Issues
    3. Variables
      1. 6 characteristics: name, address, value, type, lifetime, scope
      2. how characteristics designed in common languages
    4. Bindings:
      1. concept, possible times, static vs dynamic,
      2. for all six characteristics
      3. early vs late binding
    5. Anonymous variables
    6. Values: l-value, r-value
    7. Lifetime: static, heap dynamic, ...
      1. History sensitive
      2. Pros and Cons
    8. Types
      1. strong typing: definition, value, common languages
      2. static vs dynamic typing
      3. type compatibility: name vs structure
    9. Scope
      1. definition
      2. nested and blocks
      3. static vs dynamic
      4. vs lifetime
    10. Constants: dynamic binding, degree of protection
    11. Initialization: def, when, number of times, default

  4. Python:
    1. basic syntax
    2. type model
    3. Sequences:
    4. scalars
    5. list operations
    6. Dictionary
    7. Def functions
    8. scope