33#include <boost/program_options.hpp>
35#include "connect++-version.hpp"
37#include "StackProver.hpp"
38#include "Schedule.hpp"
39#include "ProofChecker.hpp"
45namespace fs = std::filesystem;
46namespace chrono = std::chrono;
47namespace po = boost::program_options;
49using namespace verbose_print;
50using namespace boost::spirit;
55void SIGINT_handler(
int p) {
56 cout << endl <<
"% SZS status Error for "
57 << params::problem_name
58 <<
" : terminated by SIGINT." << endl;
61void SIGXCPU_handler(
int p) {
62 cout << endl <<
"% SZS status Timeout for "
63 << params::problem_name
64 <<
" : terminated by SIGXCPU." << endl;
67void SIGALRM_handler(
int p) {
68 cout << endl <<
"% SZS status Timeout for "
69 << params::problem_name
70 <<
" : terminated by SIGALRM." << endl;
74int main(
int argc,
char** argv) {
78 chrono::steady_clock::time_point startTime;
79 startTime = chrono::steady_clock::now();
83 std::signal(SIGINT, SIGINT_handler);
84 std::signal(SIGXCPU, SIGXCPU_handler);
85 std::signal(SIGALRM, SIGALRM_handler);
91 char* tptp_env = getenv(
"TPTP");
92 if (tptp_env !=
nullptr) {
93 params::tptp_path = fs::path(tptp_env);
95 char* pwd_env = getenv(
"PWD");
96 if (pwd_env !=
nullptr) {
97 params::pwd_path = fs::path(pwd_env);
99 char* path_env = getenv(
"CONNECTPP_PATH");
100 if (path_env !=
nullptr) {
101 params::connectpp_path = fs::path(path_env);
104 params::connectpp_path = params::pwd_path;
110 po::options_description main_options(
"Basic options");
111 main_options.add_options()
113 "Show this message.")
115 "Show version number.")
116 (
"input,i", po::value<string>(),
118 (
"output,o", po::value<string>(),
119 "Write a short output summary (file, status, outcome, time etc) to the specified file. Using \"default\" places it in \"./output_summary.txt\"" )
121 "Don't add equality axioms. (For example, if they were added elsewhere.) NOTE: also inhibits adding of distinct object axioms.")
123 "Place equality axioms at the end of the matrix, not the beginning")
124 (
"all-distinct-objects",
125 "By default Connect++ follows the TPTP convention of considering \"foobar\" to be a distinct object. This option makes *all* constants distinct.")
126 (
"no-distinct-objects",
127 "By default Connect++ follows the TPTP convention of considering \"foobar\" to be a distinct object. This option disables that behaviour, so constants can be equal to others.")
128 (
"timeout,t", po::value<int>(),
129 "Timeout in seconds. (Default UINT32_MAX).")
130 (
"show-default-schedule",
131 "Display the build-in default schedule and halt.")
132 (
"schedule,s", po::value<string>(),
133 "Instead of running with fixed parameters, use a schedule from the specified file. Use value \"default\" for the default schedule. If no --timeout is specified use 600s.")
134 (
"random-seed", po::value<int>(),
135 "Specify the (non-negative, integer) seed to use for random number generation. Default 0.")
136 (
"tptp", po::value<string>(),
137 "Specify a path for the TPTP. Alternative to using the TPTP environment variable.")
138 (
"path", po::value<string>(),
139 "Specify the path for output files other than the one produced by --output. Alternative to using the CONNECTPP_PATH environment variable.");
141 po::options_description conversion_options(
"Clause conversion");
142 conversion_options.add_options()
144 "Don't apply definitional transformation for any formula.")
146 "Apply definitional transformation to all formulas.")
147 (
"reorder,r", po::value<int>(),
148 "Reorder the clauses a specified number of times.")
150 "Randomly reorder the clauses.")
151 (
"random-reorder-literals",
152 "Randomly reorder the literals in each clause in the matrix.")
154 "Don't miniscope when converting to CNF.")
156 "Show translation of first-order formulas to clauses and halt.");
158 po::options_description output_options(
"Output formatting");
159 output_options.add_options()
160 (
"verbosity,v", po::value<int>(),
161 "Set verbosity level (0-3). Default is 2.")
163 "Don't use colour to highlight output.")
165 "Include substitutions when writing output.")
166 (
"indent", po::value<int>(),
167 "Set indentation size. (Default 4.)")
168 (
"out-int", po::value<int>(),
169 "Interval for updating output (default 50,000).");
171 po::options_description search_options(
"Search control");
172 search_options.add_options()
174 "Use all start clauses. (Overides other start clause options.)")
176 "Use all positive/negative start clauses, according to representation (currently always negative). (Interacts with other start clause options.)")
178 "Use all conjecture clauses as start clauses. (Interacts with other start clause options.)")
180 "Only use one start clause. (Interacts with other start clause options.)")
182 "Don't use the regularity test.")
184 "Compute reductions for all literals in the clause, not just the first one.")
186 "Compute extensions for all literals in the clause, not just the first one.")
188 "When using lemmata, consider all literals in the clause, not just the first one.")
190 "Do not use lemmata.");
192 po::options_description backtrack_options(
"Backtracking");
193 backtrack_options.add_options()
195 "Do not limit any backtracking.")
196 (
"lemmata-backtrack",
197 "Do not limit backtracking for lemmata.")
198 (
"reduction-backtrack",
199 "Do not limit backtracking for reductions.")
200 (
"extension-backtrack",
201 "Do not limit backtracking for extensions.")
202 (
"explore-left-trees",
203 "Apply backtracking within left extension trees.")
204 (
"complete,c", po::value<int>(),
205 "Start again with a complete search on reaching the specified depth. (Default UINT32_MAX.)");
207 po::options_description depth_options(
"Depth limiting");
208 depth_options.add_options()
209 (
"depth-limit,d", po::value<int>(),
210 "Maximum depth/path length. (Default UINT32_MAX.)")
211 (
"start-depth", po::value<int>(),
212 "Initial depth/path length. (Default 1.)")
213 (
"depth-increment", po::value<int>(),
214 "Increment for iterative deepening. (Default 1.)")
216 "By default we do not depth limit on reductions or lemmata. Set this if you want to.")
217 (
"limit-by-tree-depth",
218 "Use tree depth (not path length) for deepening.");
220 po::options_description proof_options(
"Proof generation");
221 proof_options.add_options()
223 "Generate a proof compatible with the TPTP. Note that what constitutes a TPTP-compatible proof in connection calculus is currently a moving target, so the format is subject to change. Output is to stdout.")
225 "Generate Prolog format files proof.pl and matrix.pl and store in the $CONNECTPP_PATH directory. You can check these using the check_proof utility.")
227 "Verify any proof found using the internal proof checker. Use this version to get a detailed description of the verification sent to stdout.")
229 "Verify any proof found using the internal proof checker. Use this version for a quiet verification that only adds \"Verified\" or \"FaliedVerification\" to the output string.");
231 po::options_description latex_options(
"LaTeX output");
232 latex_options.add_options()
233 (
"latex", po::value<string>(),
234 "Make a LaTeX file containing a typeset proof. Use \"default\" for \"./latex_proof.tex\" or specify a destination.")
236 "Include substitutions in the LaTeX proof.")
238 "Typeset the latex proof in a tiny font.")
240 "Don't include the matrix in the LaTeX proof.");
242 po::options_description all_options(
"Options");
243 all_options.add(main_options)
244 .add(conversion_options)
247 .add(backtrack_options)
252 po::positional_options_description pos_opts;
253 pos_opts.add(
"input", -1);
254 po::variables_map vars_map;
256 po::store(po::command_line_parser(argc, argv).
257 options(all_options).
258 positional(pos_opts).
264 catch (boost::program_options::error& err) {
265 cout <<
"% SZS status Error for "
266 << params::problem_name <<
" : " << err.what() << endl;
269 po::notify(vars_map);
274 if (vars_map.count(
"help")) {
275 cout << all_options << endl;
278 if (vars_map.count(
"version")) {
279 cout <<
"Connect++ Version V" << VERSION <<
"." << endl;
280 cout <<
"Copyright © 2021-24 Sean Holden. All rights reserved." << endl;
283 if (vars_map.count(
"verbosity")) {
284 int v = vars_map[
"verbosity"].as<
int>();
285 if (v >= 0 && v <= 3)
286 params::verbosity = v;
288 cerr <<
"Verbosity should be between 0 and 3. Using default (2)." << endl;
293 VPrint show(params::verbosity);
297 if (vars_map.count(
"sub-output")) {
298 params::output_terms_with_substitution =
true;
300 if (vars_map.count(
"indent")) {
301 int i = vars_map[
"indent"].as<
int>();
302 if (i >= 0 && i <= UINT8_MAX)
303 params::indent_size = i;
305 cerr <<
"Indent size is negative or too large. Using default." << endl;
307 if (vars_map.count(
"out-int")) {
308 int i = vars_map[
"out-int"].as<
int>();
309 if (i > 0 && i <= UINT32_MAX)
310 params::output_frequency = i;
312 cerr <<
"Interval is negative or too large. Using default." << endl;
314 if (vars_map.count(
"no-equality")) {
315 params::add_equality_axioms =
false;
317 if (vars_map.count(
"equality-last")) {
318 params::equality_axioms_at_start =
false;
320 if (vars_map.count(
"all-distinct-objects")) {
321 params::all_distinct_objects =
true;
323 if (vars_map.count(
"no-distinct-objects")) {
324 if (params::all_distinct_objects) {
325 cerr <<
"Cancelled --all-distinct-objects." << endl;
326 params::all_distinct_objects =
false;
328 params::no_distinct_objects =
true;
330 if (vars_map.count(
"timeout")) {
331 params::timeout =
true;
332 int t = vars_map[
"timeout"].as<
int>();
335 params::timeout_value = t;
337 cerr <<
"Timeout is too small. Using 10 seconds." << endl;
338 params::timeout_value = 10;
342 cerr <<
"Timeout should be positive. Using default." << endl;
344 if (vars_map.count(
"show-default-schedule")) {
345 params::set_default_schedule();
346 cout << params::default_schedule << endl;
349 if (vars_map.count(
"path")) {
350 params::connectpp_path = vars_map[
"path"].as<
string>();
356 params::LaTeX_proof_path
357 = params::pwd_path / params::LaTeX_proof_path;
358 params::Prolog_matrix_path
359 = params::connectpp_path / params::Prolog_matrix_path;
360 params::Prolog_proof_path
361 = params::connectpp_path / params::Prolog_proof_path;
362 params::output_summary_path
363 = params::pwd_path / params::output_summary_path;
367 if (vars_map.count(
"output")) {
368 params::write_output_summary =
true;
369 string op = vars_map[
"output"].as<
string>();
371 params::output_summary_path = op;
373 if (vars_map.count(
"all-definitional")) {
374 params::all_definitional =
true;
376 if (vars_map.count(
"no-definitional")) {
377 params::no_definitional =
true;
378 if (params::all_definitional) {
379 cerr <<
"Setting --no-definitional has cancelled --all-definitional." << endl;
380 params::all_definitional =
false;
384 if (vars_map.count(
"schedule")) {
385 params::use_schedule =
true;
386 if (!params::timeout) {
387 params::timeout =
true;
388 params::timeout_value = 600;
390 params::schedule_path = vars_map[
"schedule"].as<
string>();
392 schedule.read_schedule_from_file(params::schedule_path);
394 catch (std::exception& err) {
395 cout <<
"% SZS status Error for "
396 << params::problem_name <<
" : " << err.what() << endl;
404 if (vars_map.count(
"tptp")) {
405 params::tptp_path = vars_map[
"tptp"].as<
string>();
407 if (vars_map.count(
"reorder")) {
408 int n = vars_map[
"reorder"].as<
int>();
410 params::deterministic_reorder =
true;
411 params::number_of_reorders = n;
414 cerr <<
"Number of re-orders should be positive. Skipping." << endl;
416 if (vars_map.count(
"random-seed")) {
417 int seed = vars_map[
"random-seed"].as<
int>();
419 params::random_seed =
static_cast<unsigned>(seed);
420 params::boost_random_seed =
static_cast<uint32_t
>(seed);
423 cerr <<
"Error: random seed must be a non-negative integer. Using default of 0." << endl;
426 if (vars_map.count(
"random-reorder")) {
427 params::random_reorder =
true;
429 if (vars_map.count(
"random-reorder-literals")) {
430 params::random_reorder_literals =
true;
432 if (vars_map.count(
"no-miniscope")) {
433 params::miniscope =
false;
435 if (vars_map.count(
"show-clauses")) {
436 params::show_clauses =
true;
438 if (vars_map.count(
"no-colour")) {
439 params::use_colours =
false;
459 fs::path initial_path;
460 bool found_file =
false;
461 if (vars_map.count(
"input")) {
463 initial_path = vars_map[
"input"].as<
string>();
466 if (initial_path.is_relative()) {
468 if (fs::exists(initial_path)) {
472 initial_path = fs::canonical(initial_path);
474 catch (std::filesystem::filesystem_error& err) {
475 cout <<
"% SZS status Error for "
476 << params::problem_name <<
" : "
477 << err.what() << endl;
485 fs::path tptp_path(params::tptp_path);
486 initial_path = tptp_path / initial_path;
488 if (fs::exists(initial_path)) {
491 initial_path = fs::canonical(initial_path);
493 catch (std::filesystem::filesystem_error& err) {
494 cout <<
"% SZS status Error for "
495 << params::problem_name <<
" : "
496 << err.what() << endl;
505 if (initial_path.is_absolute() && fs::exists(initial_path)) {
508 initial_path = fs::canonical(initial_path);
510 catch (std::filesystem::filesystem_error& err) {
511 cout <<
"% SZS status Error for "
512 << params::problem_name <<
" : "
513 << err.what() << endl;
521 cout <<
"% SZS status Error for "
522 << params::problem_name <<
" : no problem specified." << endl;
527 cout <<
"% SZS status Error for "
528 << params::problem_name <<
" : the specified file does not exist." << endl;
532 params::full_problem_path = initial_path;
533 params::full_problem_path.remove_filename();
534 params::problem_name = initial_path.stem().string();
535 fs::path path = initial_path;
540 if (vars_map.count(
"depth-limit")) {
541 int l = vars_map[
"depth-limit"].as<
int>();
543 params::depth_limit = l;
545 cerr <<
"Depth limit should be positive. Using default." << endl;
547 if (vars_map.count(
"start-depth")) {
548 int l = vars_map[
"start-depth"].as<
int>();
549 if (l > 1 && l <= params::depth_limit)
550 params::start_depth = l;
552 cerr <<
"Start depth should be positive and bounded by the maximum depth. Using default." << endl;
554 if (vars_map.count(
"depth-increment")) {
555 int l = vars_map[
"depth-increment"].as<
int>();
557 params::depth_increment = l;
559 cerr <<
"Depth increment should be positive. Using default." << endl;
561 if (vars_map.count(
"depth-limit-all")) {
562 params::depth_limit_all =
true;
564 if (vars_map.count(
"limit-by-tree-depth")) {
565 params::limit_by_tree_depth =
true;
579 if (vars_map.count(
"restrict-start")) {
580 params::restrict_start =
true;
582 if (vars_map.count(
"pos-neg-start")) {
583 params::all_pos_neg_start =
true;
585 if (vars_map.count(
"conjecture-start")) {
586 params::conjecture_start =
true;
588 if (vars_map.count(
"all-start")) {
589 show(2,
string(
"--all-start set. This cancels all other start options."),
true);
602 if (vars_map.count(
"no-regularity")) {
603 params::use_regularity_test =
false;
605 if (vars_map.count(
"lemmata-backtrack")) {
606 params::limit_bt_lemmas =
false;
608 if (vars_map.count(
"reduction-backtrack")) {
609 params::limit_bt_reductions =
false;
611 if (vars_map.count(
"extension-backtrack")) {
612 params::limit_bt_extensions =
false;
614 if (vars_map.count(
"explore-left-trees")) {
615 params::limit_bt_extensions_left_tree =
false;
617 if (vars_map.count(
"all-backtrack")) {
618 show(2,
string(
"--all-backtrack set. This prevails over all other backtracking options."),
true);
621 if (vars_map.count(
"all-reductions")) {
622 params::limit_reductions =
false;
624 if (vars_map.count(
"all-extensions")) {
625 params::limit_extensions =
false;
627 if (vars_map.count(
"all-lemmata")) {
628 params::limit_lemmata =
false;
630 if (vars_map.count(
"no-lemmata")) {
631 params::use_lemmata =
false;
633 if (vars_map.count(
"complete")) {
634 int d = vars_map[
"complete"].as<
int>();
635 if (d >= params::start_depth)
636 params::switch_to_complete = d;
638 cerr <<
"Switch to complete search must happen after start depth. Using start depth." << endl;
639 params::switch_to_complete = params::start_depth;
642 if (vars_map.count(
"latex")) {
643 params::generate_LaTeX_proof =
true;
644 params::build_proof =
true;
645 string lp = vars_map[
"latex"].as<
string>();
647 params::LaTeX_proof_path = lp;
649 if (vars_map.count(
"sub-latex")) {
650 params::sub_LaTeX_proof =
true;
652 if (vars_map.count(
"tiny-latex")) {
653 params::latex_tiny_proof =
true;
655 if (vars_map.count(
"latex-no-matrix")) {
656 params::latex_include_matrix =
false;
658 if (vars_map.count(
"tptp-proof")) {
659 params::generate_tptp_proof =
true;
660 params::build_proof =
true;
662 if (vars_map.count(
"prolog-proof")) {
663 params::generate_Prolog_proof =
true;
664 params::build_proof =
true;
666 if (vars_map.count(
"verify")) {
667 params::verify_proof =
true;
668 params::build_proof =
true;
670 if (vars_map.count(
"full-verify")) {
671 params::verify_proof =
true;
672 params::verify_proof_verbose =
true;
673 params::build_proof =
true;
687 show(1,
string(
"Connect++ V"));
688 show(1,
string(VERSION));
689 show(1,
string(
" started at: "));
690 time_t date_and_time;
691 time(&date_and_time);
692 show(1, asctime(localtime(&date_and_time)));
716 if (params::use_schedule) {
717 params::no_definitional =
false;
718 params::all_definitional =
false;
720 show(1,
string(
"Reading from: "));
721 show(1, path.c_str(),
true);
722 bool found_conjecture =
false;
727 catch (std::exception& err) {
728 cout <<
"% SZS status Error for "
729 << params::problem_name <<
" : "
730 << err.what() << endl;
737 if (params::use_schedule) {
738 params::all_definitional =
true;
742 catch (std::exception& err) {
743 cout <<
"% SZS status Error for "
744 << params::problem_name <<
" : "
745 << err.what() << endl;
748 params::all_definitional =
false;
749 params::no_definitional =
true;
753 catch (std::exception& err) {
754 cout <<
"% SZS status Error for "
755 << params::problem_name <<
" : "
756 << err.what() << endl;
764 chrono::milliseconds parse_time =
765 chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime);
766 show(1,
string(
"Total parse and conversion time: "));
767 show(1, std::to_string(parse_time.count()));
768 show(1,
string(
" milliseconds."),
true);
774 show(2,
string(
"Starting proof attempt for: "),
false);
775 show(2, params::problem_name,
true);
779 ProverOutcome prover_outcome;
780 ProverOutcome final_outcome;
781 final_outcome = ProverOutcome::TimeOut;
791 if (!params::use_schedule) {
799 if (params::timeout) {
800 chrono::seconds timeout_duration(params::timeout_value);
801 prover_standard.
set_timeout(startTime + timeout_duration);
806 prover_outcome = prover_standard.
prove();
807 final_outcome = prover_outcome;
822 if (!params::timeout) {
823 params::timeout =
true;
824 params::timeout_value = 600;
829 chrono::milliseconds time_chunk((params::timeout_value * 1000) / 100);
830 chrono::steady_clock::time_point start_time = startTime;
831 chrono::milliseconds chunk_time;
836 size_t schedule_step_number = 1;
837 pair<bool, unsigned int> next_schedule =
schedule.set_next_schedule();
838 if (params::verbosity > 0)
843 while (next_schedule.first) {
844 show(1,
string(
"Schedule step "));
845 show(1, std::to_string(schedule_step_number));
846 show(1,
string(
": "));
847 show(1,
schedule.step_to_string(schedule_step_number - 1),
true);
851 if (params::all_definitional) {
852 prover = &prover_all_definitional;
854 else if (params::no_definitional) {
855 prover = &prover_no_definitional;
858 prover = &prover_standard;
863 if (next_schedule.second == 0) {
864 prover->
set_timeout(startTime + chrono::seconds(params::timeout_value));
866 else if (schedule_step_number == 1) {
867 prover->
set_timeout(startTime + (next_schedule.second * time_chunk));
870 prover->
set_timeout(start_time + (next_schedule.second * time_chunk));
873 prover_outcome = prover->
prove();
875 if (prover_outcome == ProverOutcome::Valid ||
876 prover_outcome == ProverOutcome::Error ||
877 prover_outcome == ProverOutcome::False) {
878 final_outcome = prover_outcome;
882 chunk_time = chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - start_time);
885 show(1,
string(
"Timeout after "));
886 show(1, std::to_string(chunk_time.count()));
887 show(1,
string(
" milliseconds"),
true);
889 start_time = chrono::steady_clock::now();
890 schedule_step_number++;
891 next_schedule =
schedule.set_next_schedule();
901 if (params::verbosity > 0) {
908 chrono::milliseconds runTime =
909 chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime);
910 show(1,
string(
"Total run time: "));
911 show(1, std::to_string(runTime.count()));
912 show(1,
string(
" milliseconds."),
true);
936 cout <<
"% SZS status ";
937 switch (final_outcome) {
938 case ProverOutcome::Valid:
941 outcome =
"Unsatisfiable";
945 if (simplified_has_axioms) {
948 outcome =
"ContradictoryAxioms";
951 else if (conj_false || neg_conj_removed) {
952 outcome =
"ContradictoryAxioms";
956 else if (conj_missing) {
957 outcome =
"Unsatisfiable";
971 if (neg_conj_removed) {
980 case ProverOutcome::False:
983 outcome =
"Satisfiable";
986 if (simplified_has_axioms) {
990 else if (conj_false || neg_conj_removed) {
991 outcome =
"CounterSatisfiable";
993 else if (conj_missing) {
994 outcome =
"Satisfiable";
997 outcome =
"CounterSatisfiable";
1003 outcome =
"Theorem";
1005 else if (neg_conj_removed) {
1010 outcome =
"CounterSatisfiable";
1014 case ProverOutcome::PathLenLimit:
1017 case ProverOutcome::Error:
1020 case ProverOutcome::TimeOut:
1024 if (chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime).count() < (params::timeout_value * 1000))
1027 outcome =
"Timeout";
1033 cout << outcome <<
" for " << params::problem_name;
1037 bool verified =
false;
1038 if (params::verify_proof && final_outcome == ProverOutcome::Valid) {
1045 vector<pair<string, vector<size_t>>>
1050 get<0>(inds), get<3>(inds));
1052 bool verification_outcome;
1053 string outcome_string;
1054 if (params::verify_proof_verbose) {
1055 pair<bool, string> outcome = checker.check_proof_verbose();
1056 verification_outcome = outcome.first;
1057 outcome_string = outcome.second;
1060 verification_outcome = checker.check_proof();
1063 if (verification_outcome) {
1065 cout <<
" : Verified";
1068 cout <<
" : FailedVerification";
1071 if (params::verify_proof_verbose) {
1072 cout << endl <<
"% SZS output start Proof for " << params::problem_name << endl << endl;
1073 cout << outcome_string << endl;
1074 cout <<
"% SZS output end Proof for " << params::problem_name << endl;
1081 if (params::write_output_summary) {
1083 std::ofstream out_file(params::output_summary_path);
1084 out_file <<
"ProblemName: " << params::problem_name << endl;
1085 if (found_conjecture)
1086 out_file <<
"ConjectureFound" << endl;
1088 out_file <<
"NoConjectureFound" << endl;
1090 status =
"NoStatus";
1091 out_file <<
"ProblemStatus: " << status << endl;
1092 out_file <<
"ProverOutcome: " << outcome << endl;
1093 if (params::verify_proof && final_outcome == ProverOutcome::Valid) {
1095 out_file <<
"Verified" << endl;
1097 out_file <<
"FailedVerification" << endl;
1100 out_file <<
"NoVerify" << endl;
1101 out_file <<
"Time: " << runTime.count() << endl;
1104 catch (std::exception& err) {
1105 cerr <<
"Error: can't write output summary." << endl;
1111 if (params::generate_tptp_proof && (final_outcome == ProverOutcome::Valid)) {
1112 cout <<
"% SZS output start Proof for " << params::problem_name << endl;
1113 cout << prover->get_tptp_conversion_string();
1115 cout <<
"% SZS output end Proof for " << params::problem_name << endl;
1117 return EXIT_SUCCESS;
Mechanism for looking after functions.
Management of Predicate objects.
Prover using a pair of stacks to conduct the proof search.
void read_from_tptp_file(const string &, bool &, size_t &)
Obviously, reads a problem from a TPTP file.
bool problem_has_true_conjecture() const
Find out whether the problem's conjecture is $true.
void show_tptp_proof()
Show a Prolog-formatted proof.
bool problem_is_cnf_only() const
Find out whether the problem is CNF only.
void set_problem_path(fs::path &p)
Set the path for the problem being solved. U.
void show_statistics() const
Display counts of number of extensions tried and so on.
bool problem_has_missing_conjecture() const
Find out whether the problem's conjecture is missing, in the sense that it didn't appear in the inp...
bool problem_has_negated_conjecture_removed() const
Find out whether the problem's negated conjecture was simplified out.
void set_timeout(chrono::steady_clock::time_point time)
Set a timeout.
bool simplified_problem_has_fof_axioms() const
Find out from the parser whether the problem had axioms after simplification.
string get_status() const
Straightforward get method.
bool problem_has_fof_axioms() const
Find out from the parser whether the problem had axioms before simplification.
std::tuple< VariableIndex *, FunctionIndex *, PredicateIndex *, TermIndex * > get_indexes()
Straightforward get method.
vector< pair< string, vector< size_t > > > get_internal_proof() const
Get an internal representation of the proof stack.
Matrix & get_matrix()
Get a reference to the matrix.
bool problem_has_false_conjecture() const
Find out whether the problem's conjecture is $false.
ProverOutcome prove()
Here is where the magic happens.
Look after terms, (ideally) using hash consing to avoid storing copies of terms.
Storage of named variables, and management of new, anonymous and unique variables.
Wrap up the parsing process and the operation of a schedule in a single class.
Hide all the global stuff in this namespace.
static void set_all_backtrack()
Self-explanatory.
static void set_all_start()
Self-explanatory.
static bool no_start_options()
Self-explanatory.
static void correct_missing_start_options()
Self-explanatory.