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." << endl;
290 VPrint show(params::verbosity);
291 if (vars_map.count(
"sub-output")) {
292 params::output_terms_with_substitution =
true;
294 if (vars_map.count(
"indent")) {
295 int i = vars_map[
"indent"].as<
int>();
296 if (i >= 0 && i <= UINT8_MAX)
297 params::indent_size = i;
299 cerr <<
"Indent size is negative or too large. Using default." << endl;
301 if (vars_map.count(
"out-int")) {
302 int i = vars_map[
"out-int"].as<
int>();
303 if (i > 0 && i <= UINT32_MAX)
304 params::output_frequency = i;
306 cerr <<
"Interval is negative or too large. Using default." << endl;
308 if (vars_map.count(
"no-equality")) {
309 params::add_equality_axioms =
false;
311 if (vars_map.count(
"equality-last")) {
312 params::equality_axioms_at_start =
false;
314 if (vars_map.count(
"all-distinct-objects")) {
315 params::all_distinct_objects =
true;
317 if (vars_map.count(
"no-distinct-objects")) {
318 if (params::all_distinct_objects) {
319 cerr <<
"Cancelled --all-distinct-objects." << endl;
320 params::all_distinct_objects =
false;
322 params::no_distinct_objects =
true;
324 if (vars_map.count(
"timeout")) {
325 params::timeout =
true;
326 int t = vars_map[
"timeout"].as<
int>();
329 params::timeout_value = t;
331 cerr <<
"Timeout is too small. Using 10 seconds." << endl;
332 params::timeout_value = 10;
336 cerr <<
"Timeout should be positive. Using default." << endl;
338 if (vars_map.count(
"show-default-schedule")) {
339 params::set_default_schedule();
340 cout << params::default_schedule << endl;
343 if (vars_map.count(
"path")) {
344 params::connectpp_path = vars_map[
"path"].as<
string>();
348 params::LaTeX_proof_path
349 = params::pwd_path / params::LaTeX_proof_path;
350 params::Prolog_matrix_path
351 = params::connectpp_path / params::Prolog_matrix_path;
352 params::Prolog_proof_path
353 = params::connectpp_path / params::Prolog_proof_path;
354 params::output_summary_path
355 = params::pwd_path / params::output_summary_path;
357 if (vars_map.count(
"output")) {
358 params::write_output_summary =
true;
359 string op = vars_map[
"output"].as<
string>();
361 params::output_summary_path = op;
363 if (vars_map.count(
"all-definitional")) {
364 params::all_definitional =
true;
366 if (vars_map.count(
"no-definitional")) {
367 params::no_definitional =
true;
368 if (params::all_definitional) {
369 cerr <<
"Setting --no-definitional has cancelled --all-definitional." << endl;
370 params::all_definitional =
false;
374 if (vars_map.count(
"schedule")) {
375 params::use_schedule =
true;
376 if (!params::timeout) {
377 params::timeout =
true;
378 params::timeout_value = 600;
380 params::schedule_path = vars_map[
"schedule"].as<
string>();
382 schedule.read_schedule_from_file(params::schedule_path);
384 catch (std::exception& err) {
385 cout <<
"% SZS status Error for "
386 << params::problem_name <<
" : " << err.what() << endl;
394 if (vars_map.count(
"tptp")) {
395 params::tptp_path = vars_map[
"tptp"].as<
string>();
397 if (vars_map.count(
"reorder")) {
398 int n = vars_map[
"reorder"].as<
int>();
400 params::deterministic_reorder =
true;
401 params::number_of_reorders = n;
404 cerr <<
"Number of re-orders should be positive. Skipping." << endl;
406 if (vars_map.count(
"random-seed")) {
407 int seed = vars_map[
"random-seed"].as<
int>();
409 params::random_seed =
static_cast<unsigned>(seed);
410 params::boost_random_seed =
static_cast<uint32_t
>(seed);
413 cerr <<
"Error: random seed must be a non-negative integer. Using default of 0." << endl;
416 if (vars_map.count(
"random-reorder")) {
417 params::random_reorder =
true;
419 if (vars_map.count(
"random-reorder-literals")) {
420 params::random_reorder_literals =
true;
422 if (vars_map.count(
"no-miniscope")) {
423 params::miniscope =
false;
425 if (vars_map.count(
"show-clauses")) {
426 params::show_clauses =
true;
428 if (vars_map.count(
"no-colour")) {
429 params::use_colours =
false;
449 fs::path initial_path;
450 bool found_file =
false;
451 if (vars_map.count(
"input")) {
453 initial_path = vars_map[
"input"].as<
string>();
456 if (initial_path.is_relative()) {
458 if (fs::exists(initial_path)) {
462 initial_path = fs::canonical(initial_path);
464 catch (std::filesystem::filesystem_error& err) {
465 cout <<
"% SZS status Error for "
466 << params::problem_name <<
" : "
467 << err.what() << endl;
475 fs::path tptp_path(params::tptp_path);
476 initial_path = tptp_path / initial_path;
478 if (fs::exists(initial_path)) {
481 initial_path = fs::canonical(initial_path);
483 catch (std::filesystem::filesystem_error& err) {
484 cout <<
"% SZS status Error for "
485 << params::problem_name <<
" : "
486 << err.what() << endl;
495 if (initial_path.is_absolute() && fs::exists(initial_path)) {
498 initial_path = fs::canonical(initial_path);
500 catch (std::filesystem::filesystem_error& err) {
501 cout <<
"% SZS status Error for "
502 << params::problem_name <<
" : "
503 << err.what() << endl;
511 cout <<
"% SZS status Error for "
512 << params::problem_name <<
" : no problem specified." << endl;
517 cout <<
"% SZS status Error for "
518 << params::problem_name <<
" : the specified file does not exist." << endl;
522 params::full_problem_path = initial_path;
523 params::full_problem_path.remove_filename();
524 params::problem_name = initial_path.stem().string();
525 fs::path path = initial_path;
531 if (vars_map.count(
"depth-limit")) {
532 int l = vars_map[
"depth-limit"].as<
int>();
534 params::depth_limit = l;
536 cerr <<
"Depth limit should be positive. Using default." << endl;
538 if (vars_map.count(
"start-depth")) {
539 int l = vars_map[
"start-depth"].as<
int>();
540 if (l > 1 && l <= params::depth_limit)
541 params::start_depth = l;
543 cerr <<
"Start depth should be positive and bounded by the maximum depth. Using default." << endl;
545 if (vars_map.count(
"depth-increment")) {
546 int l = vars_map[
"depth-increment"].as<
int>();
548 params::depth_increment = l;
550 cerr <<
"Depth increment should be positive. Using default." << endl;
552 if (vars_map.count(
"depth-limit-all")) {
553 params::depth_limit_all =
true;
555 if (vars_map.count(
"limit-by-tree-depth")) {
556 params::limit_by_tree_depth =
true;
570 if (vars_map.count(
"restrict-start")) {
571 params::restrict_start =
true;
573 if (vars_map.count(
"pos-neg-start")) {
574 params::all_pos_neg_start =
true;
576 if (vars_map.count(
"conjecture-start")) {
577 params::conjecture_start =
true;
579 if (vars_map.count(
"all-start")) {
580 show(2,
string(
"--all-start set. This cancels all other start options."),
true);
590 if (vars_map.count(
"no-regularity")) {
591 params::use_regularity_test =
false;
593 if (vars_map.count(
"lemmata-backtrack")) {
594 params::limit_bt_lemmas =
false;
596 if (vars_map.count(
"reduction-backtrack")) {
597 params::limit_bt_reductions =
false;
599 if (vars_map.count(
"extension-backtrack")) {
600 params::limit_bt_extensions =
false;
602 if (vars_map.count(
"explore-left-trees")) {
603 params::limit_bt_extensions_left_tree =
false;
605 if (vars_map.count(
"all-backtrack")) {
606 show(2,
string(
"--all-backtrack set. This prevails over all other backtracking options."),
true);
609 if (vars_map.count(
"all-reductions")) {
610 params::limit_reductions =
false;
612 if (vars_map.count(
"all-extensions")) {
613 params::limit_extensions =
false;
615 if (vars_map.count(
"all-lemmata")) {
616 params::limit_lemmata =
false;
618 if (vars_map.count(
"no-lemmata")) {
619 params::use_lemmata =
false;
621 if (vars_map.count(
"complete")) {
622 int d = vars_map[
"complete"].as<
int>();
623 if (d >= params::start_depth)
624 params::switch_to_complete = d;
626 cerr <<
"Switch to complete search must happen after start depth. Using start depth." << endl;
627 params::switch_to_complete = params::start_depth;
630 if (vars_map.count(
"latex")) {
631 params::generate_LaTeX_proof =
true;
632 params::build_proof =
true;
633 string lp = vars_map[
"latex"].as<
string>();
635 params::LaTeX_proof_path = lp;
637 if (vars_map.count(
"sub-latex")) {
638 params::sub_LaTeX_proof =
true;
640 if (vars_map.count(
"tiny-latex")) {
641 params::latex_tiny_proof =
true;
643 if (vars_map.count(
"latex-no-matrix")) {
644 params::latex_include_matrix =
false;
646 if (vars_map.count(
"tptp-proof")) {
647 params::generate_tptp_proof =
true;
648 params::build_proof =
true;
650 if (vars_map.count(
"prolog-proof")) {
651 params::generate_Prolog_proof =
true;
652 params::build_proof =
true;
654 if (vars_map.count(
"verify")) {
655 params::verify_proof =
true;
656 params::build_proof =
true;
658 if (vars_map.count(
"full-verify")) {
659 params::verify_proof =
true;
660 params::verify_proof_verbose =
true;
661 params::build_proof =
true;
675 show(1,
string(
"Connect++ V"));
676 show(1,
string(VERSION));
677 show(1,
string(
" started at: "));
678 time_t date_and_time;
679 time(&date_and_time);
680 show(1, asctime(localtime(&date_and_time)));
702 if (params::use_schedule) {
703 params::no_definitional =
false;
704 params::all_definitional =
false;
706 show(1,
string(
"Reading from: "));
707 show(1, path.c_str(),
true);
708 bool found_conjecture =
false;
713 catch (std::exception& err) {
714 cout <<
"% SZS status Error for "
715 << params::problem_name <<
" : "
716 << err.what() << endl;
723 if (params::use_schedule) {
724 params::all_definitional =
true;
728 catch (std::exception& err) {
729 cout <<
"% SZS status Error for "
730 << params::problem_name <<
" : "
731 << err.what() << endl;
734 params::all_definitional =
false;
735 params::no_definitional =
true;
739 catch (std::exception& err) {
740 cout <<
"% SZS status Error for "
741 << params::problem_name <<
" : "
742 << err.what() << endl;
749 chrono::milliseconds parse_time =
750 chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime);
751 show(1,
string(
"Total parse and conversion time: "));
752 show(1, std::to_string(parse_time.count()));
753 show(1,
string(
" milliseconds."),
true);
759 show(2,
string(
"Starting proof attempt for: "),
false);
760 show(2, params::problem_name,
true);
764 ProverOutcome prover_outcome;
765 ProverOutcome final_outcome;
766 final_outcome = ProverOutcome::TimeOut;
776 if (!params::use_schedule) {
784 if (params::timeout) {
785 chrono::seconds timeout_duration(params::timeout_value);
786 prover_standard.
set_timeout(startTime + timeout_duration);
791 prover_outcome = prover_standard.
prove();
792 final_outcome = prover_outcome;
807 if (!params::timeout) {
808 params::timeout =
true;
809 params::timeout_value = 600;
814 chrono::milliseconds time_chunk((params::timeout_value * 1000) / 100);
815 chrono::steady_clock::time_point start_time = startTime;
816 chrono::milliseconds chunk_time;
821 size_t schedule_step_number = 1;
822 pair<bool, unsigned int> next_schedule =
824 if (params::verbosity > 0)
829 while (next_schedule.first) {
830 show(1,
string(
"Schedule step "));
831 show(1, std::to_string(schedule_step_number));
832 show(1,
string(
": "));
833 show(1,
schedule.step_to_string(schedule_step_number - 1),
true);
837 if (params::all_definitional) {
838 prover = &prover_all_definitional;
840 else if (params::no_definitional) {
841 prover = &prover_no_definitional;
844 prover = &prover_standard;
849 if (next_schedule.second == 0) {
850 prover->
set_timeout(startTime + chrono::seconds(params::timeout_value));
852 else if (schedule_step_number == 1) {
853 prover->
set_timeout(startTime + (next_schedule.second * time_chunk));
856 prover->
set_timeout(start_time + (next_schedule.second * time_chunk));
859 prover_outcome = prover->
prove();
861 if (prover_outcome == ProverOutcome::Valid ||
862 prover_outcome == ProverOutcome::Error ||
863 prover_outcome == ProverOutcome::False) {
864 final_outcome = prover_outcome;
868 chunk_time = chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - start_time);
871 show(1,
string(
"Timeout after "));
872 show(1, std::to_string(chunk_time.count()));
873 show(1,
string(
" milliseconds"),
true);
875 start_time = chrono::steady_clock::now();
876 schedule_step_number++;
877 next_schedule =
schedule.set_next_schedule();
887 if (params::verbosity > 0) {
894 chrono::milliseconds runTime =
895 chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime);
896 show(1,
string(
"Total run time: "));
897 show(1, std::to_string(runTime.count()));
898 show(1,
string(
" milliseconds."),
true);
922 cout <<
"% SZS status ";
923 switch (final_outcome) {
924 case ProverOutcome::Valid:
927 outcome =
"Unsatisfiable";
931 if (simplified_has_axioms) {
934 outcome =
"ContradictoryAxioms";
937 else if (conj_false || neg_conj_removed) {
938 outcome =
"ContradictoryAxioms";
942 else if (conj_missing) {
943 outcome =
"Unsatisfiable";
957 if (neg_conj_removed) {
966 case ProverOutcome::False:
969 outcome =
"Satisfiable";
972 if (simplified_has_axioms) {
976 else if (conj_false || neg_conj_removed) {
977 outcome =
"CounterSatisfiable";
979 else if (conj_missing) {
980 outcome =
"Satisfiable";
983 outcome =
"CounterSatisfiable";
991 else if (neg_conj_removed) {
996 outcome =
"CounterSatisfiable";
1000 case ProverOutcome::PathLenLimit:
1003 case ProverOutcome::Error:
1006 case ProverOutcome::TimeOut:
1010 if (chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - startTime).count() < (params::timeout_value * 1000))
1013 outcome =
"Timeout";
1019 cout << outcome <<
" for " << params::problem_name;
1023 bool verified =
false;
1024 if (params::verify_proof && final_outcome == ProverOutcome::Valid) {
1031 vector<pair<string, vector<size_t>>>
1036 get<0>(inds), get<3>(inds));
1038 bool verification_outcome;
1039 string outcome_string;
1040 if (params::verify_proof_verbose) {
1041 pair<bool, string> outcome = checker.check_proof_verbose();
1042 verification_outcome = outcome.first;
1043 outcome_string = outcome.second;
1046 verification_outcome = checker.check_proof();
1049 if (verification_outcome) {
1051 cout <<
" : Verified";
1054 cout <<
" : FailedVerification";
1057 if (params::verify_proof_verbose) {
1058 cout << endl <<
"% SZS output start Proof for " << params::problem_name << endl << endl;
1059 cout << outcome_string << endl;
1060 cout <<
"% SZS output end Proof for " << params::problem_name << endl;
1067 if (params::write_output_summary) {
1069 std::ofstream out_file(params::output_summary_path);
1070 out_file <<
"ProblemName: " << params::problem_name << endl;
1071 if (found_conjecture)
1072 out_file <<
"ConjectureFound" << endl;
1074 out_file <<
"NoConjectureFound" << endl;
1076 status =
"NoStatus";
1077 out_file <<
"ProblemStatus: " << status << endl;
1078 out_file <<
"ProverOutcome: " << outcome << endl;
1079 if (params::verify_proof && final_outcome == ProverOutcome::Valid) {
1081 out_file <<
"Verified" << endl;
1083 out_file <<
"FailedVerification" << endl;
1086 out_file <<
"NoVerify" << endl;
1087 out_file <<
"Time: " << runTime.count() << endl;
1090 catch (std::exception& err) {
1091 cerr <<
"Error: can't write output summary." << endl;
1097 if (params::generate_tptp_proof && (final_outcome == ProverOutcome::Valid)) {
1098 cout <<
"% SZS output start Proof for " << params::problem_name << endl;
1099 cout << prover->get_tptp_conversion_string();
1101 cout <<
"% SZS output end Proof for " << params::problem_name << endl;
1103 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 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.