Functional SMT solving with Z3 and racket

Siddharth Agarwal, Amey Karkare · 2013

Satisfiability Modulo Theories (SMT) solvers are powerful tools that can quickly solve complex constraints involving Booleans, integers, first-order logic predicates, lists, and other data types. They have a vast number of potential applications, from constraint solving to program analysis and verification. However, they are so complex to use that their power is inaccessible to all but experts in the field. We present an attempt to make using SMT solvers simpler by integrating the Z3 solver into a host language, Racket. The system defines a programmer's interface in Racket that makes it easy to harness the power of Z3 to discover solutions to logical constraints. The interface, although in Racket, retains the structure and brevity of the SMT-LIB format. This system is expected to be useful for a wide variety of applications, from simple constraint solving to writing tools for debugging, verification, and automatic test generation for functional programs.

Read the paper · More papers on PaperTik