3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 21:08:46 +00:00

Merge branch 'opt' of https://github.com/Z3Prover/z3 into opt

This commit is contained in:
Nikolaj Bjorner 2015-05-11 17:12:04 -07:00
commit c96c4c7af7
2 changed files with 9 additions and 7 deletions

View file

@ -106,6 +106,7 @@ tbv* tbv_manager::allocate(char const* bv) {
if (*bv == '0') set(*result, i++, tbit::BIT_0);
else if (*bv == '1') set(*result, i++, tbit::BIT_1);
else if (*bv == '*') i++;
else if (*bv == 'x') i++;
else if (i == 0 && (*bv == ' ' || *bv == '\t')) ;
else break;
++bv;

View file

@ -93,7 +93,7 @@ datalog::ddnf_core* populate_ddnf(char const* file, ptr_vector<tbv>& tbvs) {
std::getline(is, line);
tbv* t = tbvm.allocate(line.c_str());
ddnf->insert(*t);
//tbvm.display(std::cout << line << " ", *t) << "\n";
IF_VERBOSE(2, tbvm.display(verbose_stream() << line << " ", *t) << "\n";);
tbvs.push_back(t);
if (p > P) {
std::cout << "port number " << p << " too big " << P << "\n";
@ -111,16 +111,17 @@ datalog::ddnf_core* populate_ddnf(char const* file, ptr_vector<tbv>& tbvs) {
}
static void read_args(char ** argv, int argc) {
if (argc == 3) {
g_file = argv[2];
static void read_args(char ** argv, int argc, int& i) {
if (argc = i + 2) {
g_file = argv[i + 1];
++i;
return;
}
if (!g_file) {
std::cout << "Need routing table file as argument. Arguments provided: ";
for (int i = 0; i < argc; ++i) {
std::cout << argv[i] << " ";
for (int j = i; j < argc; ++j) {
std::cout << argv[j] << " ";
}
std::cout << "\n";
exit(0);
@ -129,7 +130,7 @@ static void read_args(char ** argv, int argc) {
}
void tst_ddnf(char ** argv, int argc, int& i) {
read_args(argv, argc);
read_args(argv, argc, i);
ptr_vector<tbv> tbvs;
datalog::ddnf_core* ddnf = populate_ddnf(g_file, tbvs);
IF_VERBOSE(1, ddnf->display(verbose_stream()););