SMcC> In testing one small example a while ago I was able to dump the
SMcC> vector of CNF variables corresponding to each bitvector variable
SMcC> (patch attached).
SK> Thanks for your reply! I've tried out your patch and it prints out
SK> some of the variables. However, a large subset of variables is not
SK> printed out.
I can't say I'm too surprised; as you could probably tell the patch
was somewhat of a one-off hack. I can speculate about several possible
causes/fixes:
* If your formula involves arrays, STP's solving strategy attempts to
use only an abstraction of the formula, and the naming may also be
more complicated.
* STP attempts to remove unconstrained variables from the formula (and
recent changes have made it even more aggressive, for instance
eliminating unconstrained bit positions). If this is the only thing
that's happening, it might be sufficient to assume that any
variables you don't have a mapping for can be set to 0 (or 1, or
random values).
* You can try disabling optimizations with command-line flags (or, if
that fails, by commenting out code). Of course you might be
unsatisfied if you make it easier to recover variable names but at
the same time make the solving take longer.
If you're having trouble getting to the bottom of what's happening,
creating a small input file that demonstrates the unexpected behavior
might be helpful both for your own understanding and for discussions
with other developers.
Last but not least, I think that writing code to make STP interface
with an external SAT solver would not be too much work (for instance,
see the base class src/sat/SATSolver.h). STP is a volunteer project
that depends on improvements contributed by users, and that could
include you.