CS 641 meeting -*- Outline -*- * Introduction write the name of the course on the board. ** Who introduce self and meet everyone have them write names on board ** what is program analysis? ------------------------------------------ WHAT IS PROGRAM ANALYSIS? Def: *program analysis* is predicting statically safe approximations to the set of configurations or behaviors that may occur dynamically. ------------------------------------------ ** why study program analysis (course spec) ------------------------------------------ WHY PROGRAM ANALYSIS? Automatic understanding of programs is - important + optimizing compilers + program development tools + formal verification: - safety critical systems - business critical systems + research in programming languages - impossible, in general + safe approximations Basic ideas: - compute abstractions - use in transformations Goals: - little or no input from programmers ==> practical, usable - correctness ==> usable "under the covers" - efficient (at compile time): - time - space ------------------------------------------ Program analysis encompasses the core areas in the theory of programming language research, including type systems and program optimization and reasoning. Generally speaking, the bias is towards having no programmer input, which tends to lead to fairly global (whole-program) analyses. *** useful ideas ------------------------------------------ MAIN IDEAS OR THEMES - conservatism: "Err on the safe side!" - efficiency from approximation: "Trade precision for efficiency!" ------------------------------------------ Q: What's an example of the first idea from type checking? Q: Suppose we're interested in numerical precision (error estimation), what's an example of the second idea in this case? *** practicality These ideas are the heart of many compilers and language systems e.g., abstract interpretation used in verifying Airbus software type systems and other static analysis in JML compiler *** widely used Many papers assume one understands these ideas Lots of different applications including: - security (information flow analysis) - side effects or purity - field accesses - potential for variables to be null - array indexes out of bounds *** it's new for me - want to see how this compares to more type systems, operational semantics, logic programming - the connections between the different kinds of analysis are interesting, and provide a unifying set of ideas Q: what about the material interests you? ** Plan of course (syllabus) overview, survey dataflow analysis, including structural operational semantics abstract interpretation type and effect systems constraint based analysis application to object-oriented languages? summary and evaluation at the end Q: Would you make any changes to the plan? ** Objectives *** meta - get you to think critically Q: What kind of questions should you be asking? limitations? utility? - teach you some semantics and formal methods *** normal In one sentence, the main objective is that you will have a deep, working knowledge of program analysis. Focus on procedural, sequential programs (WHILE language), but will extend to other areas. ------------------------------------------ OBJECTIVES - Explain the goals of program analysis, how it can be used, as well as its advantages, disadvantages, and limits. - Judge and improve the quality of various kinds of program analyses. - Explain and generalize the mathematical ideas that are used in various program analysis techniques. - Apply program analysis techniques to calculate various properties of small programs. - Use and explain operational semantic descriptions of programming languages. - Prove the soundness of an analysis with respect to the operational semantics of a language. ------------------------------------------ ** How I'll run the course *** overview informal and friendly, I'm going to try not to lecture too much lecture meetings: get old homework back (you keep it), discuss homework, if any (some put on board), hand in homework discuss next topic (working examples) You need to read ahead or at least keep up in the reading. homework: explore the material, perhaps generalize or apply it (esp. to OOP, AOP, components, security, etc.) Can work alone or with others. grading: based on evidence, participation, project, final oral exam I'll give comments on homework, grades if you want them pace: we'll try to uncover and explore carefully want deep understanding of that material (semantics) for homework, we'll be flexible, *** red tape prerequisites (531 and 541) book: Principles of Program Analysis, by Flemming Nielson, Hanne Riis Nielson, and Chris Hankin (Springer-Verlag, 1999). ISBN 3-540-65410-0. The textbook is on reserve. ** summary Q: any other questions about the course?