Exam I Study Guide

advertisement
CSCE 4313 Programming Languages - Exam I Study Guide
Chapter 1 Overview (pp1-20) – languages (assembly languages, higher level programming,
natural, markup, gesture, …), paradigms (imperative, OO, functional, logic, database
algebra/calculus SQL/1976, spreadsheet/1978, O/S command line, GUI, Web, event-handling,
concurrency, aspects), history (see below), translators, compilers, interpreters, scripting, virtual
machines e.g. JVM, byte codes, language design, syntax, semantics, pragmatics, standards,
implementation decisions
Chapter 2 Syntax (pp 23-54) – Chomsky grammar hierarchy/1957: regular, context free CFG,
context sensitive CSG, unrestricted. Backus-Naur Form BNF/1960, grammar = {rules, nonterminals, terminals, start symbol}, language, derivation, parse tree, precedence, ambiguity,
identifiers, literals/constants, keywords, operators, punctuation, linking syntax and semantics.
Chapter 3 Lexical and Syntactic Analysis (pp 57-82) – more Chomsky grammar hierarchy,
translator architecture: {string in source language => LEXER => tokens => PARSER => parse
tree => OPTIMIZE => parse tree => TRANSLATE => string in target language}, LEX and
YACC generators, regular expressions, finite state automata, top down aka recursive descent
parsing, bottom up parsing
Chapter 7 Semantics (pp 153-181) – expressions, assignment, state, copy vs reference
semantics, control flow, sequence, conditionals, loops, iterators, GO TO controversy, I/O,
streams, formats, random access I/O, exceptions
Chapter 12 Imperative Programming (pp 277-286) – assignment, expressions, control
structures, input/output, procedural abstraction, libraries, exception handling, Fortran/1950,
COBOL/1959, Algol/1963, PL/I/1964, Pascal/1970, C/1972, Ada/1983, Perl/1987
Chapter 13 Object-Oriented Programming (pp 309-332, 340-341) – abstract data type,
encapsulation, information hiding, class, client of a class, methods, messages, behavioral
abstraction, visibility, public, private, class hierarchy, (single vs multiple) inheritance,
polymorphism, interfaces, run time type identification, reflection, Smalltalk/1972, C++/1983,
Common Lisp/1984, Python/1991, Java/1995, C#/2000
Chapter 14 Functional Programming (pp 361-377, 267-269, 271-273)– Lisp/1958, lambda
calculus, syntax, s-expr, atoms, interpreter, read-eval-print loop, lists, functions, quote, (set ‘a
‘b), car/cdr/cons/member, (defun f (args) body), (if expr then-fn else-fn) or (cond/case ((expr)
…)…), (trace f), recursion, memory management via list heap and atom arrays, garbage
collection via mark and sweep, Scheme/1975, Haskell/1990
Chapter 15 Logic Programming (pp 413-430,433-436) – knowledge representation, predicate
calculus, Horn clause, Prolog/1972, syntax, fact, rule, goal, constant, variable, instantiation,
success, failure, consult(file), trace(pred/arity), backtracking, lists [a,b], cut operator !, closed
world assumption,assert, natural language parsing and generation, CFG mapping to Prolog, -->
macro
Second Life (HW2) – building and scripting
Term Projects (HW3) – four teams (import-export, workflow, infrastructure, mirror
world/applications), what do these areas have to do with programming languages, what concepts
or languages are involved.
Download