//on the counterexample returned by SAT solver
bool construct_counterexample = true;
bool print_counterexample = false;
+bool print_binary = false;
//if this option is true then print the way dawson wants using a
//different printer. do not use this printer.
bool print_arrayval_declaredorder = false;
case BITVECTOR:
os << "BITVECTOR(";
unsigned char * str;
- str = CONSTANTBV::BitVector_to_Hex(c[0].GetBVConst());
+ str = CONSTANTBV::BitVector_to_Hex(c[0].GetBVConst());
os << str << ")";
CONSTANTBV::BitVector_Dispose(str);
break;
unsigned char *res;
const char *prefix;
- if (_value_width % 4 == 0)
+ if(print_binary) {
+ res = CONSTANTBV::BitVector_to_Bin(_bvconst);
+ if (c_friendly)
+ {
+ prefix = "0b";
+ }
+ else
+ {
+ prefix = "0bin";
+ }
+ }
+ else if (_value_width % 4 == 0)
{
res = CONSTANTBV::BitVector_to_Hex(_bvconst);
if (c_friendly)
//on the counterexample returned by SAT solver
extern bool construct_counterexample;
extern bool print_counterexample;
+ extern bool print_binary;
//if this option is true then print the way dawson wants using a
//different printer. do not use this printer.
extern bool print_arrayval_declaredorder;
helpstring += "-c : construct counterexample\n";
helpstring += "-d : check counterexample\n";
helpstring += "-p : print counterexample\n";
+ helpstring += "-y : print counterexample in binary\n";
+ helpstring += "-b : STP input read back\n";
helpstring += "-x : flatten nested XORs\n";
helpstring += "-h : help\n";
helpstring += "-m : use the SMTLIB parser\n";
case 'p':
BEEV::print_counterexample = true;
break;
+ case 'y':
+ BEEV::print_binary = true;
+ break;
case 'q':
BEEV::print_arrayval_declaredorder = true;
break;