Satisfiability Modulo Theories and Network Verification Nikolaj Bjørner Microsoft Research Formal Methods and Networks Summer School Ithaca, June 10-14.

Slides:



Advertisements
Similar presentations
A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
Advertisements

Logical Abstract Interpretation Sumit Gulwani Microsoft Research, Redmond.
SMELS: Sat Modulo Equality with Lazy Superposition Christopher Lynch – Clarkson Duc-Khanh Tran - MPI.
Satisfiability modulo the Theory of Bit Vectors
COMP 482: Design and Analysis of Algorithms
Syntax-Guided Synthesis Rajeev Alur Joint work with R.Bodik, G.Juniwal, M.Martin, M.Raghothaman, S.Seshia, R.Singh, A.Solar-Lezama, E.Torlak, A.Udupa 1.
Complexity ©D.Moshkovits 1 Where Can We Draw The Line? On the Hardness of Satisfiability Problems.
Linear real and integer arithmetic. Fixed-size bit-vectors Uninterpreted functions Extensional arrays Quantifiers Model generation Several input formats.
50.530: Software Engineering
Finding bugs: Analysis Techniques & Tools Symbolic Execution & Constraint Solving CS161 Computer Security Cho, Chia Yuan.
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) ⋁ ⋀ ¬ ⋁ ⋀
Linked List Implementation class List { private List next; private Object data; private static List root; private static int size; public static void addNew(Object.
Lecture 6: Job Shop Scheduling Introduction
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Programming with Constraint Solvers CS294: Program Synthesis for Everyone Ras Bodik Emina Torlak Division of Computer Science University of California,
Software Engineering & Automated Deduction Willem Visser Stellenbosch University With Nikolaj Bjorner (Microsoft Research, Redmond) Natarajan Shankar (SRI.
Interpolants from Z3 proofs Ken McMillan Microsoft Research TexPoint fonts used in EMF: A A A A A.
Panel on Decision Procedures Panel on Decision Procedures Randal E. Bryant Lintao Zhang Nils Klarlund Harald Ruess Sergey Berezin Rajeev Joshi.
Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Proof translation from CVC3 to Hol light Yeting Ge Acsys Mar 5, 2008.
Plan for today Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search.
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
1 Satisfiability Modulo Theories Sinan Hanay. 2 Boolean Satisfiability (SAT) Is there an assignment to the p 1, p 2, …, p n variables such that  evaluates.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Yeting Ge Leonardo de Moura New York University Microsoft Research.
Counterexample Generation for Separation-Logic-Based Proofs Arlen Cox Samin Ishtiaq Josh Berdine Christoph Wintersteiger.
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.
Nikolaj Bjørner Leonardo de Moura Nikolai Tillmann Microsoft Research August 11’th 2008.
Quantifier Elimination Procedures in Z3 Support for Non-linear arithmetic Fixed-points – features and a preview.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Austin, Texas 2011 Theorem Proving Tools for Program Analysis SMT Solvers: Yices & Z3 Austin, Texas 2011 Nikolaj Bjørner 2, Bruno Dutertre 1, Leonardo.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Leonardo de Moura Microsoft Research. Many approaches Graph-based for difference logic: a – b  3 Fourier-Motzkin elimination: Standard Simplex General.
Nikolaj Bjørner, Leonardo de Moura Microsoft Research Bruno Dutertre SRI International.
From SAT to SMT A Tutorial Nikolaj Bjørner Microsoft Research Dagstuhl April 23, 2015.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Advances in Automated Theorem Proving Leonardo de Moura, Nikolaj Bjørner Ken McMillan, Margus Veanes presented by Thomas Ball
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: SAT SAT applied in equivalence checking.
Leonardo de Moura Microsoft Research. Is formula F satisfiable modulo theory T ? SMT solvers have specialized algorithms for T.
Ethan Jackson, Nikolaj Bjørner and Wolfram Schulte Research in Software Engineering (RiSE), Microsoft Research 1. A FORMULA for Abstractions and Automated.
Solving Non-linear Arithmetic Dejan Jovanovic and Leonadro de Moura Presented by Boris Trayvas.
Decision methods for arithmetic Third summer school on formal methods Leonardo de Moura Microsoft Research.
Boolean Satisfiability Present and Future
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
Theory-Aided Model Checking of Concurrent Transition Systems Guy Katz, Clark Barrett, David Harel New York University Weizmann Institute of Science.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
Logic Engines as a Service Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Finding Conflicting Instances of Quantified Formulas in SMT Andrew Reynolds Cesare Tinelli Leonardo De Moura July 18, 2014.
Selected Decision Procedures and Techniques for SMT More on combination – theories sharing sets – convex theory Un-interpreted function symbols (quantifier-free.
Nikolaj Bjørner Microsoft Research DTU Winter course January 4 th 2012 Organized by Hanne Riis Nielson, Flemming Nielson.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Decision Procedures in First Order Logic
Logical path planning Róbert Baláž Technical University of Košice
Satisfiability Modulo Theories
Lazy Proofs for DPLL(T)-Based SMT Solvers
SMT-Based Verification of Parameterized Systems
8/2/2018 4:21 AM Lifting SAT to richer theories: bit-vectors, finite bases, and theory combination Christoph M. Wintersteiger © 2013 Microsoft Corporation.
Solving Linear Arithmetic with SAT-based MC
Automating Induction for Solving Horn Clauses
New Directions in the Development of ABC
Satisfiability Modulo Theories
LPSAT: A Unified Approach to RTL Satisfiability
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 27 Survey of NP Complete Problems
The SMT-LIB Initiative
Presentation transcript:

Satisfiability Modulo Theories and Network Verification Nikolaj Bjørner Microsoft Research Formal Methods and Networks Summer School Ithaca, June

Lectures Wednesday 2:00pm-2:45pm: An Introduction to SMT with Z3 Thursday 11:00am-11:45am Algorithmic underpinnings of SAT/SMT Friday 9:00am-9:45am Theories, Solvers and Applications

Plan I.Satisfiability Modulo Theories in a nutshell II.SMT solving in a nutshell III.SMT by example

Takeaways: Modern SMT solvers are a often good fit for program analysis tools. – Handle domains found in programs directly. The selected examples are intended to show instances where sub-tasks are reduced to SMT/Z3.

If you use Z3, This could be you

– Backed by Proof Plumbers Leonardo de Moura, Nikolaj Bjørner, Christoph Wintersteiger Handbook of Satisfiability Not all is hopeless

Background Reading: SAT

Background Reading: SMT September 2011

SAT IN A NUTSHELL

SAT in a nutshell (Tie  Shirt)  (  Tie   Shirt)  (  Tie  Shirt)

SMT IN A NUTSHELL

Is formula  satisfiable modulo theory T ? SMT solvers have specialized algorithms for T Satisfiability Modulo Theories (SMT)

ArithmeticArithmetic Array Theory Uninterpreted Functions Satisfiability Modulo Theories (SMT)

SMT SOLVING IN A NUTSHELL Job Shop Scheduling

Machines Jobs P = NP?Laundry Tasks

Constraints: Precedence: between two tasks of the same job Resource : Machines execute at most one job at a time Job Shop Scheduling

Not convex Job Shop Scheduling

case split Efficient solvers: - Floyd-Warshal algorithm - Ford-Fulkerson algorithm

THEORIES

Theories Uninterpreted functions

Arithmetic (linear) Theories

Uninterpreted functions Arithmetic (linear) Bit-vectors Theories

Uninterpreted functions Arithmetic (linear) Bit-vectors Algebraic data-types Theories

Uninterpreted functions Arithmetic (linear) Bit-vectors Algebraic data-types Arrays Theories

Uninterpreted functions Arithmetic (linear) Bit-vectors Algebraic data-types Arrays Polynomial Arithmetic Theories

QUANTIFIERS

Equality-Matching [de Moura, B. CADE 2007]

Quantifier Elimination [B. IJCAR 2010] Presburger Arithmetic, Algebraic Data-types, Quadratic polynomials SMT integration to prune branches

MBQI: Model based Quantifier Instantiation [de Moura, Ge. CAV 2008] [Bonachnia, Lynch, de Moura CADE 2009] [de Moura, B. IJCAR 2010]

Superposition [de Moura, B. IJCAR 2008] (disabled in release 4.1)

Horn Clauses [Hoder, B. SAT 2012] mc(x) = x-10 if x > 100 mc(x) = mc(mc(x+11)) if x  100 assert (mc(x)  91)

MODELS, PROOFS, CORES & SIMPLIFICATION

Logical Formula Sat/Model Models

Proofs Logical Formula Unsat/Proof

Simplification Simplify Logical Formula

Cores Logical Formula Unsat. Core

TACTICS, SOLVERS

Tactics Composition of tactics: (then t s) (par-then t s) applies t to the input goal and s to every subgoal produced by t in parallel. (or-else t s) (par-or t s) applies t and s in parallel until one of them succeed. (repeat t) (repeat t n) (try-for t ms) (using-params t params) Apply the given tactic using the given parameters.

Solvers Tactics take goals and reduce to sub-goals Solvers take tactics and serve as logical contexts. push add check model, core, proof pop

APIS C C++ python OCaml.NETJava

Summary Z3 supports several theories – Using a default combination – Providing custom tactics for special combinations Z3 is more than sat/unsat – Models, proofs, unsat cores, – simplification, quantifier elimination are tactics Prototype with python/smt-lib2 – Implement using smt-lib2/programmatic API