Questions tagged [smt]

Satisfiability Modulo Theories (SMT) are decision problems for logical formulas with respect to combinations of background theories expressed in classical first-order logic with equality.

Satisfiability Modulo Theories (SMT) are decision problems for logical formulas with respect to combinations of background theories expressed in classical first-order logic with equality.

A SMT instance is a generalization of a Boolean SAT instance in which various sets of variables are replaced by predicates from a variety of underlying theories.

SMT problems are usually expressed by the SMT-LIB language and solved by high-performance SMT solvers. For a list of benchmarks, solvers and other information regarding SMT, please visit http://smtlib.org/.

845 questions
5
votes
2 answers

Solving predicate calculus problems with Z3 SMT

I'd like to use Z3 to solve problems that are most naturally expressed in terms of atoms (symbols), sets, predicates, and first order logic. For example (in pseudocode): A = {a1, a2, a3, ...} # A is a set B = {b1, b2, b3...} C = {c1, c2,…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
5
votes
0 answers

SMT solver versus Prolog

What are the main differences between an SMT solver, like CVC4, and Prolog? Can one do something the other cannot? My plan is to produce queries using R, send them to an SMT solver, and to modify queries based on the SMT output. I am basically…
Frank
  • 952
  • 1
  • 9
  • 23
5
votes
1 answer

What is the theory behind Z3 Optimize maximum and minimum functionality?

I am writing to inquire the theory/algorithm behind the Z3 Optimize function, especially for its maximum and minimum function. This seems pretty magic to me. Is it somehow a binary search or so? How can it efficiently figure out the max/min value…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
5
votes
2 answers

Exactly what quantifiers is SMT complete for?

I've been looking at various SMT solvers, mainly Z3, CVC4, and VeriT. They all have vague descriptions of their ability to solve SMT problems with quantifiers. Their documentation is primarily example based (Z3), or consists of academic papers,…
jmite
  • 8,171
  • 6
  • 40
  • 81
5
votes
2 answers

SMT solver with custom theories?

I'm looking at doing some verification work where I've got regular tree grammars as an underlying theory. Z3 lets you define your own stuff with uninterpreted functions, but that doesn't tend to work well any time your decision procedures are…
jmite
  • 8,171
  • 6
  • 40
  • 81
5
votes
2 answers

SMT/SAT Solver vs Model Checker

Recently, I started to study formal verification techniques. In literature, model checker and solver are used somehow interchangeably. But, how model checker and solver are connected with each other? p.s. I would appreciate if some papers or links…
shahb0z
  • 63
  • 1
  • 7
5
votes
2 answers

Z3 Java API defining a function

I need your help defining a function with the Z3 Java API. I try to solve something like this (which is working fine with the z3.exe process): (declare-fun a () Real) (declare-fun b () Real) (declare-fun c () Bool) (define-fun max2 ((x Real) (y…
ConcolicAndy
  • 115
  • 5
5
votes
1 answer

Using Z3 QFNRA tactic with datatypes: interaction or inlining

In Non-linear arithmetic and uninterpreted functions, Leonardo de Moura states that the qfnra-nlsat tactic hasn't been fully integrated with the rest of Z3 yet. I thought that the situation has changed in two years, but apparently the integration is…
Skiminok
  • 2,801
  • 1
  • 24
  • 29
5
votes
1 answer

DPLL(T) algorithm used in Z3 (linear arithmetic)

The arithmetic solver of Z3 is developed based on DPLL(T) and Simplex (described in this paper). And I do not understand how Z3 perform the backtrack when a conflict explanation is generated. I give an example: The linear arithmetic formula…
ClePIR
  • 51
  • 1
5
votes
3 answers

Sum array in z3 solver

I am trying to express the sum of the range of an unbounded Array in z3. For instance in Python: IntArray = ArraySort(IntSort(), IntSort()) sum = Function('sum', IntArray, IntSort()) ........ Is there any way to complete the definition of 'sum'?…
5
votes
2 answers

Haskell: binding to fast and simple SAT solver

Today I wanted too look into options on SAT solving in haskell. First I tought about writing my own interface to the picosat solver. Then I found out there is the SBV library. It's interfaces to Z3, Yices, CVC4 and Boolector. Also, I did a google…
mrsteve
  • 4,082
  • 1
  • 26
  • 63
5
votes
2 answers

Defining injective functions in Z3

My goal is to define an injective function f: Int -> Term, where Term is some new sort. Having referred to the definition of the injective function, I wrote the following: (declare-sort Term) (declare-fun f (Int) Term) (assert (forall ((x Int) (y…
Pavel Zaichenkov
  • 835
  • 5
  • 12
5
votes
1 answer

Learning Z3py - Is there support for arrays and loops

I'm going through Z3py and have a question with how to use the API in a couple specific cases. The code below is a simplified version of something I would ultimately like to use Z3 for. Some of my questions are: 1. Is there a way to create an…
daybreak
  • 181
  • 1
  • 8
5
votes
1 answer

Z3 with Craig interpolation (iz3)

I'm trying to generate Craig interpolants using the C API but I get incorrect results. However, when I dump the same problem to a file via Z3_write_interpolation_problem and call iZ3 I get the expected interpolant. I attach the code to be able to…
5
votes
2 answers

How to hide variable with Z3

Say I have t1
william007
  • 17,375
  • 25
  • 118
  • 194
1 2
3
56 57