Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Nikolaj Bjørner Microsoft Research DTU Winter course January 4 th 2012 Organized by Hanne Riis Nielson, Flemming Nielson."— Presentation transcript:

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

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

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

4

5 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 http://research.microsoft.com/projects/z3http://research.microsoft.com/projects/z3 F# quote

6 Freely available from http://research.microsoft.com/projects/z3http://research.microsoft.com/projects/z3

7

8 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

9 See online Interactive tutorial http://rise4fun.com/z3tutorial

10 SMT@Microsoft 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

11

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

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

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

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

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

17

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

19 Logical Formula Sat/Model

20 Logical Formula Unsat/Proof

21 Simplify Logical Formula

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

23 Quantifier Elimination Quantifier Elimination Logical Formula

24 Unsat. Core


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

Similar presentations


Ads by Google