14 #if defined(__linux__) || \ 15 defined(__FreeBSD_kernel__) || \ 17 defined(__unix__) || \ 18 defined(__CYGWIN__) || \ 25 #define getpid _getpid 37 std::ios_base::out | std::ios_base::trunc);
53 dplib_prop.out <<
"QUERY FALSE;\n";
54 dplib_prop.out <<
"COUNTERMODEL;\n";
61 "dplib_dec_result_"+std::to_string(getpid())+
".tmp";
66 int res=system(command.c_str());
69 status(
"Reading result from CVCL");
77 line=std::string(line, strlen(
"ASSERT "), std::string::npos);
88 std::string identifier=std::string(line, 1,
pos-1);
91 if(!std::getline(in, line))
96 while(
pos<line.size() && line[
pos]==
' ')
pos++;
100 if(pos2==std::string::npos)
103 std::string value=std::string(line,
pos, pos2-
pos);
106 std::cout <<
">" << identifier <<
"< = >" << value <<
"<\n";
116 line=std::string(line, strlen(
"NOT "), std::string::npos);
125 unsigned number=unsafe_str2unsigned(line.c_str()+1);
126 assert(number<dplib_prop.no_variables());
127 dplib_prop.assignment[number]=value;
138 while(std::getline(in, line))
142 dplib_prop.reset_assignment();
144 while(std::getline(in, line))
150 return D_SATISFIABLE;
153 return D_UNSATISFIABLE;
156 error(
"Unexpected result from CVC-Lite");
virtual resultt dec_solve()
std::string temp_out_filename
unsignedbv_typet size_type()
void read_assert(std::istream &in, std::string &line)
bool has_prefix(const std::string &s, const std::string &prefix)
std::string temp_result_filename
resultt read_dplib_result()