At Galois, we develop formal verification tools that rely on a variety of automated solvers for answering mathematical queries. The main solvers we use are called Satisfiability Modulo Theories (SMT) solvers. These solvers offer the ability to answer questions such as “find me inputs for which a mathematical property holds.” We have found these tools to be very useful. There are a variety of solvers developed that support different problem domains and are very efficient at solving complex constraint systems. Among other things, we have used them to verify the correctness of many cryptographic algorithms in seconds, even though the number of inputs is incredibly large (2^256 possible inputs or even larger).
Last week, we released a Haskell library called What4 we use internally for interacting with different SMT solvers. What4 takes its name from Why3, an OCaml-based framework for connecting programs to solvers.
What4 is designed primarily for making it easier for developers to build new verification and program analysis tools that use SMT solvers. A more complete feature list is below, but we wanted a library that made it easier for developers to programmatically construct expressions and send those expressions to solvers for verification or model finding. What4 leverages Haskell's powerful type system to help ensure expressions are well-formed. What4 also includes many internal expression simplification rules to keep expressions in a reduced form so the solver encoding is compact.
Github: https://github.com/GaloisInc/what4
Hackage: https://hackage.haskell.org/package/what4
The README on Hackage has a short tutorial showing how to use What4.
We invite you to play with What4, model things in it, break it, complain about it, and improve it. All feedback is much appreciated.