I was wondering how people implement bit-blasting of floating-point arithmetic constructs in SMT solvers. Are there any existing libraries or facilities to do that (VHDL, ...), or are they implemented from scratch ? This represents how many lines of (C ? C++ ?) code ?
Thanks in advance.
There aren't "many" implementations in SMT solvers yet, but Z3 is one of those that implements everything. The code is in fpa2bv_converter.cpp and it's fairly self-explanatory. For large parts of the code I got inspiration from Mueller and Paul's "Computer Architecture" book, which features a chapter on floating-point circuits. The "Handbook of Floating-Point Arithmetic" (Muller at al.) also provides lots of information/programs/circuits.