Linked List Implementation class List { private List next; private Object data; private static List root; private static int size; public static void addNew(Object.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Assertion Checking over Combined Abstraction of Linear Arithmetic and Uninterpreted Functions Sumit Gulwani Microsoft Research, Redmond Ashish Tiwari SRI.
A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
B ϋ CHIS MONADIC SECOND ORDER LOGIC Verification Seminar V.Sowjanya Lakshmi ( Subhasree M.
PARIXIT PRASAD December 4, 2013 Parixit Prasad | CSA - IISC 1 Deciding Presburger Arithmetic Using Automata Department of Computer Science and Automaton.
Synthesis, Analysis, and Verification Lecture 04c Lectures: Viktor Kuncak VC Generation for Programs with Data Structures “Beyond Integers”
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Gennaro Parlato (LIAFA, Paris, France) Joint work with P. Madhusudan Xiaokang Qie University of Illinois at Urbana-Champaign.
Gennaro Parlato (LIAFA, Paris, France) Joint work with P. Madhusudan Xiaokang Qie University of Illinois at Urbana-Champaign.
Satisfiability Modulo Theories (An introduction)
SMT Solvers (an extension of SAT) Kenneth Roe. Slide thanks to C. Barrett & S. A. Seshia, ICCAD 2009 Tutorial 2 Boolean Satisfiability (SAT) ⋁ ⋀ ¬ ⋁ ⋀
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Software Engineering & Automated Deduction Willem Visser Stellenbosch University With Nikolaj Bjorner (Microsoft Research, Redmond) Natarajan Shankar (SRI.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
On the Use of Automata Techniques to Decide Satisfiability Mia Minnes May 3, 2005.
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
Decision Procedures for Presburger Arithmetic Presented by Constantinos Bartzis.
Interpolants [Craig 1957] G(y,z) F(x,y)
Combining Theories Sharing Set Operations Thomas Wies joint work with Ruzica Piskac and Viktor Kuncak TexPoint fonts used in EMF. Read the TexPoint manual.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Prof. Necula CS Lecture 111 Theorem Proving for FOL Satisfiability Procedures CS Lecture 11.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
Ofer Strichman, Technion Deciding Combined Theories.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
Decision Procedures for Presburger Arithmetic Presented by Constantinos Bartzis.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Dagstuhl Seminar "Applied Deductive Verification" November Symbolically Computing Most-Precise Abstract Operations for Shape.
Binary Decision Diagrams (BDDs)
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Automatic Structures Bakhadyr Khoussainov Computer Science Department The University of Auckland, New Zealand.
Calculus of Data Structures for verification, and synthesis Viktor Kuncak Lab for Automated Reasoning and Analysis EPFL School of Computer and Communication.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Integrating high-level constructs into programming languages Language extensions to make programming more productive Underspecified programs –give assertions,
Proving Non-Termination Gupta, Henzinger, Majumdar, Rybalchenko, Ru-Gang Xu presentation by erkan.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Synthesis, Analysis, and Verification Lecture 08 Lectures: Viktor Kuncak BAPA: Quantifier Elimination and Decision Procedures WS1S: Automata-Based Decision.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
Learning Universally Quantified Invariants of Linear Data Structures Pranav Garg 1, Christof Loding, 2 P. Madhusudan 1 and Daniel Neider 2 1 University.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
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.
1/20 Arrays Changki PSWLAB Arrays Daniel Kroening and Ofer Strichman Decision Procedure.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Selected Decision Procedures and Techniques for SMT More on combination – theories sharing sets – convex theory Un-interpreted function symbols (quantifier-free.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Decision Procedures in First Order Logic
Quick Course Overview Quick review of logic and computational problems
From Classical Proof Theory to P vs. NP
Arithmetic Constraints and Automata
Symbolic Implementation of the Best Transformer
Lifting Propositional Interpolants to the Word-Level
Binary Decision Diagrams
Formal Methods in software development
Viktor Kuncak EPFL Martin Rinard MIT
Sharing Set Operations
Herbrand Logic Semantics
Presentation transcript:

Linked List Implementation class List { private List next; private Object data; private static List root; private static int size; public static void addNew(Object x) { List n1 = new List(); n1.next = root; n1.data = x; root = n1; size = size + 1; } next root data x invariant : size = |{data(x). next*(root,x)}|

Verification Condition for addNew  next0*(root0,n1)  x  {data0(n) | next0*(root0,n)}  next=next0[n1:=root0]  data=data0[n1:=x]  |{data(n). next*(n1,n)}| = |{data0(n). next0*(root0,n)}| + 1 Expressing this VC requires a rich logic –transitive closure * (in lists and also in trees) –unconstraint functions (data, data0) –cardinality operator on sets |... | Is there a decidable logic containing all this? “The number of stored objects has increased by one.”

Decomposing the Formula Consider a (simpler) formula |{data(x). next*(root,x)}|=k+1 Introduce fresh variables denoting sets: A = {x. next*(root,x)}  B = {y.  x. data(x,y)  x  A}  |B|=k+1 Conjuncts belong to decidable fragments! 1) WS2S 2) C 2 3) BAPA Next –define these 3 fragments –sketch a technique to combine them

WS2S: Monadic 2 nd Order Logic Weak Monadic 2 nd -order Logic of 2 Successors In HOL, satisfiability of formulas of the form: tree[f1,f2] & F(f1,f2,S,T) where - tree[f1,f2] means f1,f2 form a tree F ::= x=f1(y) | x=f2(y) |x  S | S  T | 9 S.F | F 1 Æ F 2 | : F - quantification is over finite sets of positions in tree - transitive closure encoded using set quantification Decision procedure - recognize WS2S formula within HOL - run the MONA tool (tree automata, BDDs) f2 f1 f2 f1 f2 f1

C 2 : Two-Variable Logic w/ Counting Two-Variable Logic with Counting F ::= P(v 1,...,v n ) | F 1 Æ F 2 | : F | 9 count v i.F where P : is a predicate symbol v i : is one of the two variable names x,y count : is =k,  k, or  k for nonnegative constants k We can write ( 9  k v i.F) as |{v i.F}|  k We can define 9, 8 and axiomatize total functions: 8 x 9 =1 y.R(x,y) Decidable sat. and fin-sat. (1997), NEXPTIME even for binary-encoded k: Pratt-Hartman ‘05

BAPA: Boolean Algebra with Presburger Arithmetic Essence of decidability: Feferman, Vaught 1959 Our results –first implementation for BAPA (CADE’05) –first, exact, complexity for full BAPA (JAR’06) –first, exact, complexity for QFBAPA (CADE’07) –generalize to multisets (VMCAI’08,CAV’08,CSL’08) New: role of BAPA in combination of logics S ::= V | S 1 [ S 2 | S 1 Å S 2 | S 1 n S 2 T ::= k | C | T 1 + T 2 | T 1 – T 2 | C ¢ T | |S| A ::= S 1 = S 2 | S 1 µ S 2 | T 1 = T 2 | T 1 < T 2 F ::= A | F 1 Æ F 2 | F 1 Ç F 2 | : F | 9 S.F | 9 k.F

Back to Decomposing the Formula Consider a (simpler) formula |{data(x). next*(root,x)}|=k+1 Introduce fresh variables denoting sets: A = {x. next*(root,x)}  B = {y.  x. data(x,y)  x  A}  |B|=k+1 Conjuncts belong to decidable fragments 1) WS2S 2) C 2 3) BAPA Next –define these 3 fragments – we have seen this –sketch a technique to combine them

Combining Decidable Logics Satisfiability problem expressed in HOL: (all free symbols existentially quantified)  next,data,k.  root,A,B. A = {x. next*(root,x)}  B = {y.  x. data(x,y)  x  A}  |B|=k+1 We assume formulas share only: - set variables (sets of uninterpreted elems) - individual variables, as a special case - {x} 1) WS2S 2) C 2 3) BAPA

Satisfiability problem expressed in HOL, after moving fragment-specific quantifiers  root,A,B.  next. A = {x. next*(root,x)}   data. B = {y.  x. data(x,y)  x  A}   k. |B|=k+1 Extend decision procedures into projection procedures for WS2S,C 2,BAPA applies  to all non-set variables Combining Decidable Logics F WS2S F C2 F BAPA : {root} µ A : |B|  |A| : 1  |B|  root,A,B. {root} µ A  |B|  |A|  1  |B| Conjunction of projections satisfiable  so is original formula

Fragment of Insertion into Tree right left right left data p left data

Verification Condition for Tree Insertion Conjunction of projections unsatisfiable  so is original formula

Decision Procedure for Combination 1.Separate formula into WS2S, C 2, BAPA parts 2.For each part, compute projection onto set vars 3.Check satisfiability of conjunction of projections Definition: Logic is effectively cardinality-linear iff there is an algorithm that computes projections of formulas onto set variables, and these projections are quantifier-free BAPA formulas. Theorem: WS2S, C 2, BAPA are all cardinality linear. Proof: WS2S – Parikh image of tree language is in PA C 2 – proof by Pratt-Hartmann reduces to PA BAPA - has quantifier elimination