Commit bfcc6ff8 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

use rc2.py from python-sat instead of qmaxsat for macos/future-proofness

parent 87de7a89
......@@ -132,26 +132,8 @@ then
popd
fi
# Does not work on MacOS?
### QMaxSat solver
if ! hash qmaxsat 2>/dev/null
then
qmaxsat_url=https://maxsat-evaluations.github.io/2018/mse18-solver-src/complete/QMaxSAT.zip
qmaxsat_archive=${qmaxsat_url##*/}
if [[ ! -r $qmaxsat_archive ]]
then
curl -fsSLO $qmaxsat_url
fi
unzip $qmaxsat_archive
pushd QMaxSAT/code
make
sudo cp qmaxsat_g3 /usr/local/bin/qmaxsat
popd
rm -Rf QMaxSAT
fi
### Jupyter
packages='jupyter bokeh ipywidgets'
### Jupyter and python-sat
packages='python-sat jupyter bokeh ipywidgets'
if hash pip3 2>/dev/null
then
pip3 install -U $packages
......
......@@ -114,8 +114,8 @@ run_sat(FileIn, Bottom, Sepis) :-
call_maxsat(FileIn, Sepis):-
debug(sepi, "running maxsatsolver", []),
process_create(
path('qmaxsat'),
[FileIn],
path('rc2.py'),
['-vv', FileIn],
[process(Id), stderr(null), stdout(pipe(Stream))]
),
(
......@@ -161,7 +161,7 @@ write_sat_header(Stream) :-
format(Stream, "c ~w~np cnf ~d ~d~n", [Comment, Vars, Clauses]).
%% read_lines for qqmaxsat
%% read_lines for rc2.py/qqmaxsat
read_lines(Stream, Output) :-
read_line_to_codes(Stream, Codes),
read_lines(Codes, Stream, Solutions, Optimum),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment