CSC 533: Organization of Programming Languages
Spring 2010

Test 1 Review


Overview and History programming paradigms: imperative vs. declarative machine language--> assembly language--> high-level languages language translation: compiled vs. interpreted evaluation criteria: readability, writability, reliability, ... key languages: FORTRAN, LISP, ALGOL, C, C++, Java Syntax and Semantics syntax BNF (EBNF) grammar, derivation, parse tree, ambiguity building precedence & associativity into grammar rules semantics operational, axiomatic, denotational Variables and Bindings static vs. dyamic binding variable attributes name: keyword vs. reserved word, naming conventions type: static (explicit or implicit) vs. dynamic binding type checking, coercion address: static vs. stack-dynamic vs. heap-dynamic (implicit or explicit) value: l-value vs. r-value scope & lifetime: static vs. dynamic scoping Data Types primitive data types integer, floating-point (decimal, fixed-point, rational, ...) boolean, character pointer used for indirect addressing, dynamic memory management dangling reference, garbage reference heap management: can allocate/deallocate in arbitrary order allocate/deallocate from free list memory reclamation: reference counts, garbage collection Partition & Copy vs. Mark & Sweep & Compactify complex data types string, enumeration, subrange array subscript types, subscript ranges, multi-dimensional allocation (static vs. fixed stack-dynamic vs. stack-dynamic vs. heap-dynamic) record/struct/class field access, accessibility, variant record/union Control and Subprograms control structures counter- vs. logic-controlled loops, branching subprograms subprogram linkage parameter passing: by-value, by-result, by-value-result, by-reference, by-name overloading functions/operators, templates implementation: activation records, run-time stack, dynamic & static links