sat: generalize the code for reading the solution
* src/misc/satsolver.cc, src/misc/satsolver.hh (satsolver_get_solution): New function, that accepts a solution split on multiple 'v ' lines. * src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc (get_solution): Remove, and adjust existing code to use satsolver_get_solution(). * src/tgbatest/readsat.cc, src/tgbatest/readsat.test: New files. * src/tgbatest/Makefile.am: Add them. * src/bin/man/spot-x.x: Mention the SAT competition rules for the expected input/output format.
This commit is contained in:
parent
1ab46b0864
commit
90c106f8a8
8 changed files with 147 additions and 65 deletions
29
src/tgbatest/readsat.cc
Normal file
29
src/tgbatest/readsat.cc
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2013 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
// Spot is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <iostream>
|
||||
#include "misc/satsolver.hh"
|
||||
|
||||
int main()
|
||||
{
|
||||
spot::sat_solution sol = spot::satsolver_get_solution("-");
|
||||
for (spot::sat_solution::const_iterator i = sol.begin();
|
||||
i != sol.end(); ++i)
|
||||
std::cout << ' ' << *i;
|
||||
std::cout << '\n';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue