Mark Marron IMDEA-Software (Madrid, Spain) 1.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Modular and Verified Automatic Program Repair Francesco Logozzo, Thomas Ball RiSE - Microsoft Research Redmond.
An Abstract Interpretation Framework for Refactoring P. Cousot, NYU, ENS, CNRS, INRIA R. Cousot, ENS, CNRS, INRIA F. Logozzo, M. Barnett, Microsoft Research.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Programming Paradigms and languages
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Analysis of programs with pointers. Simple example What are the dependences in this program? Problem: just looking at variable names will not give you.
V Storage Manager Shahram Ghandeharizadeh Computer Science Department University of Southern California.
Stanford University CS243 Winter 2006 Wei Li 1 Register Allocation.
Register Allocation CS 671 March 27, CS 671 – Spring Register Allocation - Motivation Consider adding two numbers together: Advantages: Fewer.
The Volcano/Cascades Query Optimization Framework
Fast Algorithms For Hierarchical Range Histogram Constructions
Chair of Software Engineering The alias calculus Bertrand Meyer ITMO Software Engineering Seminar June 2011.
Greedy Algorithms Greed is good. (Some of the time)
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Parallel Inclusion-based Points-to Analysis Mario Méndez-Lojo Augustine Mathew Keshav Pingali The University of Texas at Austin (USA) 1.
Guoquing Xu, Atanas Rountev Ohio State University Oct 9 th, 2008 Presented by Eun Jung Park.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
The Design Process Outline Goal Reading Design Domain Design Flow
Pointer and Shape Analysis Seminar Context-sensitive points-to analysis: is it worth it? Article by Ondřej Lhoták & Laurie Hendren from McGill University.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 4: Modeling Decision Processes Decision Support Systems in the.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Data Structures Lecture-1:Introduction
CS745: Register Allocation© Seth Copen Goldstein & Todd C. Mowry Register Allocation.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Language Evaluation Criteria
Mark Marron IMDEA-Software (Madrid, Spain) 1.
Names Variables Type Checking Strong Typing Type Compatibility 1.
Coverage – “Systematic” Testing Chapter 20. Dividing the input space for failure search Testing requires selecting inputs to try on the program, but how.
Coverage Literature of software testing is primarily concerned with various notions of coverage Four basic kinds of coverage: Graph coverage Logic coverage.
CSE 425: Data Types II Survey of Common Types I Records –E.g., structs in C++ –If elements are named, a record is projected into its fields (e.g., via.
Introduction. 2COMPSCI Computer Science Fundamentals.
©Silberschatz, Korth and Sudarshan13.1Database System Concepts Chapter 13: Query Processing Overview Measures of Query Cost Selection Operation Sorting.
Mark Marron, Mario Mendez-Lojo Manuel Hermenegildo, Darko Stefanovic, Deepak Kapur 1.
File Processing - Indexing MVNC1 Indexing Jim Skon.
Inferring Specifications to Detect Errors in Code Mana Taghdiri Presented by: Robert Seater MIT Computer Science & AI Lab.
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
The Volcano Query Optimization Framework S. Sudarshan (based on description in Prasan Roy’s thesis Chapter 2)
1 Records Record aggregate of data elements –Possibly heterogeneous –Elements/slots are identified by names –Elements in same fixed order in all records.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Mark Marron IMDEA-Software (Madrid, Spain) 1.
Convergence of Model Checking & Program Analysis Philippe Giabbanelli CMPT 894 – Spring 2008.
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
Software Waterfall Life Cycle
Lecture by: Prof. Pooja Vaishnav.  Language Processor implementations are highly influenced by the kind of storage structure used for program variables.
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Static Identification of Delinquent Loads V.M. Panait A. Sasturkar W.-F. Fong.
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
HeapSort 25 March HeapSort Heaps or priority queues provide a means of sorting: 1.Construct a heap, 2.Add each item to it (maintaining the heap.
9 Set ADTs  Set concepts  Set applications  A set ADT: requirements, contract  Implementations of sets: using member arrays, linked lists, boolean.
1 Proving program termination Lecture 5 · February 4 th, 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A.
Quantified Data Automata on Skinny Trees: an Abstract Domain for Lists Pranav Garg 1, P. Madhusudan 1 and Gennaro Parlato 2 1 University of Illinois at.
CSE 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
Certifying and Synthesizing Membership Equational Proofs Patrick Lincoln (SRI) joint work with Steven Eker (SRI), Jose Meseguer (Urbana) and Grigore Rosu.
Data Structure Interview Question and Answers
We propose a method which can be used to reduce high dimensional data sets into simplicial complexes with far fewer points which can capture topological.
structures and their relationships." - Linus Torvalds
Fast Computation of Symmetries in Boolean Functions Alan Mishchenko
Parametric Shape Analysis via 3-Valued Logic
Pointer analysis.
ICOM 5016 – Introduction to Database Systems
Trevor Brown DC 2338, Office hour M3-4pm
structures and their relationships." - Linus Torvalds
Run-time environments
Overview: Chapter 2 Localization and Tracking
Presentation transcript:

Mark Marron IMDEA-Software (Madrid, Spain) 1

 We want to provide basic information about the program heap for supporting a range of client applications IDE tools (query, refactoring, etc.) Optimization Error Detection  Focus on scalable, manageable models/tools even at cost of overall expressivity/analytic power 2

 Fix sharing info extraction  Add disjoint/overlaps for set information  Point out, more than just variable relations is desirable, variables transient 3

 Track basic set relations Membership, Overlapping, Non-Overlapping Subset, Set Equality  Ensure small computational cost  High precision is not required but must handle common cases accurately Iterative subset construction/mutation Set style library operations  Union (AddAll)  Intersection  IsSubset  Contains 4

 Start with existing model that decomposes heap into related regions Reduces the complexity of the set formula that are needed Storage shape graph works well  Nodes represent sets of objects (or data structures), edges represent sets of pointers  Fine grained partitioning is possible  Disjointness properties are natural (and mostly free)  Annotate edges with additional properties to track reference set relations 5

 Key issue for shape graph approach is how to group concrete objects into abstract nodes Too many nodes is confusing and computationally expensive Too few nodes leads to imprecision (as a single node must represent multiple logical structures) Often done via allocation site or types  Solution: nodes are similar sets of objects Recursive type information (recursive vs. non- recursive types) Objects stored in the same collection, array or structure 6

7

8

 Given a set of heap references R the corresponding target set is: {Object o | ∃ r ∈ R that points to o}  The two sets of heap references can be related with ⊆ on the target sets  As the heap is partitioned into regions of objects we also define a notion of coverage A reference set covers a region if every object in the region is in the corresponding target set 9

 Several possible choices for representing these relations Theory of sets over all objects/references Full binary relations on power sets of edges Reduced set of relations  For efficiency we use a reduced set of relations Equality of the reference sets abstracted by pairs of edges (E × E) Relation from sets of edges to nodes that are covered by the abstracted references (℘(E) × N) 10

 Track target set equality of the pointers abstracted by pairs of edges 11

 Track if all nodes in region are contained in the target sets of given edges 12

 There are a number of useful inferences that can be made from these two properties If e, eʹ are edge equivalent and e has an empty concretization then eʹ must have an empty concretization as well If an edge e covers node n then any other in edge represents a target set that is ⊆ to the target set for edge e 13

14

 Note that the proposed reference set relations subsume classic must-alias In the concrete model variables x == y (x, y non- null) iff Target(x) = Target(y) In the abstract model the variables x, y must-alias iff the corresponding edges e x and e y are edge equivalent 15

16... for(int i = 0; i < V.Length; ++i) V[i].f = 0;

17... for(int i = 0; i < V.Length; ++i) V[i].f = 0;

BenchmarkLOCAnalysis TimeAnalysis Mem em3d s<30MB bh s<30MB db s<30MB raytrace s45MB Exp s50MB Interpreter s147MB 18

 Tracking reference set information is computationally inexpensive  Results are precise enough to model many interesting/important relations  In fact surprisingly so Why? Most conditions end up being simple Is this a general property? Are most programs made of simple relations/concepts which are composed into complex concepts (we hope so) Could we use rich set decision procedures, e.g. all conditions are simple ⇒ most proofs easy/fast with right decomposition 19

 Build strong foundation for other tools to utilize  Transform core concepts from prototype to robust tools Finish implementation of static analysis for CLI bytecode + core libraries (also runtime support) Export results to Visual Studio for inspection, spec. generation, or other tools  Apply results in optimization, refactoring, and error detection applications 20

21