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 representation∗ Effects of recursion, variable-sized data, functional values– Inheritance∗ Single vs. multiple inheritance∗ 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– Terminology: derivation– Syntax-driven translation• Static semantics– Symbol tables, relation to block structure– Types, type inferenceLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 3Translation of Programming Languages, contd.• Code generation• Runtime representation s for “special effects”– Exceptions– Procedure calls– Object-oriented method dispatch– Garbage collection• Optimization– Terminology: basic blocks, control-flow graph– “Classical” 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 generators, rule-based programmingLast modified: Mon May 9 10:36:21 2005 CS164: Lecture #44 5Construction of Complex Software• Be familiar with project, including parts you didn’t write.• Concept of a “pass”• Use of object-orientation to partition task• Importance of intermediate for ms; how us ed 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