Abstraction Data type based abstractions

Slides:



Advertisements
Similar presentations
The Logic of Quantified Statements
Advertisements

Abstraction of Source Code (from Bandera lectures and talks)
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
 Control structures  Algorithm & flowchart  If statements  While statements.
Week 1 Chapter 1 + Appendix A Signals carry information Signals are represented by functions Systems transform signals Systems are represented by functions,
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Thirteen conditional expressions: letting programs make “decisions”
Propositional Calculus Math Foundations of Computer Science.
12.6 Matrices & Transformations. Graphical transformations (reflections & rotations) can be interpreted using matrices. (point) general or specific 
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
4.4 Equations as Relations
2.3 Analyzing Graphs of Functions. Graph of a Function set of ordered pairs.
Predicate Abstraction of ANSI-C Programs Using SAT By Edmund Clarke, Daniel Kroening, Natalia Sharygina, Karen Yorav Presented by Yunho Kim Provable Software.
1 Bisimulations as a Technique for State Space Reductions.
CPS120: Introduction to Computer Science Operations Lecture 9.
Finding Feasible Counter-examples when Model Checking Abstracted Java Programs Corina S. Pasareanu, Matthew B. Dwyer (Kansas State University) and Willem.
Programming Fundamental Slides1 Data Types, Identifiers, and Expressions Topics to cover here: Data types Variables and Identifiers Arithmetic and Logical.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Warm up Problems Assume for a continuous and differentiable function, f (-1) = -2 and f (3) = 6. Answer the following true or false, then state the theorem.
Algebra 1cc Functions 3 Determine the domain and range of a function from its graph Recall: the domain of a function is its independent or x values. The.
Lesson 1.4 Equations and Inequalities Goal: To learn how to solve equations and check solutions of equations and inequalities.
Tool-supported Program Abstraction for Finite-state Verification Matthew Dwyer 1, John Hatcliff 1, Corina Pasareanu 1, Robby 1, Roby Joehanes 1, Shawn.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Tool-supported Program Abstraction for Finite-state Verification Matthew Dwyer 1, John Hatcliff 1, Corina Pasareanu 1, Robby 1, Roby Joehanes 1, Shawn.
( = “unknown yet”) Our novel symbolic execution framework: - extends model checking to programs that have complex inputs with unbounded (very large) data.
Language Implementation Overview John Keyser Spring 2016.
 A.4f Apply these skills to solve practical problems.  A.4b Justify steps used in solving equations.  Use a graphing calculator to check your solutions.
OBJECTIVES:  Find inverse functions and verify that two functions are inverse functions of each other.  Use graphs of functions to determine whether.
24 September 2002© Willem Visser Program Model Checking Enabling Technology Abstraction void add(Object o) { buffer[head] = o; head = (head+1)%size;
Radical Functions and Equations ( 무리함수 ) Radical sign index The term is called a radical. The symbol is called a radical sign(sometimes just called radical.
Opener: Find three consecutive odd integers whose sum is -63 Integer #1 = n Integer #2 = n + 2 Integer #3 = n + 4 (n) + (n + 2) + (n + 4) = -63 3n + 6.
1.7: Adding Like Terms TERM: A number, a variable, or the product of the two.Ex: a, 3x, 2x, 5, CONSTANT: a term with no variable (number) Ex: 4, -1, 6,
PreCalculus 3-2 Logarithmic Functions. Write the following equation in exponential form.
Control Flow Testing Handouts
Model Checking Java Programs (Java PathFinder)
Abstraction of Source Code
Propositional Calculus: Boolean Functions and Expressions
1 Introduction to Algebra: Integers.
Software Model Checking
Outline of the Chapter Basic Idea Outline of Control Flow Testing
2.1 Day 2 Homework Answers D: −2,∞
Propositional Calculus: Boolean Functions and Expressions
Science Fair Project Template
Symbolic Implementation of the Best Transformer
Data Types, Identifiers, and Expressions
1.2 Introduction to Signed Numbers
Image Enhancement in the
B5 Solving Linear Inequalities
Mathematics for Computer Science MIT 6.042J/18.062J
Systems of Inequalities
6.1 to 6.3 Solving Linear Inequalities
A Brief Summary for Exam 1
6.1 to 6.3 Solving Linear Inequalities
2.1 Solving Linear Inequalities
2.1 – 2.2 Solving Linear Inequalities
Symbolic Characterization of Heap Abstractions
Solving 1-Step Integer Equations
Search techniques.
Abstraction, Verification & Refinement
Is 3 a solution for the inequality x – 2 < 6?
SOLVING INEQUALITIES.
Predicate Abstraction
Variables and Equations
Just how far from zero are you?
Objective: To graph square root functions
2.3 Represent Relations & Functions p. 33
Integers Blast Off
Systems of Inequalities
Presentation transcript:

Abstraction Data type based abstractions Abstract Interpretation (Patrick Cousot) E.g. replace integer variable with odd-even range or Signs abstraction {negative,zero,positive} Replace all operations on the concrete variable with corresponding abstract operations add(pos,pos) = pos subtract(pos,pos) = negative | zero | pos eq(pos,pos) = true | false Predicate Abstraction (Graf, Saïdi see also Uribe) Create abstract state-space w.r.t. set of predicates defined in concrete system 24 September 2002 © Willem Visser 2002

Data Type Abstraction Collapses data domains via abstract interpretation: Code Data domains int int x = 0; if (x == 0) x = x + 1; (n<0) : NEG (n==0): ZERO (n>0) : POS Signs NEG POS ZERO Signs x = ZERO; if (Signs.eq(x,ZERO)) x = Signs.add(x,POS); The technique can be illustrated on this fragment of code; assume we would like to keep only enough info about x to allow the conditional test to be decided. So we only need to know if x is zero or not for this we could use the signs abstraction that maps integers onto a set of 3 symbolic values:neg,zero,pos we transform the code so that to operate on the abs domain and it looks like this; here the concrete type int was replaced by abs type signs, concrete constants 0 and 1 were replaced with abs ct 0 and pos; and primitive ops on ints were replaced with calls to some methods that implement the abs.ops.that manipulate abstract values. Ex : equality operator was replaced with a call to method signs.eq and + was replace by signs.add . So, how do we apply this abstraction technique to the DEOS example ? We have to decide which variables to abstract, what abstrations to use and then we have to effectively transform the system to encode the abstractions. 24 September 2002 © Willem Visser 2002

Predicate Abstraction x  y Abstract Concrete x = y F T a : int  int bool EQ = T EQ := F EQ = F EQ  (x = y) EQ  (x = y) y++ x = 0 y = 0 x = 0 y = 1 Mapping of a concrete system to an abstract system, whose states correspond to truth values of a set of predicate Create abstract state-graph during model checking, or, Create an abstract transition system before model checking 24 September 2002 © Willem Visser 2002

Example Predicate Abstraction Predicate: B  (x = y) Concrete Statement y := y + 1 Abstract Statement Step 1: Calculate pre-images {x = y + 1} y := y + 1 {x = y} {x  y + 1} y := y + 1 {x  y} Step 2: Rewrite in terms of predicates Step 2a: Use Decision Procedures {x = y + 1} y := y + 1 {B} {B} y := y + 1 {~B} x = y  x = y + 1 x = y  x  y + 1 x  y  x = y + 1 x  y  x  y + 1 Step 3: Abstract Code IF B THEN B := false ELSE B := true | false 24 September 2002 © Willem Visser 2002

Example of Infeasible Counter-example [1] if (-2 + 3 > 0) then [2] assert(true); else [3] assert(false); [1] if(Signs.gt(Signs.add(NEG,POS),ZERO)) then [2] assert(true); else [3] assert(false); {NEG,ZERO,POS} Signs: n < 0 -> neg 0 -> zero n > 0 -> pos Infeasible counter-example [1]: [2]: [1]: [2]: [3]: X 24 September 2002 © Willem Visser 2002