1/20 Principles of Program Analysis Charngki PSWLAB Principles of Program Analysis Flemming Nielson, Hanne Riis Nielson and Chris Hankin.

Slides:



Advertisements
Similar presentations
Data Flow Analysis. Goal: make assertions about the data usage in a program Use these assertions to determine if and when optimizations are legal Local:
Advertisements

Control Flow Analysis (Chapter 7) Mooly Sagiv (with Contributions by Hanne Riis Nielson)
1 Introduction to Data Flow Analysis. 2 Data Flow Analysis Construct representations for the structure of flow-of-data of programs based on the structure.
Equations and Their Solutions
Solving Equations = 4x – 5(6x – 10) -132 = 4x – 30x = -26x = -26x 7 = x.
1/22 Programs : Semantics and Verification Charngki PSWLAB Programs: Semantics and Verification Mordechai Ben-Ari Mathematical Logic for Computer.
Projects. Dataflow analysis Dataflow analysis: what is it? A common framework for expressing algorithms that compute information about a program Why.
Technical Question Technical Question
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Table of Contents Solving Linear Systems of Equations - Substitution Method Recall that to solve the linear system of equations in two variables... we.
13-1 Introduction to Quadratic Equations  CA Standards 14.0 and 21.0  Quadratic Equations in Standard Form.
Table of Contents Solving Equations In Quadratic Form There are several methods one can use to solve a quadratic equation. Sometimes we are called upon.
Table of Contents Solving Linear Systems of Equations - Addition Method Recall that to solve the linear system of equations in two variables... we need.
1/20 Symbolic Execution and Program Testing Charngki PSWLAB Symbolic Execution and Program Testing James C.King IBM Thomas J.Watson Research Center.
Table of Contents First note this equation has "quadratic form" since the degree of one of the variable terms is twice that of the other. When this occurs,
3x – 5y = 11 x = 3y + 1 Do Now. Homework Solutions 2)2x – 2y = – 6 y = – 2x 2x – 2(– 2x) = – 6 2x + 4x = – 6 6x = – 6 x = – 1y = – 2x y = – 2(– 1) y =
3.5 – Solving Systems of Equations in Three Variables.
4.4 Equations as Relations
Table of Contents Solving Linear Systems of Equations - Dependent Systems The goal in solving a linear system of equations is to find the values of the.
Section 4-1: Introduction to Linear Systems. To understand and solve linear systems.
Lesson 6-3B Objective: Solve inequalities using more than one step…continued.
Table of Contents Solving Quadratic Equations – Square Root Method The square root method can be used to solve a quadratic equation that can be set up.
Table of Contents A Quadratic Equation is an equation that can be written in the form Solving Quadratic Equations – Factoring Method Solving quadratic.
Other Types of Equations Solving an Equation by Factoring The Power Principle Solve a Radical Equation Solve Equations with Fractional Exponents Solve.
TABLES AND VALUES Section 1.5. Open Sentence Equation.
Solving Linear Systems of Equations - Substitution Method Recall that to solve the linear system of equations in two variables... we need to find the value.
Solving Systems Using Elimination
Goal: Solve linear equations.. Definitions: Equation: statement in which two expressions are equal. Linear Equation (in one variable): equation that.
solve x + (-16) = -12 solve x + (-16) = X = 4.
Table of Contents Solving Quadratic Equations – Quadratic Formula The following shows how to solve quadratic equations using the Quadratic Formula. A quadratic.
Lesson 1-8 Solving Addition and Subtraction Equations.
Table of Contents Solving Polynomial Equations – Factoring Method A special property is needed to solve polynomial equations by the method of factoring.
10-1 An Introduction to Systems A _______ is a set of sentences joined by the word ____ or by a ________________. Together these sentences describe a ______.
Solving Linear Systems by Substitution
Common Logarithms - Definition Example – Solve Exponential Equations using Logs.
Table of Contents Solving Quadratic Equations – The Discriminant The Discriminant is the expression found under the radical symbol in the quadratic formula.
Solving One Step Equations Algebra I. Addition and Subtraction One Step Equations A solution of an equation is the value or values of the variable that.
Chapter 8 Systems of Linear Equations in Two Variables Section 8.3.
Solving a System of 3 Equations with 3 Unknowns. Breakdown Step 1 Labeling Step 2 Reduce to a 2 by 2 Step 3 Substitute Back In Step 4 Check Solution.
Solving equations with variable on both sides Part 1.
Lesson 3-6 Absolute Value Equations Objectives: To solve equations and inequalities that involve absolute value.
Algebra 1 Section 4.2 Graph linear equation using tables The solution to an equation in two variables is a set of ordered pairs that makes it true. Is.
Algebra 2 Chapter 3 Review Sections: 3-1, 3-2 part 1 & 2, 3-3, and 3-5.
Chapter 12 Section 1.
EQUATION IN TWO VARIABLES:
Chapter 6 Section 3.
Dataflow analysis.
1-5 Equations Goals: Solve equations with one variable
Solve Linear Systems by Graphing
Solving Equations: The Multiplication Principle
Notes Over 9.6 An Equation with One Solution
3-2: Solving Systems of Equations using Substitution
6-2 Solving Systems using Substitution
Solving Equations by Factoring and Problem Solving
Solve a system of linear equation in two variables
3-2: Solving Systems of Equations using Substitution
Solving Systems of Equations using Substitution
Do Now 1) t + 3 = – 2 2) 18 – 4v = 42.
What is an equation? An equation is a mathematical statement that two expressions are equal. For example, = 7 is an equation. Note: An equation.
Functions Introduction.
3-2: Solving Systems of Equations using Substitution
SECTION 2-4 : SOLVING EQUATIONS WITH THE VARIABLE ON BOTH SIDES
Solving Equations with Variables on Both Sides
Solving Equations with Variables on Both Sides
Section 8.2 Part 2 Solving Systems by Substitution
Solving Systems of Equations By Substitution
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Systems of Linear Equations: An Introduction
6-3 & 6-4 Elimination Goals: Solve systems using linear combinations.
Presentation transcript:

1/20 Principles of Program Analysis Charngki PSWLAB Principles of Program Analysis Flemming Nielson, Hanne Riis Nielson and Chris Hankin

2/20 Principles of Program Analysis Charngki PSWLAB Table of Contents  Introduction  Data flow analysis  Future work  Constraints based analysis  References

3/20 Principles of Program Analysis Charngki PSWLAB Introduction

4/20 Principles of Program Analysis Charngki PSWLAB Table of Contents  Introduction  Data flow analysis  Future work  Constraints based analysis  References

5/20 Principles of Program Analysis Charngki PSWLAB Data flow analysis

6/20 Principles of Program Analysis Charngki PSWLAB Data flow analysis elementary block : 1.assignment statement 2.test statement 3.skip statement with labels

7/20 Principles of Program Analysis Charngki PSWLAB Data flow analysis

8/20 Principles of Program Analysis Charngki PSWLAB Reaching definitions analysis (1)

9/20 Principles of Program Analysis Charngki PSWLAB Reaching definitions analysis (2)

10/20 Principles of Program Analysis Charngki PSWLAB Reaching definitions analysis

11/20 Principles of Program Analysis Charngki PSWLAB The best solution

12/20 Principles of Program Analysis Charngki PSWLAB A safe solution – but not the best

13/20 Principles of Program Analysis Charngki PSWLAB An unsafe solution

14/20 Principles of Program Analysis Charngki PSWLAB How to automate the analysis

15/20 Principles of Program Analysis Charngki PSWLAB

16/20 Principles of Program Analysis Charngki PSWLAB Flow through assignments and tests Var = { x, y, z }

17/20 Principles of Program Analysis Charngki PSWLAB Flow along the control Var = { x, y, z }

18/20 Principles of Program Analysis Charngki PSWLAB Summary of equation system

19/20 Principles of Program Analysis Charngki PSWLAB How to solve the equations

20/20 Principles of Program Analysis Charngki PSWLAB The example equations

21/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (1)

22/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (2)

23/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (3)

24/20 Principles of Program Analysis Charngki PSWLAB Table of Contents  Introduction  Data flow analysis  Future work  Constraints based analysis  References

25/20 Principles of Program Analysis Charngki PSWLAB Future work  Constraints based analysis

26/20 Principles of Program Analysis Charngki PSWLAB Table of Contents  Introduction  Data flow analysis  Future work  Constraints based analysis  References

27/20 Principles of Program Analysis Charngki PSWLAB References  Principles of program analysis, Flemming Nielson, Hanne Riis Nielson, Chris Hankin 

28/20 Principles of Program Analysis Charngki PSWLAB Constraints base analysis

29/20 Principles of Program Analysis Charngki PSWLAB Example : control flow analysis

30/20 Principles of Program Analysis Charngki PSWLAB Solutions

31/20 Principles of Program Analysis Charngki PSWLAB An application of control flow analysis

32/20 Principles of Program Analysis Charngki PSWLAB The underlying analysis problem

33/20 Principles of Program Analysis Charngki PSWLAB The best solution to the analysis problem

34/20 Principles of Program Analysis Charngki PSWLAB How to automate the analysis

35/20 Principles of Program Analysis Charngki PSWLAB Three kinds of constraints

36/20 Principles of Program Analysis Charngki PSWLAB let-bound variables

37/20 Principles of Program Analysis Charngki PSWLAB Variables

38/20 Principles of Program Analysis Charngki PSWLAB Function application (1)

39/20 Principles of Program Analysis Charngki PSWLAB Function application (2)

40/20 Principles of Program Analysis Charngki PSWLAB Summary of constraints system

41/20 Principles of Program Analysis Charngki PSWLAB The constraints define a function

42/20 Principles of Program Analysis Charngki PSWLAB How to solve the constraints

43/20 Principles of Program Analysis Charngki PSWLAB The example constraint system

44/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (1)

45/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (2)

46/20 Principles of Program Analysis Charngki PSWLAB Why does it work? (3)