ToySMT – simple SMT solver under 1500 SLOC of pure C
github.com
github.com
Most SMT solvers today use the DPLL(T) technique which transfers information back and forth between a so-called theory solver (e.g., a simplex solver that handles real constraints) and a SAT solver which handles the "Boolean part" of the problem . I feel that an SMT solver that intends to be educational must implement DPLL(T).
I recall that many popular simplifications required a problem to be expressible as CNF.
(I also seem to recall there is some strategy to simplify logics over Reals/Ints into BV without encoding logical "bignum circuitry" as well?)
Sure. I'm not arguing that bitblasting should never be done, it's probably still the best way of solving bitvector problems. My point is that the pedagogical objective of an toy SMT solver is lost if doesn't teach DPLL(T) and only focuses on bitblasting.
(i.e., use 'system' to shell out to an already existing solver, which is at least documented in the readme).