satsolver: new function
Uses the value of the SPOT_SATSOLVER environment variable to decide how to call the SAT solver. * src/misc/satsolver.cc, src/misc/satsolver.hh: New files. * src/misc/Makefile.am: Add them. * src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Use satsolver().
This commit is contained in:
parent
6ce005b2d0
commit
3b10bb3b8c
5 changed files with 122 additions and 26 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "stats.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
#include "misc/tmpfile.hh"
|
||||
#include "misc/satsolver.hh"
|
||||
|
||||
// If the following DEBUG macro is set to 1, the temporary files used
|
||||
// to communicate with the SAT-solver will be left in the current
|
||||
|
|
@ -902,18 +903,7 @@ namespace spot
|
|||
cnfs.close();
|
||||
|
||||
out = create_tmpfile("dtba-sat-", ".out");
|
||||
|
||||
const char* satsolver = getenv("SATSOLVER");
|
||||
if (!satsolver)
|
||||
satsolver = "glucose";
|
||||
|
||||
std::string s(satsolver);
|
||||
s += " ";
|
||||
s += cnf->name();
|
||||
s += " > ";
|
||||
s += out->name();
|
||||
system(s.c_str());
|
||||
|
||||
satsolver(cnf, out);
|
||||
current_solution = get_solution(out->name());
|
||||
}
|
||||
while (!current_solution.empty());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue