Course SummaryProgramming LanguagesTranslation of Programming LanuagesTranslation of Programming Languages, contd.ToolsConstruction of Complex SoftwareOther Applications of Static AnalysisCourse Summary• Programming Languages• Translation of Programming Languages• Tools• Construction of Complex Software• Other Applications of Static AnalysisLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 1Programming Languages• Scope of declarations• Scope vs. extent (lifetime) of variables• Interactions between language design and runtime structures:– Function repre sentation∗ Effects of recursion, variable-sized data, functional values– Inh eritance∗ Single vs. multiple inher itance∗ Java-style interfaces• Example: Pyth and Python: compare and contrastLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 2Translation of Programming Lanuages• Lexical analysis– regular expressions, finite automata• Context-free syntax– BNF– Top-down, recursive descent– Bottom-up, shift-reduce parsing– Ter minology: derivation– Syntax-driven translation• Static semantics– Symbol tables, relation to block structure– Types, type i nferenceLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 3Translation of Programming Languages, contd.• Code generation• Runtime representations for “special effects”– Exceptions– Procedure calls– Object-oriented method dispatch– Garbage collection• Optimization– Ter minology: basic blocks, control-flow graph– “Clas sical” optimizations– Structure of flow analysisLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 4Tools• Lexer-generation, use of regular expressions and states• Parser generator s, rule-base d programmingLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 5Construction of Complex Software• Be fa mil iar with project, including parts you didn’t write.• Concept of a “pass”• Use of object-orientation to partition task• Importance of intermediate forms; how used to reduce work ofporting compilersLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 6Other Applications of Static Analysis• Verifying program properties.• Insuring security of a platform (Java bytecode verifier)• Analysis that improves performance.Last modified: Mon May 9 10:36:21 2005 CS164: Lecture #44
View Full Document