Arithmetic Constraints and Automata

Slides:



Advertisements
Similar presentations
Black Box Checking Book: Chapter 9 Model Checking Finite state description of a system B. LTL formula. Translate into an automaton P. Check whether L(B)
Advertisements

Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Linked List Implementation class List { private List next; private Object data; private static List root; private static int size; public static void addNew(Object.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
BDD vs. Constraint Based Model Checking: An Experimental Evaluation for Asynchronous Concurrent Systems Tevfik Bultan Department of Computer Science University.
CS 267: Automated Verification Lecture 7: SMV Symbolic Model Checker, Partitioned Transition Systems, Counter-example Generation in Symbolic Model Checking.
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005.
Decision Procedures for Presburger Arithmetic Presented by Constantinos Bartzis.
1 2. Constraint Databases Next level of data abstraction: Constraint level – finitely represents by constraints the logical level.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Reachability Analysis for Some Models of Infinite-State Transition Systems Oscar H. Ibarra, Tevfik Bultan, and Jianwen Su Department of Computer Science.
Integrating Arithmetic Constraint Based Verification and Shape Analysis Tevfik Bultan Joint work with Tuba Yavuz-Kahveci Department of Computer Science.
Sanjit A. Seshia and Randal E. Bryant Computer Science Department
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
Automated Verification of Concurrent Linked Lists with Counters Tuba Yavuz-Kahveci and Tevfik Bultan Department of Computer Science University of California,
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Warm-up Find all the solutions over the complex numbers for this polynomial: f(x) = x4 – 2x3 + 5x2 – 8x + 4.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Decision Procedures for Presburger Arithmetic Presented by Constantinos Bartzis.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Cost-Optimal Symbolic Pattern Database Planning with State Trajectory and Preference Constraints Stefan Edelkamp University of Dortmund.
Zeros of Polynomials 2.5.
Section P.2 Solving Inequalities 1.Solutions of inequalities are all values that make it true (or satisfy the inequality); called a solution set Bounded.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
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.
Relational String Verification Using Multi-track Automata.
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Discrete Optimization
Programming and Data Structure
SS 2017 Software Verification Timed Automata
LPV: a new technique, based on linear programming, to formally prove or disprove safety properties J-L Lambert, valiosys.
Lecture No. 4 Number Systems
College Algebra Chapter 3 Polynomial and Rational Functions
New Characterizations in Turnstile Streams with Applications
Data Representation Binary Numbers Binary Addition
Solver & Optimization Problems
This statement is false.
Linear Bounded Automata LBAs
Instructor: Rajeev Alur
Automata Based String Analysis for Vulnerability Detection
William Stallings Computer Organization and Architecture 7th Edition
Proving that a Valid Inequality is Facet-defining
Other Models of Computation
LPSAT: A Unified Approach to RTL Satisfiability
(Part 3-Floating Point Arithmetic)
Unconventional Fixed-Radix Number Systems
Integer Programming (정수계획법)
Binary Decision Diagrams
Widening Automata.
An explicit state model checker
Integer Programming (정수계획법)
Bitwise Operators.
I.4 Polyhedral Theory.
Proving that a Valid Inequality is Facet-defining
Instructor: Aaron Roth
Course: CS60030 FORMAL SYSTEMS
Presentation transcript:

Arithmetic Constraints and Automata

Linear Arithmetic Constraints Can be used to represent sets of valuations of unbounded integers Linear integer arithmetic formulas can be stored as a set of polyhedra where each ckl is a linear equality or inequality constraint and each is a polyhedron

Linear Arithmetic Constraints Disjunction complexity: linear Conjunction complexity: quadratic Negation complexity: can be exponential Because of the disjunctive representation Satisfiability and Equivalence checking complexity: can be exponential Uses existential variable elimination Post and precondition computation complexity: can be exponential Existential variable elimination can be done by extending Fourier-Motzkin variable elimination to integers

Fourier-Motzkin Variable Elimination Given two constraints   bz and az   we have a  abz  b We can eliminate z as: z . a  abz  b if and only if a  b Every upper and lower bound pair can generate a separate constraint, the number of constraints can double for each eliminated variable real shadow

Consider the constraints: y . 0  3y – x  7  1 x – 2y  5 We get the following bounds for y: 2x  6y 6y  2x + 14 3x - 15  6y 6y  3x - 3 When we combine 2 lower bounds with 2 upper bounds we get four constraints: 0  14 , 3  x , x  29 , 0  12 Result is: 3  x  29

Integers are More Complicated If z is integer z . a  abz  b if a + (a - 1)(b - 1)  b Remaining solutions can be characterized using periodicity constraints in the following form: z .  + i = bz real shadow

x – 5  2y 2y  x – 1 x  3y 3y  x + 7 y 3 29 x dark shadow real shadow

What About Using BDDs for Encoding Arithmetic Constraints? Arithmetic constraints on bounded integer variables can be represented using BDDs Use a binary encoding represent integer x as x0x1x2... xk where x0, x1, x2, ... , xk are binary variables You have to be careful about the variable ordering!

Arithmetic Constraints vs. BDDs Constraint based verification can be more efficient than BDDs for integers with large domains BDD-based verification is more robust Constraint based approach does not scale well when there are boolean or enumerated variables in the specification Constraint based verification can be used to automatically verify infinite state systems cannot be done using BDDs Price of infinity Verification becomes undecidable and fixpoints are not guaranteed to converge

Fixpoints May Not Converge Integer variables can increase without a bound state space is infinite Verification is undecidable for systems with unbounded integer variables Must use approximation

Widening Assuming that i1 and i2 are conjunctions of atomic constraints (i.e., polyhedra), then i1  i2 is defined as: all the constraints in i1 which are also satisfied by i2 Example: i1 = 0count  count2 i2 = 0count  count3 i1  i2 = 0count Replace i2 with i1  i2 in c2 This generates an upper approximation for the least fixpoint computation This constraint is not satisfied by i2 so we drop it

Automata Representation for Arithmetic Constraints [Bartzis, Bultan CIAA’02, IJFCS ’02] Given an atomic linear arithmetic constraint in one of the following two forms we construct an FA which accepts all the solutions to the given constraint By combining such automata one can handle full Presburger arithmetic

Basic Construction We first construct a basic state machine which Reads one bit of each variable at each step, starting from the least significant bits and executes bitwise binary addition and stores the carry in each step in its state 0 1 0 0 / / 1 / 1 / 0 1 1 1 / / Example x + 2y 1 / 1 / 1 / 1 2 010 + 2  001 / 1 0 1 0 0 / / 1 Number of states:

Automaton Construction Equality With 0 All transitions writing 1 go to a sink state State labeled 0 is the only accepting state For disequations (), state labeled 0 is the only rejecting state Inequality (<0) States with negative carries are accepting No sink state Non-zero Constant Term c Same as before, but now -c is the initial state If there is no such state, create one (and possibly some intermediate states which can increase the size by |c|)

Conjunction and Disjunction Conjunction and disjunction is handled by generating the product automaton 0 0 1 0,1,1 0 1 0,1 1 Automaton for x-y<1 -1 0 0 0,1 0 1 0 1 1 1,0,1 1 1 1 Automaton for 2x-y>0 -1 -2 1 0 0 0,1 0 1 1,1 Automaton for x-y<1  2x-y>0 -1,-1 0,-1 -2,-1 -1,0 -2,0 -2,1