-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a new tool for Minisat-compatible SAT solvers.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @file smtratSolverTool.h | ||
* @author: Sebastian Junges | ||
* | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "Tool.h" | ||
|
||
namespace benchmax { | ||
|
||
/** | ||
* Tool wrapper for a Minisat solver. | ||
*/ | ||
class Minisat: public Tool { | ||
public: | ||
/// Create tool. | ||
Minisat(const fs::path& binary, const std::string& arguments): Tool("Minisat", binary, arguments) {} | ||
|
||
/// Only handles .opb files. | ||
virtual bool canHandle(const fs::path& path) const override { | ||
return is_extension(path, ".cnf") || is_extension(path, ".dimacs"); | ||
} | ||
|
||
/// Parse results from stdout. | ||
virtual void additionalResults(const fs::path&, BenchmarkResult& result) const override { | ||
if (result.exitCode == 10) result.answer = "sat"; | ||
else if (result.exitCode == 20) result.answer = "unsat"; | ||
else result.answer = "unknown"; | ||
} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters