SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Tools.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Tool.h"
4 
5 #include <benchmax/logging.h>
7 
8 #include <filesystem>
9 #include <memory>
10 #include <vector>
11 
12 namespace benchmax {
13 
14 /// A std::unique_ptr to a Tool.
15 using ToolPtr = std::unique_ptr<Tool>;
16 /// A vector of ToolPtr.
17 using Tools = std::vector<ToolPtr>;
18 
19 /**
20  * Create tools of a given type T from a list of binaries and store them in tools.
21  */
22 template<typename T>
23 void createTools(const std::vector<std::filesystem::path>& arguments, Tools& tools);
24 
25 /// Load all tools from the tool settings.
27 
28 namespace settings {
29 
30 /// Tool-related settings.
31 struct ToolSettings {
32  /// Whether or not to collect statistics.
34  /// Generic tools.
35  std::vector<std::filesystem::path> tools_generic;
36  /// MathSAT with SMT-LIB interface.
37  std::vector<std::filesystem::path> tools_mathsat;
38  /// Minisat with DIMACS interface.
39  std::vector<std::filesystem::path> tools_minisat;
40  /// Minisatp with OPB interface.
41  std::vector<std::filesystem::path> tools_minisatp;
42  /// SMT-RAT with SMT-LIB interface.
43  std::vector<std::filesystem::path> tools_smtrat;
44  /// SMT-RAT with OPB interface.
45  std::vector<std::filesystem::path> tools_smtrat_opb;
46  /// SMT-RAT formula analyzer.
47  std::vector<std::filesystem::path> tools_smtrat_analyzer;
48  /// z3 with SMT-LIB interface.
49  std::vector<std::filesystem::path> tools_z3;
50  /// Common prefix of tool binaries to simplify output.
51  std::filesystem::path tools_common_prefix;
52 };
53 
54 /// Registers tool settings with the settings parser.
56 } // namespace settings
57 
58 /// Returns the tool settings.
59 inline const auto& settings_tools() {
60  return settings_get<settings::ToolSettings>("tools");
61 }
62 
63 } // namespace benchmax
Generic class to manage settings parsing using boost::program_options.
void registerToolSettings(SettingsParser *parser)
Registers tool settings with the settings parser.
Definition: Tools.cpp:64
Tools loadTools()
Load all tools from the tool settings.
Definition: Tools.cpp:39
std::vector< ToolPtr > Tools
A vector of ToolPtr.
Definition: Tools.h:17
std::unique_ptr< Tool > ToolPtr
A std::unique_ptr to a Tool.
Definition: Tools.h:15
const auto & settings_tools()
Returns the tool settings.
Definition: Tools.h:59
void createTools(const std::vector< std::filesystem::path > &arguments, Tools &tools)
Create tools of a given type T from a list of binaries and store them in tools.
Definition: Tools.cpp:18
Tool-related settings.
Definition: Tools.h:31
bool collect_statistics
Whether or not to collect statistics.
Definition: Tools.h:33
std::vector< std::filesystem::path > tools_z3
z3 with SMT-LIB interface.
Definition: Tools.h:49
std::filesystem::path tools_common_prefix
Common prefix of tool binaries to simplify output.
Definition: Tools.h:51
std::vector< std::filesystem::path > tools_minisat
Minisat with DIMACS interface.
Definition: Tools.h:39
std::vector< std::filesystem::path > tools_smtrat
SMT-RAT with SMT-LIB interface.
Definition: Tools.h:43
std::vector< std::filesystem::path > tools_mathsat
MathSAT with SMT-LIB interface.
Definition: Tools.h:37
std::vector< std::filesystem::path > tools_smtrat_analyzer
SMT-RAT formula analyzer.
Definition: Tools.h:47
std::vector< std::filesystem::path > tools_minisatp
Minisatp with OPB interface.
Definition: Tools.h:41
std::vector< std::filesystem::path > tools_smtrat_opb
SMT-RAT with OPB interface.
Definition: Tools.h:45
std::vector< std::filesystem::path > tools_generic
Generic tools.
Definition: Tools.h:35