Control Flow Resolution in Dynamic Language Author: Štěpán Šindelář Supervisor: Filip Zavoral, Ph.D.

Slides:



Advertisements
Similar presentations
Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Advertisements

R O O T S Field-Sensitive Points-to-Analysis Eda GÜNGÖR
Uncovering Performance Problems in Java Applications with Reference Propagation Profiling PRESTO: Program Analyses and Software Tools Research Group, Ohio.
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Intermediate Code Generation
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
When Role Models Have Flaws: Static Validation of Enterprise Security Policies Marco Pistoia IBM T. J. Watson Research Center Hawthorne, New York
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Lecture 10: Part 1: OO Issues CS 540 George Mason University.
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
Bebop: A Symbolic Model Checker for Boolean Programs Thomas Ball Sriram K. Rajamani
AUTOMATIC GENERATION OF CODE OPTIMIZERS FROM FORMAL SPECIFICATIONS Vineeth Kumar Paleri Regional Engineering College, calicut Kerala, India. (Currently,
Introduction to Advanced Topics Chapter 1 Mooly Sagiv Schrierber
1 Practical Object-sensitive Points-to Analysis for Java Ana Milanova Atanas Rountev Barbara Ryder Rutgers University.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
CISC October Goals for today: Foster’s parallel algorithm design –Partitioning –Task dependency graph Granularity Concurrency Collective communication.
Recap from last time We were trying to do Common Subexpression Elimination Compute expressions that are available at each program point.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
Global optimization. Data flow analysis To generate better code, need to examine definitions and uses of variables beyond basic blocks. With use- definition.
X := 11; if (x == 11) { DoSomething(); } else { DoSomethingElse(); x := x + 1; } y := x; // value of y? Phase ordering problem Optimizations can interact.
Run-Time Storage Organization
Validating High-Level Synthesis Sudipta Kundu, Sorin Lerner, Rajesh Gupta Department of Computer Science and Engineering, University of California, San.
Interprocedural Analysis Noam Rinetzky Mooly Sagiv Tel Aviv University Textbook Chapter 2.5.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
Machine-Independent Optimizations Ⅰ CS308 Compiler Theory1.
Introduction : ‘Skoll: Distributed Continuous Quality Assurance’ Morimichi Nishigaki.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Procedure Optimizations and Interprocedural Analysis Chapter 15, 19 Mooly Sagiv.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Code Optimization, Part III Global Methods Comp 412 Copyright 2010, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
Introduction Overview Static analysis Memory analysis Kernel integrity checking Implementation and evaluation Limitations and future work Conclusions.
Chapter 5: Programming Languages and Constructs by Ravi Sethi Activation Records Dolores Zage.
Software Defined Radio 長庚電機通訊組 碩一 張晉銓 指導教授 : 黃文傑博士.
Fast Points-to Analysis for Languages with Structured Types Michael Jung and Sorin A. Huss Integrated Circuits and Systems Lab. Department of Computer.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Mark Marron IMDEA-Software (Madrid, Spain) 1.
COMP3190: Principle of Programming Languages
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta
Featherweight X10: A Core Calculus for Async-Finish Parallelism Jonathan K. Lee, Jens Palsberg Presented By- Vasvi Kakkad.
Lecture 4 TTH 03:30AM-04:45PM Dr. Jianjun Hu CSCE569 Parallel Computing University of South Carolina Department of.
An Undergraduate Course on Software Bug Detection Tools and Techniques Eric Larson Seattle University March 3, 2006.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Graph Coverage for Design Elements 1.  Use of data abstraction and object oriented software has increased importance on modularity and reuse.  Therefore.
CS 343 presentation Concrete Type Inference Department of Computer Science Stanford University.
R-Verify: Deep Checking of Embedded Code James Ezick † Donald Nguyen † Richard Lethin † Rick Pancoast* (†) Reservoir Labs (*) Lockheed Martin The Eleventh.
Object Naming Analysis for Reverse- Engineered Sequence Diagrams Atanas (Nasko) Rountev Beth Harkness Connell Ohio State University.
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Wolfgang Runte Slide University of Osnabrueck, Software Engineering Research Group Wolfgang Runte Software Engineering Research Group Institute.
Code Optimization.
Data Flow Analysis Suman Jana
Support for Program Analysis as a First-Class Design Constraint in Legion Michael Bauer 02/22/17.
YAHMD - Yet Another Heap Memory Debugger
Introduction to Advanced Topics Chapter 1 Text Book: Advanced compiler Design implementation By Steven S Muchnick (Elsevier)
Interprocedural Analysis Chapter 19
State your reasons or how to keep proofs while optimizing code
University Of Virginia
SUDS: An Infrastructure for Creating Bug Detection Tools
Hongtao Yu Wei Huo ZhaoQing Zhang XiaoBing Feng
Objective of This Course
Binding Times Binding is an association between two things Examples:
Pointer analysis.
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
Parallel Programming in C with MPI and OpenMP
SeeSoft A Visualization Tool..
Presentation transcript:

Control Flow Resolution in Dynamic Language Author: Štěpán Šindelář Supervisor: Filip Zavoral, Ph.D.

9/15/2015 Outline ▪The aim of the project ▪Our Approach ▪Type Analysis ▪Type Analysis: Data Flow Values ▪Type Analysis: Interprocedural Analysis ▪Evaluation ▪Conclusion

The Aim: Static Analysis for Phalanger ▪Phalanger: PHP compiler for.NET, written in C#, compiles PHP to MSIL ▪Started at the Department of Software Engineering in 2004 ▪PHP is a dynamic language → no type information, one variable: multiple types. ▪Static Analysis: analyse the code without executing it. ▪Aim: static analysis framework for Phalanger ▪optimizations for compiler, ▪integrated development environments ▪implement analyses: ▪dead code elimination, constant propagation, type inference

9/15/2015 Outline ▪The aim of the project ▪Our Approach ▪Type Analysis ▪Type Analysis: Data Flow Values ▪Type Analysis: Interprocedural Analysis ▪Evaluation ▪Conclusion

5 Our Approach: Static Analysis ▪Data-flow Analysis (DFA) - the de-facto standard for optimizing compilers and basis for other approaches ▪control flow graph ▪data-flow equations ▪iterative algorithm to solve the equations ▪Our task ▪Design and implement the framework ▪Implement desired analyses ▪Dead code elimination, constant propagation, type inference

Our Approach: Type Analysis ▪The most complex analysis implemented ▪Our aim: ▪Type inference for local variables and global elements ▪Static and global variables, static and instance fields ▪Support for PHPDoc ▪Our task ▪choose the data flow values (domain) ▪deal with intraprocedural analysis ▪deal with real world programming language - PHP 9/15/2015 “When developers are given a dynamically typed programming language, it does not mean that they will write dynamically typed programs.”

7 Type Analysis: Data Flow Values ▪Map from variable names to subsets of types ▪Must form a finite lattice ▪Support for “type hints” ▪Inheritance ▪Efficient representation ▪memory consumption ▪fast meet operator

8 Type Analysis: Interprocedural Analysis ▪Analysis of global and static variables, static and instance fields. ▪Return types of routines ▪Heap memory ▪Modularity

9/15/2015 Outline ▪The aim of the project ▪Our Approach ▪Type Analysis ▪Type Analysis: Data Flow Values ▪Type Analysis: Interprocedural Analysis ▪Evaluation ▪Conclusion

9/15/2015 Evaluation ▪PHP open source projects ▪Zebra_Image, PHPUnit, Nette ▪Run the analysis on their source code ▪fix bugs where possible ▪record actual errors discovered by the tool ▪categorize found issues

9/15/2015 Evaluation: performance ▪PHP open source projects Q: spotřebu paměti se mi podařilo od Odevzdání vylepšit. Můžu zahrnout nový graf?

9/15/2015 Outline ▪The aim of the project ▪Our Approach ▪Type Analysis ▪Type Analysis: Data Flow Values ▪Type Analysis: Interprocedural Analysis ▪Evaluation ▪Conclusion

9/15/2015 Conclusion ▪Generic data-flow analysis analysis framework for Phalanger ▪Type Analysis ▪Effective data-flow values representation with bit-vectors, PHPDoc support ▪Modular approach for interprocedural analysis ▪Evaluation: ▪capable of discovering several real issues with a good ratio of false positives ▪without expensive context sensitive analysis → scalability ▪Future Work: ▪intergration with the compiler, performance evaluation of the emitted code ▪arrays support

9/15/2015 Thank you for you attention QA

9/15/2015 PHPDoc