Two Approaches to Interprocedural Data Flow Analysis
|
|
- Charlotte Gilmore
- 5 years ago
- Views:
Transcription
1 Two Approaches to Interprocedural Data Flow Analysis Micha Sharir Amir Pnueli Part one: The Functional Approach Klaas Boesche
2 Intraprocedural analysis procedure main read a, b procedure p if a=0 F a := a - 1 T a*b available? print t stop return Klaas Boesche 2
3 Interprocedural challenges Recursion Infeasible paths main p Function variables & Virtual functions main p if a=0 F a := a - 1 T x := call x p q q return Infinite paths Efficiency vs. Precision Filter invalid paths Precision and Efficiency No static call graph Klaas Boesche 3
4 Outline Notation and Review Functional Approach Interprocedural MOP Pragmatic Considerations Klaas Boesche 4
5 Notations main read a, b Control Flow Graphs r main no parameters p if a=0 F a := a - 1 T r p print t stop e main return e p Klaas Boesche 5
6 Data Flow Frameworks (L, F) is a data flow framework: L is a meet-semilattice = greatest lower bound = smallest element (no information) = largest element ("undefined") bounded - No infinite descending chain Analysis direction Klaas Boesche 6
7 Data Flow Frameworks (L, F) is a data flow framework: F is a monotone space of transfer functions 1. Closed under composition and meet f g x = f x g(x) 2. Contains id L x = x and f x = F is distributive iff f, x, y: f x f(y) = f(x y) Restrict F to graph G = (N, E): Smallest S F such that f m,n m, n E S and 1. and 2. hold Klaas Boesche 7
8 Intraprocedural example Available expression framework for the single expression a * b: L =, 1, F = f, f 1, id L, f : a * b not available 1: a * b available f x =, f 1 x = Klaas Boesche 8
9 Intraprocedural example main p read a, b r main if a=0 F id L T r p f 1 a := a - 1 n p 1 c main f f c p print t n main f m p f 1 stop 1 e main f 1 return id L e p Klaas Boesche 9
10 Intraprocedural equations The data flow equations x r = x n = f m,n x m m,n E n N *r+ approximate the meet-over-all paths (MOP) solution y n = *f p ( ) p pat G r, n + n N where f p=(n1,,n k ) = f (nk 1,n k ) f (n1,n 2 ) Klaas Boesche 10
11 Intraprocedural solutions F is distributive The maximum fixed point solution x n = y n F is monotone x n y n Klaas Boesche 11
12 Outline Notation and Review Functional Approach Interprocedural MOP Pragmatic Considerations Klaas Boesche 12
13 Interprocedural Graphs Two representations: 1. G = p N p, p E p 2. G = p N p, E s E s 0 E s 1 E 1 E p = E p 0 E p 1 E = E 0 E 1 p E p 0 E p 0 r p E 0 = E p 0 E p 0 p Intraprocedural edges E p 1 Intraprocedural edges with interprocedural control flow E s 0 E 1 return e p E 1 Interprocedural edges Klaas Boesche 13
14 Example G main p read a, b r main if a=0 F T r p a := a E main print t E p 1 stop e main return e p Klaas Boesche 14
15 Example G main p read a, b r main if a=0 F T r p a := a - 1 print t stop e main return e p Klaas Boesche 15
16 Interprocedurally Valid paths IVP 0 (r p, n) p r p call q m q r q m return e q n Klaas Boesche 16
17 Interprocedurally Valid paths main IVP(r main, n) r main q 1 IVP 0 (r main, n) p 2 2 c 1 r p2 3 q 2 IVP 0 (r p2, n) c 2 p j r pj q j IVP 0 (r pj, n) n Klaas Boesche 17
18 Path notations p 1, p 2 pat G r q, n p 1 E 1 Sequence of call & return edges in p 1 p = p 1 p 2 Concatenation of p 1, p Klaas Boesche 18
19 Interprocedurally Valid paths p pat G r q, n is in IVP 0 r q, n p E 1 is complete defined as: call q' m q' p 1 r q 1. p E 1 = ε m return e q 2. p E 1 = p 1 p 2 and p 1, p 2 are complete 3. p E 1 = m, r q p 1 e q, m and p 1 is complete Klaas Boesche 19
20 Interprocedurally Valid paths q IVP r main, n q = q 1 c 1, r p2 q 2 c j 1, r pj q j i < j: q i IVP 0 r pi, c i and q j IVP 0 r pj, n Also called Path Decomposition Klaas Boesche 20
21 Examples G c main, r p, c p, r p, e p, n read a, b r main if a=0 F T r p a := a - 1 c main c p print t n stop e main return e p Klaas Boesche 21
22 Examples G c main, r p, c p, r p, c p, r p, e p, n, e p, n read a, b r main if a=0 F T r p a := a - 1 c main c p print t n stop e main return e p Klaas Boesche 22
23 Functional approach p r p φ rp,m φ rp,n φ rp,l call q m r q φ rq,e q l return e q f l,n n Information x at r p is transformed to φ rp,n x at n Klaas Boesche 23
24 Functional Approach equations φ rp,r p = id L φ rp,n = m,n φ rp,m n N p *r p + m,n E p m,n = f m,n m, n E0 p φ rq,e q m, n E 1 p, m calls q Initialize the equations with Recursion implicitly encoded in equations φ rp,r p = id L φ rp,n = f n N p *r p + Compute the maximal fixed point Klaas Boesche 24
25 Example main p id L read a, b r m if a=0 F id L T r p f 1 a := a - 1 n p f 1 φ rm,r m c m f c p φ rp,e p φ rm,c m print t n m m p f 1 f 1 id L f 1 φ rm,n m stop e m return e p Klaas Boesche 25
26 Example main p read a, b r m if a=0 F id L T r p id L f 1 a := a - 1 n p id L φ rp,r p c m f c p f φ rp,n p print t n m m p φ rp,e p φ rp,c p f 1 f 1 id L stop e m return e p id L φ rp,r p f 1 φ rp,m p Klaas Boesche 26
27 Example φ rm,r m = id L φ rm,c m = f 1 φ rm,r m φ rm,e m = f 1 φ rm,n m φ rp,r p = id L φ rp,c p = f φ rp,n p φ rp,m p = φ rp,e p φ rp,c p φ rm,n m = φ rp,e p φ rm,c m φ rp,n p = id L φ rp,r p φ rp,e p = id L φ rp,r p f 1 φ rp,m p Function Initial value Iteration φ rm,r m id L id L id L id L φ rm,c m f f 1 f 1 f 1 φ rm,n m f f f 1 f 1 φ rm,e m f f 1 f 1 f 1 φ rp,r p id L id L id L id L φ rp,n p f id L id L id L φ rp,c p f f f f φ rp,m p f f f f φ rp,e p f id L id L id L Klaas Boesche 27
28 Solution x rmain = x rp = φ rq,c x rq c calls p in q Compute the maximal fixed point iteratively x n = φ rp,n x rp Computes the solution for all other nodes Klaas Boesche 28
29 Example (continued) x rp = φ rm,c m x rm φ rp,c p x rp main = f 1 x rm f (x rp ) p read a, b r m Functions φ rm,r m = id L if a=0 F T r p φ rm,c m = f 1 a := a - 1 n p 1 c m φ rm,n m = f 1 1 print t n m φ rm,e m = f 1 φ rp,r p = id L φ rp,n p = id L φ rp,c p = f c p m p φ rp,m p = f 1 stop e m φ rp,e p = id L return e p Klaas Boesche 29
30 Outline Notation and Review Functional Approach Interprocedural MOP Pragmatic Considerations Klaas Boesche 30
31 Interprocedural MOP solution ψ n = f q q IVP r main, n y n = ψ n main r main ψ n f q1 f q2 n Klaas Boesche 31
32 IVP 0 Lemma φ rp,n = f q q IVP 0 r p, n p r p call q φ rp,n f q q IVP 0 r p, n return n Klaas Boesche 32
33 IVP 0 Lemma: Proof φ rp,n f q q IVP 0 r p, n By induction on φi rp,n, the i-th approximation For i = 0: 0 If n = r p then φ rp,n = id L = f ε f q q IVP 0 r p, r p If n r p then φ0 rp,n = f f F i IH: φ rp,n f q q IVP 0 r p, n For i + 1: see blackboard Klaas Boesche 33
34 IVP 0 Lemma: Proof f q q IVP 0 r p, n φ rp,n Show: q IVP 0 r p, n : f q φ rp,n by induction over the length k of q For k = 0: Then f q = φ rp,r p = id L IH: q IVP 0 r p, n, q k: f q φ rp,n For k + 1: see blackboard Klaas Boesche 34
35 MOP Rewritten ψ n = f q q IVP r main, n χ n = φ rpj,n φ rpj 1,c j 1 φ rmain,c 1 c i calls p i+1 Then ψ n = χ n with IVP 0 Lemma and Path decomposition Thus y n = ψ n = χ n Klaas Boesche 35
36 Equivalence to MOP F distributive y n = x n Proof: Show that x rp = y rp then with x n = φ rp,n x rp = φ rp,n y rp, y n = χ n = φ rpj,n φ rpj 1,c j 1 φ rmain,c 1 c i calls p i+1 = φ rp,n χ rp = φ rp,n y rp it follows that x n = y n n N Klaas Boesche 36
37 Equivalence to MOP New "Intraprocedural" Data Flow Problem: G c = N c, E c E c = E c 0 E c 1 s p r s r p E c 0 E c 1 E c 1 E c 0 g m,n = φ m,n, m, n E c 0 id L, m, n E c Klaas Boesche 37
38 Equivalence to MOP s p r s r p E c 0 E c 1 E c 1 E c 0 g m,n = φ m,n, m, n E c 0 id L, m, n E c 1 interprocedural intraprocedural x rmain = x rp = φ rq,c x rq c calls p in q x r = x n = g m,n x m m,n E x n = φ rp,n x rp Klaas Boesche 38
39 Equivalence to MOP x rmain = interprocedural x rp = φ rq,c x rq c calls p in q x rmain = intraprocedural x rp = id L x m m,r p E c 1 x n = φ rp,n x rp = x m m,r p E c 1 = φ rq,c x rq c calls p in q x c = φ m,c x m m,c E c 0 = φ rp,c x rp Klaas Boesche 39
40 Equivalence to MOP s p r s r p E c 0 E c 1 E c 1 E c 0 g m,n = φ m,n, m, n E c 0 id L, m, n E c 1 interprocedural y n = f q q IVP r main, n intraprocedural y n = *f p ( ) p pat G r, n + Follows from y n = φ rpj,n φ rmain,c 1 c i calls p i+1 and by construction of G c Klaas Boesche 40
41 Equivalence to MOP F is distributive The maximum fixed point solution x n of the functional approach = the interprocedural MOP solution y n F is monotone x n y n Klaas Boesche 41
42 Outline Notation and Review Functional Approach Interprocedural MOP Pragmatic Considerations Klaas Boesche 42
43 Pragmatic problems Representation of φ: Symbolic not always possible Explicit representation maybe not finite if L infinite: main: A := 0 call P print A p: if cond then A := A + 1 call P A := A 1 endif return φ rp,e p A, 0 φ rp,e p A, 1 φ rp,e p A, Klaas Boesche 43
44 Pragmatic problems Approach with symbolic representation may not converge when L infinite and F unbounded: k 0: Need k iterations to show φ rp,e p A, k = main: A := 0 call P print A p: if cond then A := A (A<0)?-1:1 call P A := A 1 endif return Klaas Boesche 44
45 Practical result If L, F distributive and L finite then the iterative solution of φ rp,r p = id L φ rp,n = m,n φ rp,m m,n E p converges and x rmain = x rp = φ rq,c x rq c calls p in q x n = φ rp,n x rp results in the interprocedural MOP solution Klaas Boesche 45
46 Algorithm Assume L finite and no symbolic representation available Compute φ rp,n only for necessary values W r main, ; PHI r main, = wile W remove some n, x from W update PHIs and W x n = a L PHI n, a Klaas Boesche 46
47 Algorithm: updating PHIs and W propagate x, z, m : PHI m, x PHI m, x z; if PHI canged: W W m, x Klaas Boesche 47
48 Algorithm: updating PHIs and W x q Case 1 y PHI(n, x) r q n p r p z PHI(e p, y) m return e p if z undefined: propagate y, y, r p else: propagate x, z, m Klaas Boesche 48
49 Algorithm: updating PHIs and W u x = PHI(c p, u) p Case 2 r p x q c p r q y PHI(n, x) m p return n for eac call c p to q and u L wit x = PHI c p, u propagate u, y, m p Klaas Boesche 49
50 Algorithm: updating PHIs and W x Case 3 q y PHI(n, x) r q n m 1 m k for eac n, m E q 0 : propagate x, f n,m y, m Klaas Boesche 50
51 Example W * r m, main read a, b f 1 print t f 1 stop r m c m n m e m c m, r p, 1 p if a=0 F a := a - 1 return PHI r m, Klaas Boesche 51 id L f f 1 T e p, 1 r p c p id L n p m p e p + = propagate, f 1, c m PHI c m, = 1 propagate 1,1, r p PHI r p, 1 = 1 propagate 1, id L (1), n p propagate 1, id L (1), e p PHI n p, 1 = 1 PHI e p, 1 = 1 propagate, 1, n m PHI n m, = 1
52 Summary: Define valid paths IVP 0 (r p, n) p r p main IVP(r main, n) r main call q m m q return r q e q q 1 IVP 0 (r main, n) callp 2 c 1 p j r pj n q j IVP 0 (r pj, n) n Klaas Boesche 52
53 Summary: Functional Approach p r p φ rp,m φ rp,n φ rp,l call q m r q φ rq,e q l return e q f l,n n Information x at r p is transformed to φ rp,n x at n Klaas Boesche 53
54 Summary: Functional Result F is distributive The maximum fixed point solution x n of the functional approach = the interprocedural MOP solution y n Klaas Boesche 54
55 Summary: Practical Aspects Represent φ rp,n symbolically or by explicit relation Explicit approach may require much space L infinite Explicit approach may diverge L infinite, F unbounded Symbolic approach may diverge Klaas Boesche 55
Reading: Chapter 9.3. Carnegie Mellon
I II Lecture 3 Foundation of Data Flow Analysis Semi-lattice (set of values, meet operator) Transfer functions III Correctness, precision and convergence IV Meaning of Data Flow Solution Reading: Chapter
More informationStatic Program Analysis
Static Program Analysis Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ss-18/spa/ Recap: Interprocedural Dataflow Analysis Outline of
More informationInterprocedural Analysis: Sharir-Pnueli s Call-strings Approach
Interprocedural Analysis: Sharir-Pnueli s Call-strings Approach Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 04 September 2013 Outline 1 Motivation
More informationComputer Science Department
l?ks< ^ Computer Science Department TECHNICAL REPORT TWO APPROACHES TO INTERPROCEDURAL DATA FLOW ANALYSIS By MICHA SHARIR^-"-^ and AMIR PNUELI^^^ September 19 78 Report No. 00 2 NEW YORK UNIVERSITY.J 8
More informationDataflow Analysis. Chapter 9, Section 9.2, 9.3, 9.4
Dataflow Analysis Chapter 9, Section 9.2, 9.3, 9.4 2 Dataflow Analysis Dataflow analysis is a sub area of static program analysis Used in the compiler back end for optimizations of three address code and
More informationSection 11.1 Sequences
Math 152 c Lynch 1 of 8 Section 11.1 Sequences A sequence is a list of numbers written in a definite order: a 1, a 2, a 3,..., a n,... Notation. The sequence {a 1, a 2, a 3,...} can also be written {a
More informationDFA of non-distributive properties
DFA of non-distributive properties The general pattern of Dataflow Analysis GA (p)= i if p E { GA (q) q F } otherwise GA (p)= f p ( GA (p) ) where : E is the set of initial/final points of the control-flow
More informationInfinite Series. Copyright Cengage Learning. All rights reserved.
Infinite Series Copyright Cengage Learning. All rights reserved. Sequences Copyright Cengage Learning. All rights reserved. Objectives List the terms of a sequence. Determine whether a sequence converges
More informationMAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9
MAT 570 REAL ANALYSIS LECTURE NOTES PROFESSOR: JOHN QUIGG SEMESTER: FALL 204 Contents. Sets 2 2. Functions 5 3. Countability 7 4. Axiom of choice 8 5. Equivalence relations 9 6. Real numbers 9 7. Extended
More informationDataflow Analysis - 2. Monotone Dataflow Frameworks
Dataflow Analysis - 2 Monotone dataflow frameworks Definition Convergence Safety Relation of MOP to MFP Constant propagation Categorization of dataflow problems DataflowAnalysis 2, Sp06 BGRyder 1 Monotone
More informationStatic Program Analysis
Static Program Analysis Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ws-1617/spa/ Online Registration for Seminars and Practical Courses
More informationCMSC 631 Program Analysis and Understanding. Spring Data Flow Analysis
CMSC 631 Program Analysis and Understanding Spring 2013 Data Flow Analysis Data Flow Analysis A framework for proving facts about programs Reasons about lots of little facts Little or no interaction between
More informationAs f and g are differentiable functions such that. f (x) = 20e 2x, g (x) = 4e 2x + 4xe 2x,
srinivasan (rs7) Sample Midterm srinivasan (690) This print-out should have 0 questions. Multiple-choice questions may continue on the next column or page find all choices before answering. Determine if
More informationModules over Principal Ideal Domains
Modules over Principal Ideal Domains Let henceforth R denote a commutative ring with 1. It is called a domain iff it has no zero-divisors, i.e. if ab = 0 then either a or b is zero. Or equivalently, two
More informationSolutions: Problem Set 4 Math 201B, Winter 2007
Solutions: Problem Set 4 Math 2B, Winter 27 Problem. (a Define f : by { x /2 if < x
More informationMATH 409 Advanced Calculus I Lecture 10: Continuity. Properties of continuous functions.
MATH 409 Advanced Calculus I Lecture 10: Continuity. Properties of continuous functions. Continuity Definition. Given a set E R, a function f : E R, and a point c E, the function f is continuous at c if
More informationPrelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.
Prelude to the Simplex Algorithm The Algebraic Approach The search for extreme point solutions. 1 Linear Programming-1 x 2 12 8 (4,8) Max z = 6x 1 + 4x 2 Subj. to: x 1 + x 2
More informationDO FIVE OUT OF SIX ON EACH SET PROBLEM SET
DO FIVE OUT OF SIX ON EACH SET PROBLEM SET 1. THE AXIOM OF FOUNDATION Early on in the book (page 6) it is indicated that throughout the formal development set is going to mean pure set, or set whose elements,
More informationThe Meet-Over-All-Paths Solution to Data-Flow Problems
The Meet-Over-All-Paths Solution to Data-Flow Problems Consider a monotone dataflow framework (L,,F). Assume that the functions f B F represent the effect of a basic block on the sets conatining data for
More informationGoal. Partially-ordered set. Game plan 2/2/2013. Solving fixpoint equations
Goal Solving fixpoint equations Many problems in programming languages can be formulated as the solution of a set of mutually recursive equations: D: set, f,g:dxd D x = f(x,y) y = g(x,y) Examples Parsing:
More informationPUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes
PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES Notes. x n+ = ax n has the general solution x n = x a n. 2. x n+ = x n + b has the general solution x n = x + (n )b. 3. x n+ = ax n + b (with a ) can be
More informationCSC D70: Compiler Optimization Dataflow-2 and Loops
CSC D70: Compiler Optimization Dataflow-2 and Loops Prof. Gennady Pekhimenko University of Toronto Winter 2018 The content of this lecture is adapted from the lectures of Todd Mowry and Phillip Gibbons
More informationNewtonian Program Analysis: Solving Sharir and Pnueli s Equations
Newtonian Program Analysis: Solving Sharir and Pnueli s Equations Javier Esparza Technische Universität München Joint work with Stefan Kiefer and Michael Luttenberger From programs to equations: Intraprocedural
More informationModel Checking & Program Analysis
Model Checking & Program Analysis Markus Müller-Olm Dortmund University Overview Introduction Model Checking Flow Analysis Some Links between MC and FA Conclusion Apology for not giving proper credit to
More informationSequences. Limits of Sequences. Definition. A real-valued sequence s is any function s : N R.
Sequences Limits of Sequences. Definition. A real-valued sequence s is any function s : N R. Usually, instead of using the notation s(n), we write s n for the value of this function calculated at n. We
More informationPrecise Program Analysis through (Linear) Algebra
Precise Program Analysis through (Linear) Algebra Markus Müller-Olm FernUniversität Hagen (on leave from Universität Dortmund) Joint work with Helmut Seidl (TU München) CP+CV 4, Barcelona, March 8, 4 Overview
More informationSemantics and Verification of Software
Semantics and Verification of Software Thomas Noll Software Modeling and Verification Group RWTH Aachen University http://moves.rwth-aachen.de/teaching/ss-15/sv-sw/ The Denotational Approach Denotational
More informationMATH 614 Dynamical Systems and Chaos Lecture 2: Periodic points. Hyperbolicity.
MATH 614 Dynamical Systems and Chaos Lecture 2: Periodic points. Hyperbolicity. Orbit Let f : X X be a map defining a discrete dynamical system. We use notation f n for the n-th iteration of f defined
More informationFall, 2017 CIS 262. Automata, Computability and Complexity Jean Gallier Solutions of the Practice Final Exam
Fall, 2017 CIS 262 Automata, Computability and Complexity Jean Gallier Solutions of the Practice Final Exam December 6, 2017 Problem 1 (10 pts). Let Σ be an alphabet. (1) What is an ambiguous context-free
More informationFactor Graphs and Message Passing Algorithms Part 1: Introduction
Factor Graphs and Message Passing Algorithms Part 1: Introduction Hans-Andrea Loeliger December 2007 1 The Two Basic Problems 1. Marginalization: Compute f k (x k ) f(x 1,..., x n ) x 1,..., x n except
More informationRecursive definitions on surreal numbers
Recursive definitions on surreal numbers Antongiulio Fornasiero 19th July 2005 Abstract Let No be Conway s class of surreal numbers. I will make explicit the notion of a function f on No recursively defined
More informationInduction, sequences, limits and continuity
Induction, sequences, limits and continuity Material covered: eclass notes on induction, Chapter 11, Section 1 and Chapter 2, Sections 2.2-2.5 Induction Principle of mathematical induction: Let P(n) be
More informationMIT Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology
MIT 6.035 Foundations of Dataflow Analysis Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Dataflow Analysis Compile-Time Reasoning About Run-Time Values of Variables
More informationMat 3770 Bin Packing or
Basic Algithm Spring 2014 Used when a problem can be partitioned into non independent sub problems Basic Algithm Solve each sub problem once; solution is saved f use in other sub problems Combine solutions
More information8.1 Sequences. Example: A sequence is a function f(n) whose domain is a subset of the integers. Notation: *Note: n = 0 vs. n = 1.
8. Sequences Example: A sequence is a function f(n) whose domain is a subset of the integers. Notation: *Note: n = 0 vs. n = Examples: 6. Find a formula for the general term a n of the sequence, assuming
More informationUndergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
More informationHomework 4, 5, 6 Solutions. > 0, and so a n 0 = n + 1 n = ( n+1 n)( n+1+ n) 1 if n is odd 1/n if n is even diverges.
2..2(a) lim a n = 0. Homework 4, 5, 6 Solutions Proof. Let ɛ > 0. Then for n n = 2+ 2ɛ we have 2n 3 4+ ɛ 3 > ɛ > 0, so 0 < 2n 3 < ɛ, and thus a n 0 = 2n 3 < ɛ. 2..2(g) lim ( n + n) = 0. Proof. Let ɛ >
More information(Infinite) Series Series a n = a 1 + a 2 + a a n +...
(Infinite) Series Series a n = a 1 + a 2 + a 3 +... + a n +... What does it mean to add infinitely many terms? The sequence of partial sums S 1, S 2, S 3, S 4,...,S n,...,where nx S n = a i = a 1 + a 2
More informationDataflow Analysis. Dragon book, Chapter 9, Section 9.2, 9.3, 9.4
Dataflow Analysis Dragon book, Chapter 9, Section 9.2, 9.3, 9.4 2 Dataflow Analysis Dataflow analysis is a sub-area of static program analysis Used in the compiler back end for optimizations of three-address
More informationData Flow Analysis. Lecture 6 ECS 240. ECS 240 Data Flow Analysis 1
Data Flow Analysis Lecture 6 ECS 240 ECS 240 Data Flow Analysis 1 The Plan Introduce a few example analyses Generalize to see the underlying theory Discuss some more advanced issues ECS 240 Data Flow Analysis
More information1 The Local-to-Global Lemma
Point-Set Topology Connectedness: Lecture 2 1 The Local-to-Global Lemma In the world of advanced mathematics, we are often interested in comparing the local properties of a space to its global properties.
More informationChapter 2. Unification. Foundations of Logic Programming
Chapter 2 1 Outline Understanding the need for unification Defining alphabets, terms, and substitutions Introducing the Martelli-Montanari Algorithm for unification Proving correctness of the algorithm
More informationClassical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems
Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems Rani M. R, Mohith Jagalmohanan, R. Subashini Binary matrices having simultaneous consecutive
More informationMath 141: Section 4.1 Extreme Values of Functions - Notes
Math 141: Section 4.1 Extreme Values of Functions - Notes Definition: Let f be a function with domain D. Thenf has an absolute (global) maximum value on D at a point c if f(x) apple f(c) for all x in D
More informationFormal Methods in Software Engineering
Formal Methods in Software Engineering An Introduction to Model-Based Analyis and Testing Vesal Vojdani Department of Computer Science University of Tartu Fall 2014 Vesal Vojdani (University of Tartu)
More informationU.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 3 Luca Trevisan August 31, 2017
U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 3 Luca Trevisan August 3, 207 Scribed by Keyhan Vakil Lecture 3 In which we complete the study of Independent Set and Max Cut in G n,p random graphs.
More informationLinear Temporal Logic and Büchi Automata
Linear Temporal Logic and Büchi Automata Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 Yih-Kuen Tsay (SVVRL @ IM.NTU) Linear Temporal Logic and Büchi Automata
More informationComputer Intensive Methods in Mathematical Statistics
Computer Intensive Methods in Mathematical Statistics Department of mathematics johawes@kth.se Lecture 16 Advanced topics in computational statistics 18 May 2017 Computer Intensive Methods (1) Plan of
More informationLogical Connectives and Quantifiers
Chapter 1 Logical Connectives and Quantifiers 1.1 Logical Connectives 1.2 Quantifiers 1.3 Techniques of Proof: I 1.4 Techniques of Proof: II Theorem 1. Let f be a continuous function. If 1 f(x)dx 0, then
More informationNumerical Methods for Differential Equations
Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the
More information{a, b, c} {a, b} {a, c} {b, c} {a}
Section 4.3 Order Relations A binary relation is an partial order if it transitive and antisymmetric. If R is a partial order over the set S, we also say, S is a partially ordered set or S is a poset.
More informationIntroduction to Real Analysis
Christopher Heil Introduction to Real Analysis Chapter 0 Online Expanded Chapter on Notation and Preliminaries Last Updated: January 9, 2018 c 2018 by Christopher Heil Chapter 0 Notation and Preliminaries:
More informationUnconstrained minimization of smooth functions
Unconstrained minimization of smooth functions We want to solve min x R N f(x), where f is convex. In this section, we will assume that f is differentiable (so its gradient exists at every point), and
More informationErgodic Theorems. Samy Tindel. Purdue University. Probability Theory 2 - MA 539. Taken from Probability: Theory and examples by R.
Ergodic Theorems Samy Tindel Purdue University Probability Theory 2 - MA 539 Taken from Probability: Theory and examples by R. Durrett Samy T. Ergodic theorems Probability Theory 1 / 92 Outline 1 Definitions
More informationFunctions. A function is a rule that gives exactly one output number to each input number.
Functions A function is a rule that gives exactly one output number to each input number. Why it is important to us? The set of all input numbers to which the rule applies is called the domain of the function.
More informationSome Independence Results for Control Structures in Complete Numberings
Some Independence Results for Control Structures in Complete Numberings Sanjay Jain School of Computing National University of Singapore Singapore 119260, Rep. of Singapore sanjay@comp.nus.edu.sg Jochen
More informationLecture 4 October 18th
Directed and undirected graphical models Fall 2017 Lecture 4 October 18th Lecturer: Guillaume Obozinski Scribe: In this lecture, we will assume that all random variables are discrete, to keep notations
More informationNote that r = 0 gives the simple principle of induction. Also it can be shown that the principle of strong induction follows from simple induction.
Proof by mathematical induction using a strong hypothesis Occasionally a proof by mathematical induction is made easier by using a strong hypothesis: To show P(n) [a statement form that depends on variable
More information1 The decision problem for First order logic
Math 260A Mathematical Logic Scribe Notes UCSD Winter Quarter 2012 Instructor: Sam Buss Notes by: James Aisenberg April 27th 1 The decision problem for First order logic Fix a finite language L. Define
More informationHandout: Proof of the completeness theorem
MATH 457 Introduction to Mathematical Logic Spring 2016 Dr. Jason Rute Handout: Proof of the completeness theorem Gödel s Compactness Theorem 1930. For a set Γ of wffs and a wff ϕ, we have the following.
More informationSequence. A list of numbers written in a definite order.
Sequence A list of numbers written in a definite order. Terms of a Sequence a n = 2 n 2 1, 2 2, 2 3, 2 4, 2 n, 2, 4, 8, 16, 2 n We are going to be mainly concerned with infinite sequences. This means we
More informationDecorating proofs. Helmut Schwichtenberg. joint work with Luca Chiarabini and Diana Ratiu Mathematisches Institut, LMU, München
joint work with Luca Chiarabini and Diana Ratiu Mathematisches Institut, LMU, München Leeds Symposium on Proof Theory and Constructivism, 3-16 July 2009 Natural deduction with non-computational connectives
More informationIntroduction to Kleene Algebras
Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)
More informationMath 104: Homework 7 solutions
Math 04: Homework 7 solutions. (a) The derivative of f () = is f () = 2 which is unbounded as 0. Since f () is continuous on [0, ], it is uniformly continous on this interval by Theorem 9.2. Hence for
More informationSemantics and Verification of Software
Semantics and Verification of Software Thomas Noll Software Modeling and Verification Group RWTH Aachen University http://moves.rwth-aachen.de/teaching/ws-1718/sv-sw/ Recap: The Denotational Approach Semantics
More informationExistence and uniqueness: Picard s theorem
Existence and uniqueness: Picard s theorem First-order equations Consider the equation y = f(x, y) (not necessarily linear). The equation dictates a value of y at each point (x, y), so one would expect
More informationThe Mandelbrot Set. Andrew Brown. April 14, 2008
The Mandelbrot Set Andrew Brown April 14, 2008 The Mandelbrot Set and other Fractals are Cool But What are They? To understand Fractals, we must first understand some things about iterated polynomials
More informationx x 1 x 2 + x 2 1 > 0. HW5. Text defines:
Lecture 15: Last time: MVT. Special case: Rolle s Theorem (when f(a) = f(b)). Recall: Defn: Let f be defined on an interval I. f is increasing (or strictly increasing) if whenever x 1, x 2 I and x 2 >
More informationMATH 409 Advanced Calculus I Lecture 7: Monotone sequences. The Bolzano-Weierstrass theorem.
MATH 409 Advanced Calculus I Lecture 7: Monotone sequences. The Bolzano-Weierstrass theorem. Limit of a sequence Definition. Sequence {x n } of real numbers is said to converge to a real number a if for
More informationRepresenting Independence Models with Elementary Triplets
Representing Independence Models with Elementary Triplets Jose M. Peña ADIT, IDA, Linköping University, Sweden jose.m.pena@liu.se Abstract An elementary triplet in an independence model represents a conditional
More informationINFINITE SEQUENCES AND SERIES
11 INFINITE SEQUENCES AND SERIES INFINITE SEQUENCES AND SERIES Infinite sequences and series were introduced briefly in A Preview of Calculus in connection with Zeno s paradoxes and the decimal representation
More informationFlow grammars a flow analysis methodology
Flow grammars a flow analysis methodology James S. Uhl and R. Nigel Horspool Dept. of Computer Science, University of Victoria P.O. Box 3055, Victoria, BC, Canada V8W 3P6 E-mail: juhl@csr.uvic.ca, nigelh@csr.uvic.ca
More informationON THE ROLE OF THE COLLECTION PRINCIPLE FOR Σ 0 2-FORMULAS IN SECOND-ORDER REVERSE MATHEMATICS
ON THE ROLE OF THE COLLECTION PRINCIPLE FOR Σ 0 2-FORMULAS IN SECOND-ORDER REVERSE MATHEMATICS C. T. CHONG, STEFFEN LEMPP, AND YUE YANG Abstract. We show that the principle PART from Hirschfeldt and Shore
More informationRECURSION EQUATION FOR
Math 46 Lecture 8 Infinite Horizon discounted reward problem From the last lecture: The value function of policy u for the infinite horizon problem with discount factor a and initial state i is W i, u
More informationSri vidya college of engineering and technology
Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order
More informationMathematics for Economics ECON MA/MSSc in Economics-2017/2018. Dr. W. M. Semasinghe Senior Lecturer Department of Economics
Mathematics for Economics ECON 53035 MA/MSSc in Economics-2017/2018 Dr. W. M. Semasinghe Senior Lecturer Department of Economics MATHEMATICS AND STATISTICS LERNING OUTCOMES: By the end of this course unit
More informationSummary of the simplex method
MVE165/MMG631,Linear and integer optimization with applications The simplex method: degeneracy; unbounded solutions; starting solutions; infeasibility; alternative optimal solutions Ann-Brith Strömberg
More informationSection 6.1: Composite Functions
Section 6.1: Composite Functions Def: Given two function f and g, the composite function, which we denote by f g and read as f composed with g, is defined by (f g)(x) = f(g(x)). In other words, the function
More informationStructured Variational Inference
Structured Variational Inference Sargur srihari@cedar.buffalo.edu 1 Topics 1. Structured Variational Approximations 1. The Mean Field Approximation 1. The Mean Field Energy 2. Maximizing the energy functional:
More information3.3 Accumulation Sequences
3.3. ACCUMULATION SEQUENCES 25 3.3 Accumulation Sequences Overview. One of the most important mathematical ideas in calculus is that of an accumulation of change for physical quantities. As we have been
More informationOn Orthogonal Double Covers of Complete Bipartite Graphs by Disjoint Unions of Graph-Paths
International Journal of Scientific and Innovative Mathematical Research (IJSIMR) Volume 2, Issue 3, March 2014, PP 281-288 ISSN 2347-307X (Print) & ISSN 2347-3142 (Online) www.arcjournals.org On Orthogonal
More informationInterprocedurally Analyzing Polynomial Identities
Interprocedurally Analyzing Polynomial Identities Markus Müller-Olm 1, Michael Petter 2, and Helmut Seidl 2 1 Westfälische Wilhelms-Universität Münster, Institut für Informatik Einsteinstr. 62, 48149 Münster,
More informationLDPC Codes. Slides originally from I. Land p.1
Slides originally from I. Land p.1 LDPC Codes Definition of LDPC Codes Factor Graphs to use in decoding Decoding for binary erasure channels EXIT charts Soft-Output Decoding Turbo principle applied to
More informationCSCE 750 Final Exam Answer Key Wednesday December 7, 2005
CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 Do all problems. Put your answers on blank paper or in a test booklet. There are 00 points total in the exam. You have 80 minutes. Please note
More informationChapter 3: Root Finding. September 26, 2005
Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division
More informationSkill 6 Exponential and Logarithmic Functions
Skill 6 Exponential and Logarithmic Functions Skill 6a: Graphs of Exponential Functions Skill 6b: Solving Exponential Equations (not requiring logarithms) Skill 6c: Definition of Logarithms Skill 6d: Graphs
More informationRecursion and Induction
Recursion and Induction Themes Recursion Recursive Definitions Recurrence Relations Induction (prove properties of recursive programs and objects defined recursively) Examples Tower of Hanoi Gray Codes
More informationAxioms for Set Theory
Axioms for Set Theory The following is a subset of the Zermelo-Fraenkel axioms for set theory. In this setting, all objects are sets which are denoted by letters, e.g. x, y, X, Y. Equality is logical identity:
More informationExtended Weighted Pushdown Systems
Extended Weighted Pushdown Systems Akash Lal, Thomas Reps, and Gogul Balakrishnan University of Wisconsin, Madison, Wisconsin 53706 {akash, reps, bgogul}@cs.wisc.edu Abstract. Recent work on weighted-pushdown
More informationMATHS 730 FC Lecture Notes March 5, Introduction
1 INTRODUCTION MATHS 730 FC Lecture Notes March 5, 2014 1 Introduction Definition. If A, B are sets and there exists a bijection A B, they have the same cardinality, which we write as A, #A. If there exists
More informationarxiv: v1 [cs.pl] 19 May 2016
arxiv:1605.05858v1 [cs.pl] 19 May 2016 Domain Theory: An Introduction Robert Cartwright Rice University Rebecca Parsons ThoughtWorks, Inc. Moez AbdelGawad SRTA-City Hunan University This monograph is an
More informationRecursion and Induction
Recursion and Induction Themes Recursion Recursive Definitions Recurrence Relations Induction (prove properties of recursive programs and objects defined recursively) Examples Tower of Hanoi Gray Codes
More informationA Tutorial on Program Analysis
A Tutorial on Program Analysis Markus Müller-Olm Dortmund University Thanks! Helmut Seidl (TU München) and Bernhard Steffen (Universität Dortmund) for discussions, inspiration, joint work,... 1 Dream of
More informationMATH. 4548, Autumn 15, MWF 12:40 p.m. QUIZ 1 September 4, 2015 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points.
MATH. 4548, Autumn 15, MWF 12:40 p.m. QUIZ 1 September 4, 2015 PRINT NAME A. Derdzinski Show all work. No calculators. The problem is worth 10 points. 1. Let f : (, 0) IR be given by f(x) = 1/x 2. Prove
More informationCSC B36 Additional Notes sample induction and well-ordering proofs. c Nick Cheng
CSC B36 Additional Notes sample induction and well-ordering proofs c Nick Cheng Introduction We present examples of induction proofs here in hope that they can be used as models when you write your own
More informationMATH3283W LECTURE NOTES: WEEK 6 = 5 13, = 2 5, 1 13
MATH383W LECTURE NOTES: WEEK 6 //00 Recursive sequences (cont.) Examples: () a =, a n+ = 3 a n. The first few terms are,,, 5 = 5, 3 5 = 5 3, Since 5
More informationNormal Forms of Propositional Logic
Normal Forms of Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 12, 2017 Bow-Yaw Wang (Academia Sinica) Normal Forms of Propositional Logic September
More information13 More on free abelian groups
13 More on free abelian groups Recall. G is a free abelian group if G = i I Z for some set I. 13.1 Definition. Let G be an abelian group. A set B G is a basis of G if B generates G if for some x 1,...x
More informationRotation set for maps of degree 1 on sun graphs. Sylvie Ruette. January 6, 2019
Rotation set for maps of degree 1 on sun graphs Sylvie Ruette January 6, 2019 Abstract For a continuous map on a topological graph containing a unique loop S, it is possible to define the degree and, for
More informationRegister machines L2 18
Register machines L2 18 Algorithms, informally L2 19 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description
More information