Final exam study guide ====================== Language design: Computer languages allow humans to communicate effectively in many domains. Expressivity in these various domains is what makes different languages appropriate for each of these domains. The spectrum between interpreters and compilers. REPLs. Compilation: lexical analysis, syntax analysis, semantic activities, code generation. Lexical analysis: breaking up the wall of text; regular expressions; context-free grammars; parsing and parse trees; recursive descent and recursive generation; bottom-up parsing and stacks Names: what's in a name? when is a name bound? what is a scope? Organizing memory allocations: heaps, stacks, and static allocations. Modern ideas about heaps. Scoping at various levels: statement/expression blocks, nesting, declarations and ordering, modules, associating types and classes with modules, dynamic scoping; aliases and overloading. Binding: subroutine closures, first-class values, object closures Macro expansion Semantics: attribute grammars, evaluating attributes, actions in a grammar, tree grammars Control flow: expression issues: precedence and associativity, assignment, initialization, ordering within expressions, short-circuits; structured and unstructured control flow; continuations; selection issues: if/then/else, case/switch; iteration constructs; recursion and iteration; applicative order and normal order evaluation Types: meaning of "type"; polymorphic issues, orthogonality, classification of typing; type equivalence, duck typing; type compatibility; type inferencing. Parametric polymorphism and generics. Composite types: records and structs; syntax, shortcuts, and abbreviations; memory layout; unions and variant records; arrays. Strings. Pointers and recursive types: dangling references, dynamic allocation issues and garbage collection. Subroutines and control abstraction: Calling sequences, epilogues, and prologues; parameters and passing parameters; coroutines. Objects: the origins of object orientation and its philosophy; initialization and destruction; dynamic method binding. Functional languages: foundations; lambda calculus, evaluation ordering; high-level functions and first-class properties. Logic languages: the weaknesses and strengths; appropriate areas of application.