Abstract Interpretation: concrete and abstract semantics

Similar documents
Abstract Interpretation. Lecture 5. Profs. Aiken, Barrett & Dill CS 357 Lecture 5 1

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

UNTYPED LAMBDA CALCULUS (II)

cycle that does not cross any edges (including its own), then it has at least

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

SCHUR S THEOREM REU SUMMER 2005

COHORT MBA. Exponential function. MATH review (part2) by Lucian Mitroiu. The LOG and EXP functions. Properties: e e. lim.

Quasi-Classical States of the Simple Harmonic Oscillator

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming

Supplementary Materials

Strongly Connected Components

That is, we start with a general matrix: And end with a simpler matrix:

Einstein Equations for Tetrad Fields

Elements of Statistical Thermodynamics

ME 321 Kinematics and Dynamics of Machines S. Lambert Winter 2002

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013

1 Minimum Cut Problem

ANALYSIS IN THE FREQUENCY DOMAIN

Combinatorial Networks Week 1, March 11-12

Homework #3. 1 x. dx. It therefore follows that a sum of the

5.80 Small-Molecule Spectroscopy and Dynamics

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases.

Basic Polyhedral theory

Lie Groups HW7. Wang Shuai. November 2015

Construction of asymmetric orthogonal arrays of strength three via a replacement method

1 Isoparametric Concept

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J.

CS 361 Meeting 12 10/3/18

The graph of y = x (or y = ) consists of two branches, As x 0, y + ; as x 0, y +. x = 0 is the

Limiting value of higher Mahler measure

A Propagating Wave Packet Group Velocity Dispersion

Search sequence databases 3 10/25/2016

Objective Mathematics

(Upside-Down o Direct Rotation) β - Numbers

[ ] 1+ lim G( s) 1+ s + s G s s G s Kacc SYSTEM PERFORMANCE. Since. Lecture 10: Steady-state Errors. Steady-state Errors. Then

The Matrix Exponential

Lecture 37 (Schrödinger Equation) Physics Spring 2018 Douglas Fields

Examples and applications on SSSP and MST

Network Congestion Games

22/ Breakdown of the Born-Oppenheimer approximation. Selection rules for rotational-vibrational transitions. P, R branches.

Derangements and Applications

The second condition says that a node α of the tree has exactly n children if the arity of its label is n.

The Matrix Exponential

EEO 401 Digital Signal Processing Prof. Mark Fowler

Coupled Pendulums. Two normal modes.

Self-Adjointness and Its Relationship to Quantum Mechanics. Ronald I. Frank 2016

1973 AP Calculus AB: Section I

SOME PARAMETERS ON EQUITABLE COLORING OF PRISM AND CIRCULANT GRAPH.

Chapter 10. The singular integral Introducing S(n) and J(n)

Hydrogen Atom and One Electron Ions

Problem Set #2 Due: Friday April 20, 2018 at 5 PM.

Problem Statement. Definitions, Equations and Helpful Hints BEAUTIFUL HOMEWORK 6 ENGR 323 PROBLEM 3-79 WOOLSEY

Function Spaces. a x 3. (Letting x = 1 =)) a(0) + b + c (1) = 0. Row reducing the matrix. b 1. e 4 3. e 9. >: (x = 1 =)) a(0) + b + c (1) = 0

A Uniform Approach to Three-Valued Semantics for µ-calculus on Abstractions of Hybrid Automata

Higher order derivatives

Bifurcation Theory. , a stationary point, depends on the value of α. At certain values

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems

Text: WMM, Chapter 5. Sections , ,

Some remarks on Kurepa s left factorial

Ch. 24 Molecular Reaction Dynamics 1. Collision Theory

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, April 04, 2005, 8:35 AM) PART I: CHAPTER TWO COMB MATH.

(1) Then we could wave our hands over this and it would become:

Title: Vibrational structure of electronic transition

priority queue ADT heaps 1

dy 1. If fx ( ) is continuous at x = 3, then 13. If y x ) for x 0, then f (g(x)) = g (f (x)) when x = a. ½ b. ½ c. 1 b. 4x a. 3 b. 3 c.

Problem Set 6 Solutions

Chapter 8: Electron Configurations and Periodicity

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM

Chemical Physics II. More Stat. Thermo Kinetics Protein Folding...

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES. 1. Statement of results

Linear-Phase FIR Transfer Functions. Functions. Functions. Functions. Functions. Functions. Let

PHYSICS 489/1489 LECTURE 7: QUANTUM ELECTRODYNAMICS

A. Limits and Horizontal Asymptotes ( ) f x f x. f x. x "±# ( ).

Equidistribution and Weyl s criterion

Introduction to Condensed Matter Physics

EXST Regression Techniques Page 1

Differentiation of Exponential Functions

u 3 = u 3 (x 1, x 2, x 3 )

Addition of angular momentum

10. Limits involving infinity

On the irreducibility of some polynomials in two variables

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis

First order differential equation Linear equation; Method of integrating factors

On the Hamiltonian of a Multi-Electron Atom

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages:

Electromagnetic scattering. Graduate Course Electrical Engineering (Communications) 1 st Semester, Sharif University of Technology

Junction Tree Algorithm 1. David Barber

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation.

From Elimination to Belief Propagation

Chapter 13 GMM for Linear Factor Models in Discount Factor form. GMM on the pricing errors gives a crosssectional

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES

The Equitable Dominating Graph

Constants and Conversions:

Properties of Phase Space Wavefunctions and Eigenvalue Equation of Momentum Dispersion Operator

Engineering 323 Beautiful HW #13 Page 1 of 6 Brown Problem 5-12

Computing and Communications -- Network Coding

First derivative analysis

Brief Introduction to Statistical Mechanics

The van der Waals interaction 1 D. E. Soper 2 University of Oregon 20 April 2012

Economics 201b Spring 2010 Solutions to Problem Set 3 John Zhu

Transcription:

Abstract Intrprtation: concrt and abstract smantics

Concrt smantics W considr a vry tiny languag that manags arithmtic oprations on intgrs valus. Th (concrt) smantics of th languags cab b dfind by th funzcion m dfind by: i m : Exp Int m() i i m( ) m( ) m( ) 1 2 1 2 2

Abstract Smantics Considr now an abstract smantics ovr th domain of signs :Exp,-,0 if i 0 0 ( i) 0 if i 0 0 if i 0 0 0 0 0 ( ) ( ) ( ) 0 1 2 1 2 3

From a diffrnt prspctiv W can associat to ach abstract valu th st of concrt lmnts it rprsnts. Th concrtization function : : {,0, } 2 ( ) i i 0 (0) 0 Int ( ) i i 0 4

Concrtization Th concrtization function maps an abstract valu to a st of concrt lmnts Lt D dnot th comncrt domain and A dnot th abstract domain. Th corrctnss of th abstract smantics wrt th concrt on can b xprssd by: A m( ) ( ( )) Exp m 2 D 5

Abstract Intrprtation Abstract Intrprtation is: Computing th smantics of a program in an abstract domain In th cas of signs, th domain so far is {+,0,-}. Th abstract smantics should b corrct it is an ovr approximation of th concrt smantics Th rlatrion btwn t two domains is givn by a concrtization function 6

Considr th unary oprator - Lt us add to our languag th unary oprator - m( ) m( ) 0 ( ) ( ) 0 7

Considr th binary opration + Adding th addition oprator focrcs us to modify th domain, as th prvious on is not abl to rprsnt th rsult of adding numbrs of opposit sign 0 m( ) m( ) m( ) 1 2 1 2? ( ) ( ) ( ) 0 0 1 2 1 2? 8

So W add to th domain a nw lmnt that rprsnts all th intgr numbrs (both positiv and ngativ, and zro) 0 T T T (T) Int 0 0 T T T T T T T T 9

Th oprations should b rvisitd 0 T 0 T 0 0 0 0 0 0 T T T 0 T T 0 T 0 T 10

Exampls Somtims thr is information loss du to th abstract oprations m((1 2) 3) 0 ((1 2) 3) ( ) ( ) T Somtims thr is no information loss, with rspct to th abstraction m((5 5) 6) 31 ((5 5) 6) ( ) 11

Considr th division oprator / Problm: what is th rsult of dividing by zro? No numbr! So w nd a nw lmnt in our domain that rprsnts th mpty st of intgrs (i.. a failur stat) But.. What s wrong in th tabl blow? / 0 T 0 T x ( ) 0 0 T x T T 0 T T 12

Th rsulting abstract domain It is a finit complt lattic Th partial ordr is cohrnt wrt th concrtization function: T x y ( x ) ( y ) 0 13

Th abstraction function Th concrtization function has an adjoint function, th abstraction function a. Function a maps a st of concrt valus into th bst rprsntation of this st in th abstract domain (th smallr lmnt f th abstract domain that rprsnts of of ths lmnts) In our xampl:, Int a : 2 A a( S ) lub i 0 i S, 0 0 S, i 0 i S ( i) a({ i}) 14

A gnral dfinition An Abstract Intrprtation consists of: An abstract domain A and a concrt domain D A and D ar complt lattics. Smallr mans mor prcis Two monoton adjoint function that njoy ch formino una insrzion di Galois. Abstract oprations that ar corrct wrt th concrt ons A fixpoint algorithm D Galois insrtion: a x 2. x ( ( x )) a A. x a ( ( x )) 15

Corrctnss rvisitd If cas of Galois insrtion, ths corrctnss conditions ar quivalnt (prov it!) m( ) ( ( )) ( ) a({ m( )}) Exp m A 2 D a 16

Corrctnss W show that in ordr to nsur th corrctnss of th whol analysis th following conditions ar sufficint: 1. Th function a and ar monoton 2. Th function a and form a Galois insrtion 3. Th abstract oprations ar locally corrct, i.. (op( s,..., s )) op( ( s ),..., ( s )) 1 n 1 n Notic that thr is always a way to dfin a locally corrct abstract opration. It is sufficint to considr th oprations that rturns th top lmnt of th abstract domain. 17

Local corrctnss A op A (op( s1,..., s n )) 2 D op 2 D op( ( s ),..., ( s n )) 1 18

Corrctnss proof W show by structural induction on that: m( ) ( ( )) Basic stp: m() i i df. di m {} i a ( ({ i })) insrzion di Galois ( (i) ) df di 19

Corrctnss proof Inductiv Stp m( ) ( ( )) m( op ) 1 2 m( ) op m( ) 1 2 ( ( )) op ( ( )) 1 2 ( ( ) op ( )) 1 2 ( ( op )) 1 2 df. di m pr ipotsi induttiva corrttzza local df di 20

Adding an input W can xtnd our tiny languag with th possibility to gt an input valu from th usr This mans that w hav a variabl x in th xprssions i... x 21

Concrt smantics Th smantic function m bcoms m : Exp Int Int And w may xprss it in trms of a family of functions, having xprssions as indcs and a singl paramtr (th input valu) m ( j) i m ( j) x i j m ( j ) m ( j ) m ( j ) 1 2 1 2 m ( j ) m ( j ) m ( j ) 1 2 1 2...... 22

Abstract smantics Th sam holds for th abstract smantic function : Exp A A Also in this cas w can xprss by a family of functions: ( j) i x ( j) i j ( j ) ( j ) ( j ) 1 2 1 2 ( j ) ( j ) ( j ) 1 2 1 2...... i a({ i}) 23

Corrctnss Th following conditions ar quivalnt i. m ( i ) ( ( a({ i }))) m a D a m a A A a A a m 2 D 2 D 24

Local corrctnss W can xprss th local corrntss condition by: ( ( )),..., ( ( )) ( ( ),..., ( )) op j j op j j 1 n 1 n 25

Conditional statmnt... if thn ls... Concrt smantics m if thn ls 1 2 3 4 () i m ( i ) if m m 3 ( i ) 1 ( i ) 2 m ( i ) if m ( ) m ( ) 4 i 1 i 2 Abstract smantics ( i ) ( i ) ( i ) if thn ls 1 2 3 4 3 4 Notic th rol of th lub in th abstract domain 26

Corrctnss of th conditional statm. Assum that th condition is tru (th othr cas is analogous) m ( ( i )) pr induzion ( ( i)) ( ( i)) 3 () i 3 3 4 ( i) ( i) monotonia di 3 4 ( ( i )) if thn ls 1 2 3 4 27