Connect++ 0.6.1
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
Parameters.hpp
1/*
2
3Copyright © 2023-25 Sean Holden. All rights reserved.
4
5*/
6/*
7
8This file is part of Connect++.
9
10Connect++ is free software: you can redistribute it and/or modify it
11under the terms of the GNU General Public License as published by the
12Free Software Foundation, either version 3 of the License, or (at your
13option) any later version.
14
15Connect++ is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18more details.
19
20You should have received a copy of the GNU General Public License along
21with Connect++. If not, see <https://www.gnu.org/licenses/>.
22
23*/
24
25#ifndef PARAMETERS_HPP
26#define PARAMETERS_HPP
27
28#include<iostream>
29#include <cstdint>
30#include <filesystem>
31#include <chrono>
32
33using std::cout;
34using std::endl;
35
50struct params {
51 //------------------------------------------------------------------
52 // Cosmetic output options.
53 //------------------------------------------------------------------
54 static uint8_t verbosity;
55 static bool use_colours;
56 static uint8_t indent_size;
57 static uint8_t output_width;
58 static uint32_t output_frequency;
59 static bool output_terms_with_substitution; // Only applies to the use of
60 // operator<<
61 static std::string problem_name;
62 static bool write_output_summary;
63 static std::string definitional_predicate_prefix;
64 static std::string unique_var_prefix;
65 static std::string unique_skolem_prefix;
66 static bool show_full_stats;
67 static bool first_parse;
68 //------------------------------------------------------------------
69 // CNF conversion.
70 //------------------------------------------------------------------
71 static bool miniscope;
72 static bool all_definitional;
73 static bool no_definitional;
74 //------------------------------------------------------------------
75 // Equality axioms.
76 //------------------------------------------------------------------
77 static bool add_equality_axioms;
78 static bool equality_axioms_at_start;
79 static bool all_distinct_objects;
80 static bool no_distinct_objects;
81 //------------------------------------------------------------------
82 // Reordering
83 //------------------------------------------------------------------
84 static unsigned random_seed;
85 static uint32_t boost_random_seed;
86 static bool deterministic_reorder;
87 static uint32_t number_of_reorders;
88 static bool random_reorder;
89 static bool random_reorder_literals;
90 //------------------------------------------------------------------
91 // Timeout.
92 //------------------------------------------------------------------
93 static bool timeout;
94 static uint32_t timeout_value;
95 static std::chrono::steady_clock::time_point global_timeout;
96 //------------------------------------------------------------------
97 // Use of schedule.
98 //------------------------------------------------------------------
99 static bool use_schedule;
100 //------------------------------------------------------------------
101 // Positive/negative representation.
102 //------------------------------------------------------------------
103 static bool positive_representation;
104 //------------------------------------------------------------------
105 // Deepening.
106 //------------------------------------------------------------------
107 static uint32_t start_depth;
108 static uint32_t depth_limit;
109 static uint32_t depth_increment;
110 //------------------------------------------------------------------
111 // Start clauses.
112 //------------------------------------------------------------------
113 static bool all_start;
114 static bool all_pos_neg_start;
115 static bool conjecture_start;
116 static bool restrict_start;
117 //------------------------------------------------------------------
118 // Use of regularity test.
119 //------------------------------------------------------------------
120 static bool use_regularity_test;
121 //------------------------------------------------------------------
122 // Various basic limitations of search.
123 //------------------------------------------------------------------
124 static bool use_lemmata;
125 static bool limit_lemmata;
126 static bool limit_reductions;
127 static bool limit_extensions;
128 static bool limit_bt_all;
129 static bool limit_bt_lemmas;
130 static bool limit_bt_reductions;
131 static bool limit_bt_extensions;
132 static bool limit_bt_extensions_left_tree;
133 //------------------------------------------------------------------
134 // Move to a complete search.
135 //------------------------------------------------------------------
136 static uint32_t switch_to_complete;
137 //------------------------------------------------------------------
138 // Type of unification to use.
139 //------------------------------------------------------------------
140 static bool poly_unification;
141 //------------------------------------------------------------------
142 // Start and increment sizes for clause cache and stacks.
143 //------------------------------------------------------------------
144 static size_t clause_copy_cache_start_size;
145 static size_t clause_copy_cache_increment;
146 static size_t stack_start_size;
147 static size_t stack_increment;
148 //------------------------------------------------------------------
149 // Generation of proof for output.
150 //------------------------------------------------------------------
151 static bool verify_proof_verbose;
152 static bool verify_proof;
153 static bool build_proof;
154 static bool generate_LaTeX_proof;
155 static bool generate_LaTeX_tableau_proof;
156 static bool sub_LaTeX_proof;
157 static int latex_truncation_length;
158 static bool latex_tiny_proof;
159 static bool latex_include_matrix;
160 static bool generate_Prolog_proof;
161 static bool generate_tptp_proof;
162 //------------------------------------------------------------------
163 // Assorted file paths.
164 //------------------------------------------------------------------
165 static std::filesystem::path LaTeX_proof_path;
166 static std::filesystem::path LaTeX_tableau_proof_path;
167 static std::filesystem::path Prolog_matrix_path;
168 static std::filesystem::path Prolog_proof_path;
169 static std::filesystem::path output_summary_path;
170 static std::filesystem::path schedule_path;
171 static std::filesystem::path tptp_path;
172 static std::filesystem::path pwd_path;
173 static std::filesystem::path connectpp_path;
174 static std::filesystem::path full_problem_path;
175 //------------------------------------------------------------------
176 // Default schedule.
177 //------------------------------------------------------------------
178 static std::string default_schedule;
179 static void set_default_schedule();
180 //------------------------------------------------------------------
181 // Other output options.
182 //------------------------------------------------------------------
183 static bool show_clauses;
195 static void set_complete_parameters();
199 static bool search_is_complete();
203 static void set_all_backtrack();
207 static bool no_start_options();
211 static void correct_missing_start_options();
215 static void set_all_start();
220 static void show_search_parameter_settings();
221};
222
223#endif
Structure containing all the command line and other options.
static void set_default_schedule_parameters()
Self-explanatory.
static void set_all_backtrack()
Self-explanatory.
static void set_all_start()
Self-explanatory.
static void set_complete_parameters()
Change the parameters to make the search complete.
static bool no_start_options()
Self-explanatory.
static void correct_missing_start_options()
Self-explanatory.
static bool search_is_complete()
Self-explanatory.
static void show_search_parameter_settings()
Give a detailed indication of what the parameters affecting the search are currently set to.