Nikolaj Bjørner Microsoft Research DTU Winter course January 4 th 2012 Organized by Hanne Riis Nielson, Flemming Nielson.

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 Theories and Network Verification Nikolaj Bjørner Microsoft Research Formal Methods and Networks Summer School Ithaca, June
Synthesis, Analysis, and Verification Lecture 04c Lectures: Viktor Kuncak VC Generation for Programs with Data Structures “Beyond Integers”
Linear real and integer arithmetic. Fixed-size bit-vectors Uninterpreted functions Extensional arrays Quantifiers Model generation Several input formats.
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.
Software Engineering & Automated Deduction Willem Visser Stellenbosch University With Nikolaj Bjorner (Microsoft Research, Redmond) Natarajan Shankar (SRI.
1 Cover Algorithms and Their Combination Sumit Gulwani, Madan Musuvathi Microsoft Research, Redmond.
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.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
PROOF TRANSLATION AND SMT LIB CERTIFICATION Yeting Ge Clark Barrett SMT 2008 July 7 Princeton.
Plan for today Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search.
Johannes Kepler University Linz, Austria 2008 Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
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.
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.
CVCL Lite: An Efficient Theorem Prover Based on Combination of Decision Procedures Presented by: Sergey Berezin Stanford University, U.S.A.
Catriel Beeri Pls/Winter 2004/5 inductive-revisited 1 Inductive definitions revisited  Generated and Freely generated sets oPattern match, unification.
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.
Decision Procedures Mooly Sagiv. Bibliography Nelson & Oppen Fast Decision Procedures Based on Congruence Closure JACM 1979 Stump, Dill, Barrett, Levitt.
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.
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences.
Austin, Texas 2011 Theorem Proving Tools for Program Analysis SMT Solvers: Yices & Z3 Austin, Texas 2011 Nikolaj Bjørner 2, Bruno Dutertre 1, Leonardo.
Ofer Strichman, Technion Deciding Combined Theories.
Leonardo de Moura Microsoft Research. Many approaches Graph-based for difference logic: a – b  3 Fourier-Motzkin elimination: Standard Simplex General.
Arithmetic Sequences ~adapted from Walch Education.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Nikolaj Bjørner, Leonardo de Moura Microsoft Research Bruno Dutertre SRI International.
CAS- 734 (Presentation -1) By : Vasudha Kapil
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
Leonardo de Moura Microsoft Research. Is formula F satisfiable modulo theory T ? SMT solvers have specialized algorithms for T.
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
Administrivia: May 20, 2013 Course project progress reports due Wednesday. Reading in Multigrid Tutorial: Chapters 3-4: Multigrid cycles and implementation.
CJAdviser: SMT-based Debugging Support for ContextJ* Shizuka Uchio(Kyushu University, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu.
Big Ideas in Mathematics Chapter Three
Decision methods for arithmetic Third summer school on formal methods Leonardo de Moura Microsoft Research.
Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
The Satisfiability Modulo Theories Library (SMT-LIB) Moonzoo Kim CS Dept. KAIST.
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.
1 Lecture 5 PVS commands. 2 Last week Logical formalisms, first-order logic (syntax, semantics). Introduction to PVS. Language of PVS. Proving sequents.
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.
Complexity 27-1 Complexity Andrei Bulatov Interactive Proofs (continued)
Mostly-Automated Verification of Low-Level Programs in Computational Separation Logic Adam Chlipala Harvard University PLDI 2011.
Notes Over 1.2.
Dafny An automatic program verifier for functional correctness
Satisfiability Modulo Theories
11.2 Arithmetic Sequences.
Review Problems Algebra 1 11-R.
Satisfiability Modulo Theories
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences
Dafny An automatic program verifier for functional correctness
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences
Algebra.
The SMT-LIB Initiative
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences
Presentation transcript:

Nikolaj Bjørner Microsoft Research DTU Winter course January 4 th 2012 Organized by Hanne Riis Nielson, Flemming Nielson

Overview and architecture of Z3 What is Z3 How to use Z3

You will have an idea of what Z3 is and ways of using it

Theories Bit-Vectors Lin-arithmetic Groebner basis Free (uninterpreted) functions Arrays Quantifiers: E- matching Quantifiers: E- matching OCaml.NET C C Native SMT-LIB Model Generation: Finite Models Model Generation: Finite Models Simplify Comb. Array Logic Recursive Datatypes Quantifiers: Super-position Quantifiers: Super-position Proof objects Parallel Z3 Assumption tracking By Leonardo de Moura & Nikolaj Bjørner F# quote

Freely available from

Text: SMT-LIB2- main exchange format for SMT solvers Simplify- legacy format by Simplify Theorem Prover Native Z3- low-level for storing formulas (and replay) Log- low-level log for replay TPTP- format used for first-order theorem provers Programmatic: C- API functions exposed for C Ocaml- Ocaml wrapper around C API.NET-.NET wrapper around C API Scala, Python- by Phillip Suter and Sascha Böhme

See online Interactive tutorial

open Microsoft.Z3 open Microsoft.Z3.Quotations do Solver.prove Logic.declare (fun t11 t12 t21 t22 t31 t32 -> not ((t11 >= 0I) && (t12 >= t11 + 2I) && (t12 + 1I <= 8I) && (t21 >= 0I) && (t22 >= t21 + 3I) && (t32 + 1I <= 8I) && (t31 >= 0I) && (t32 >= t31 + 2I) && (t32 + 3I <= 8I) && (t11 >= t21 + 3I || t21 >= t11 + 2I) && (t11 >= t31 + 2I || t31 >= t11 + 2I) && (t21 >= t31 + 2I || t31 >= t21 + 3I) && (t12 >= t22 + 1I || t22 >= t12 + 1I) && (t12 >= t32 + 3I || t32 >= t12 + 1I) && (t22 >= t32 + 3I || t32 >= t22 + 1I) Create Quoted Expression Expression

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

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

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

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

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

Text: SMT-LIB, SMT-LIB2, Native Yices (high-level), Native Z3 (low-level), Simplify Programmatic APIs: C, Ocaml,.NET, LINQ,

Logical Formula Sat/Model

Logical Formula Unsat/Proof

Simplify Logical Formula

Implied Equalities Implied Equalities -x and y are equal -z + y and x + z are equal Logical Formula

Quantifier Elimination Quantifier Elimination Logical Formula

Unsat. Core