# What's the difference between a SAT Solver and a SMT solver?

I see people using SAT solvers and SMT solvers to verify that solidity code is doing what they are doing.

What is the difference between these two?

SAT solvers are used for Boolean formulas while SMT solvers can handle formulas that involve multiple theories. Both can be used to verify Solidity code, but SMT solvers are more powerful and can reason about more complex properties.

A SAT Solver aims to solve the boolean satisfiability problem for a set of boolean expressions.

Or, more simply, it aims to find a scenario where a set of booleans have no contradictions.

An SMT Solver aims to find if any mathematical equation is solvable. It can be thought of as a generalized SAT Solver. Often, these two tools can be used together. You can get a set of boolean expressions solved by a SAT solver like:

``````x < 5
y < 5
y > x
``````

And input them to an SMT solver to find examples of what x & y can be.

They are often used together because the SAT solver can get expressions and information much faster than SMT solvers.

• Is it possible to convert a smr problem to a sat problem for sat solvers? Aug 15 at 12:24
• what's an smr problem? Aug 15 at 14:47
• Sorry, I was meaning smt. Aug 15 at 18:20
• ah. Yes. An SMT solver is actually a "generalized SAT solver". You could think of a SAT solver as a specific implementation of an SMT solver. Aug 19 at 21:07
• I was looking actual programs for converting to dimacs. Aug 20 at 16:55