120 likes | 135 Views
Explore the history, syntax, and semantics of programming languages, covering key concepts like types, expressions, control structures, and subprograms. Delve into functional and logic programming paradigms, including Haskell and Prolog. Prepare for the final exam with comprehensive reviews of chapters 1-3, 5-10, 15-16.
E N D
Final Review In Text: Chapters 1-3, 5-10, 15-16
Ch. 1: Introduction • Why study PLs? • Language evaluation criteria • Two main influences on PL design • 5 paradigms • Implementation strategies Final Exam Review
Ch. 2: History and Evolution • What are the major contribution(s) of each language? • Examples: • Support for recursion • Introduction of block structure • First in a paradigm • First formally described syntax • Etc. • Most important to review: FORTRAN, LISP, ALGOL Final Exam Review
Ch. 3: Syntax and Semantics • BNF & EBNF • What makes a grammar ambiguous? • How do you disambiguate a grammar? • What does it mean for two grammars to “generate the same language”? • Operational semantics • Axiomatic semantics • Applying axiomatic semantics to code segments • Loop invariants, 5 criteria • Denotational semantics Final Exam Review
Ch. 5: Names and Binding • What are the six attributes? What do they mean? • Binding and possible binding times • Type checking • Two type compatibility methods • Scope vs. lifetime Final Exam Review
Ch. 6: Data Types • Primitive types • Type constructors: • Arrays • Records • Unions • Sets • Pointers • Design issues • Type checking issues Final Exam Review
Ch. 7: Expressions • Precedence rules • Associativity rules • Order of operand evaluation • Type conversions: widening and narrowing • Type coercions vs. explicit conversions • Mixed-mode expressions • Relational and boolean expressions • Short-circuit evaluation Final Exam Review
Ch. 8: Control Structures • Design issues • Selection • One-way • Two-way • Multi-way • Iteration • Counter-controlled • Logically-controlled • Gotos • Guarded statements Final Exam Review
Ch. 9: Subprograms • Definitions • Referencing environment • What are the common parameter passing modes and mechanisms? • Independent vs. separate compilation • Advanced subprogram issues Final Exam Review
Ch. 10: Implementing Subprograms • Activation records • Accessing locals • Accessing nonlocals (static scoping) • Static chains • Displays • Implementing blocks • Accessing nonlocals with dynamic scoping Final Exam Review
Ch. 15: Functional Programming • What are the hallmarks of FP? • Definition of FP terms • Haskell syntax • You may have to write a Haskell function Final Exam Review
Ch. 16: Logic Programming • What are the hallmarks of LP? • Definition of LP terms • Prolog syntax • You should be able to read Prolog code • You’ll have to write at least one Prolog predicate Final Exam Review