17 virtual bool canHandle(
const fs::path& path)
const override {
22 if (
result.stdout.find(
"unsat") != std::string::npos)
result.answer =
"unsat";
23 else if (
result.stdout.find(
"sat") != std::string::npos)
result.answer =
"sat";
24 else if (
result.stdout.find(
"unknown") != std::string::npos)
result.answer =
"unknown";
25 else if (
result.stdout.find(
"out of memory") != std::string::npos)
result.answer =
"memout";
26 else result.answer =
"invalid";
28 std::regex topRegex(
"\\(\\s*((?:\\:\\S+\\s*\\S+\\s*)+)\\)");
29 std::regex subRegex(
"\\s*\\:(\\S+)\\s*(\\S+)");
30 auto topBegin = std::sregex_iterator(
result.stdout.begin(),
result.stdout.end(), topRegex);
31 auto topEnd = std::sregex_iterator();
32 for (
auto i = topBegin; i != topEnd; ++i) {
33 const std::string& subStdout = (*i)[1];
34 auto subBegin = std::sregex_iterator(subStdout.begin(), subStdout.end(), subRegex);
35 auto subEnd = std::sregex_iterator();
36 for (
auto j = subBegin; j != subEnd; ++j) {
37 result.additional.emplace((*j)[1], (*j)[2]);
Tool wrapper for Z3 for SMT-LIB.
virtual bool canHandle(const fs::path &path) const override
Only handle .smt2 files.
Z3(const fs::path &binary, const std::string &arguments)
New Z3 tool.
virtual void additionalResults(const fs::path &, BenchmarkResult &result) const override
Parse answer string from stdout.
bool is_extension(const std::filesystem::path &path, const std::string &extension)
Checks whether the extension of the filename is as specified.
const auto & settings_tools()
Returns the tool settings.
Results for a single benchmark run.