Combining Abstract Interpreters

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

Abstract Interpretation Part II
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Shape Analysis by Graph Decomposition R. Manevich M. Sagiv Tel Aviv University G. Ramalingam MSR India J. Berdine B. Cook MSR Cambridge.
3-Valued Logic Analyzer (TVP) Tal Lev-Ami and Mooly Sagiv.
Chair of Software Engineering From Program slicing to Abstract Interpretation Dr. Manuel Oriol.
Lecture 04 – Numerical Abstractions Eran Yahav 1.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
Abstractions. Outline Informal intuition Why do we need abstraction? What is an abstraction and what is not an abstraction A framework for abstractions.
Program analysis Mooly Sagiv html://
Control Flow Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
1 Iterative Program Analysis Part I Mooly Sagiv Tel Aviv University Textbook: Principles of Program.
Program analysis Mooly Sagiv html://
1 Control Flow Analysis Mooly Sagiv Tel Aviv University Textbook Chapter 3
1 Iterative Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
Weizmann Institute Range Minimization O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
Abstract Interpretation Part I Mooly Sagiv Textbook: Chapter 4.
1 Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
1 Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
1 Systematic Domain Design Some Remarks. 2 Best (Conservative) interpretation abstract representation Set of states concretization Abstract semantics.
Overview of program analysis Mooly Sagiv html://
1 Program Analysis Systematic Domain Design Mooly Sagiv Tel Aviv University Textbook: Principles.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Overview of program analysis Mooly Sagiv html://
1 Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
1 Tentative Schedule u Today: Theory of abstract interpretation u May 5 Procedures u May 15, Orna Grumberg u May 12 Yom Hatzamaut u May.
Precision Going back to constant prop, in what cases would we lose precision?
Program Analysis and Verification Noam Rinetzky Lecture 10: Shape Analysis 1 Slides credit: Roman Manevich, Mooly Sagiv, Eran Yahav.
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 11: Abstract Interpretation III Roman Manevich Ben-Gurion University.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 14: Numerical Abstractions Roman Manevich Ben-Gurion University.
Program Analysis and Verification Noam Rinetzky Lecture 6: Abstract Interpretation 1 Slides credit: Roman Manevich, Mooly Sagiv, Eran Yahav.
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 14: Numerical Abstractions Roman Manevich Ben-Gurion University.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 9: Abstract Interpretation I Roman Manevich Ben-Gurion University.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 12: Abstract Interpretation IV Roman Manevich Ben-Gurion University.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
1 Shape Analysis via 3-Valued Logic Mooly Sagiv Tel Aviv University Shape analysis with applications Chapter 4.6
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 13: Abstract Interpretation V Roman Manevich Ben-Gurion University.
1 Combining Abstract Interpreters Mooly Sagiv Tel Aviv University
1 Languages and Compilers (SProg og Oversættere) Compiler Optimizations Bent Thomsen Department of Computer Science Aalborg University With acknowledgement.
Program Analysis and Verification Spring 2014 Program Analysis and Verification Lecture 12: Abstract Interpretation IV Roman Manevich Ben-Gurion University.
Program Analysis and Verification
Program Analysis and Verification
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
1 Numeric Abstract Domains Mooly Sagiv Tel Aviv University Adapted from Antoine Mine.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
1PLDI 2000 Off-line Variable Substitution for Scaling Points-to Analysis Atanas (Nasko) Rountev PROLANGS Group Rutgers University Satish Chandra Bell Labs.
Chaotic Iterations Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
Chaotic Iterations Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
Program Analysis and Verification
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
Program Analysis Last Lesson Mooly Sagiv. Goals u Show the significance of set constraints for CFA of Object Oriented Programs u Sketch advanced techniques.
Spring 2017 Program Analysis and Verification
Spring 2016 Program Analysis and Verification
Spring 2016 Program Analysis and Verification
Textbook: Principles of Program Analysis
Spring 2016 Program Analysis and Verification
Spring 2016 Program Analysis and Verification
Iterative Program Analysis Abstract Interpretation
Program Analysis and Verification
Distributed Event Processing With Java Shared Object Spaces
Program Analysis and Verification
Abstract Interpretation
Data Flow Analysis Compiler Design
((a)) A a and c C ((c))
Languages and Compilers (SProg og Oversættere) Compiler Optimizations
Abstract Interpretation
Presentation transcript:

Combining Abstract Interpreters Mooly Sagiv

Combining Data Flow Analyzes Develop new algorithms from old If I know how to conservatively represent Pointers Integers Do I know how to handle C programs with integers and pointers?

Combining Data Flow Analyzes Develop new algorithms from old If I know how to conservatively represent Pointers Integers Do I know how to handle C programs with integers and pointers? Improve the precision of an analysis Obtain a more efficient analysis

Combining Data Flow Analyzers Lattice constructors L1  L2 S  L1 … Galois connection constructors Constructing the abstract effect of elementary statements Model the “relevant” parts of the program Abstract “irrelevant” parts of the program

Cartesian Products A complete lattice (L1, 1) = (L1, , 1, 1, 1, 1) A complete lattice (L2, 2) = (, , 2, 2, 2, 2) Define a Poset L = (L1  L2 , ) where (x1, x2)  (y1, y2) if x1  y1 and x2  y2 L is a complete lattice But what does an element in L represent?

Cartesian Products (cont) A complete lattice (L1, 1) = (L1, , 1, 1, 1, 1) A complete lattice (L2, 2) = (, , 2, 2, 2, 2) Complete lattice L = (L1  L2 , ) A concrete lattice C (usually a powerset) A Galois connection (C, 1 , 1, L1) A Galois connection (C, 2 , 2, L2) Define :C L1  L2 and : L1  L2  C ? Example: Parity  Sign

Cartesian Products (cont) A Galois connection (C, 1 , 1, L1) A Galois connection (C, 2 , 2, L2) A Galois connection (C,  , , L1  L2 ) (c) = <1(c), 2(c)> (<a1, a2>) = 1(a1)  2(a2) Define L1st#: L1 L1 L2st#: L2 L2 How to define L1  L2 st#: L1  L2  L1  L2 Preserve soundness Preserve relative optimality (induced) Reasonable Example: Parity  Sign

Semantic Reduction Consider a Galois connection (C,  , , A) An operation op: A  A is a semantic reduction if For all a  A: op(a)  a and (op(a)) = (a)

Component-wise combinations Combine several analyses into a single analysis Cartesian products (Direct product) Independent attribute method Relational attribute method Total function space Monotone function space Direct tensor product

Independent Attribute Method A Galois connection (C1, 1 , 1, L1) A Galois connection (C2, 2 , 2, L2) A Galois connection (C1C2,  , , L1  L2 ) (<c1, c2>) = <1(c1), 2(c2)> (<a1, a2>) = <1(a1) , 2(a2)> Define L1st#: L1 L1 L2st#: L2 L2 How to define L1  L2 st#: L1  L2  L1  L2 Preserve soundness Preserve relative optimality (induced)

Relational Attribute Method A Galois connection (P(C1), 1 , 1, P(L1)) where 1: C1L1 1 (X) = {1(c) | c  X} A Galois connection (P(C2), 2 , 2, P(L2)) where 2: C2L2 2 (X) = {2(c) | c  X} A Galois connection (P(C1C2),  , , P(L1  L2)) (<X1, X2>) = {<1(c1), 2(c2)> | c1  X1, c2  X2} (<Y1,Y2>) = {<c1 , c2> | 1(c1)  Y1 2(c2)  Y2 } But how about transformers?

Component-wise combinations Combine several analyses into a single analysis Cartesian products (Direct product) Independent attribute method Relational attribute method Total function space Monotone function space Direct tensor product