![]() |
Connect++ 0.7.0
A fast, readable connection prover for first-order logic.
|
The tptp_parser namespace contains a lot of stuff that's essentially just global. More...
Classes | |
| struct | cnf_annotated_grammar |
| struct | cnf_annotated_struct |
| Parser's representation of a Clause. More... | |
| struct | cnf_formula_grammar |
| struct | fof_annotated_grammar |
| struct | fof_atomic_formula_grammar |
| struct | fof_defined_infix_formula_grammar |
| struct | fof_formula_grammar |
| struct | fof_infix_unary_grammar |
| struct | fof_plain_term_struct |
| Recursive data structure for Terms. More... | |
| struct | fof_term_grammar |
| struct | include_grammar |
| struct | infix_struct |
| Structure for fof_defined_infix_formula and fof_infix_unary. More... | |
| struct | literal_grammar |
| struct | TPTP_file_grammar |
Typedefs | |
| using | fof_arguments_struct |
| Variant - Term arguments can be Variables or other Terms. | |
| using | fof_atomic_formula_type |
| An atomic formula can be infix as well. | |
Functions | |
| void | read_tptp_from_file_simple (const string &file_name, string &file_contents) |
| void | recursive_tptp_include (const FileIncludeItem &include_item) |
Variables | |
| VariableIndex * | var_index_p |
| FunctionIndex * | fun_index_p |
| TermIndex * | t_index_p |
| PredicateIndex * | p_index_p |
| TPTPRecords * | records_p |
| vector< FileIncludeItem > | file_includes |
| set< string > | to_include |
| bool | include_this_item |
| fs::path | include_file_path |
| fs::path | include_file_name |
| bool | is_first_status = true |
| string | status |
| vector< string > | all_defined |
| vector< string > | all_system |
| set< string > | distinct_objects |
| bool | equals_added |
| Predicate * | equals_p |
| bool | conjecture_found = false |
| bool | negated_conjecture_found = false |
| bool | conjecture_true = false |
| bool | conjecture_false = false |
| bool | found_true_axiom = false |
| bool | found_false_axiom = false |
| bool | negated_conjecture_exists = false |
| bool | has_axioms = false |
| bool | has_axioms_remaining = false |
| bool | cnf_only = false |
| size_t | number_of_negated_conjecture_clauses = 0 |
| size_t | number_of_simplified_negated_conjecture_clauses = 0 |
| string | current_clause_name |
| string | current_clause_role |
| vector< string > | clause_names |
| vector< string > | clause_roles |
| vector< vector< string > > | fof_clause_names |
| string | current_formula_role |
| vector< string > | formula_roles |
| string | current_formula_name |
| vector< string > | formula_names |
| bool | neg_lit |
| Literal | current_lit |
| Clause | current_clause |
| vector< Clause > | all_clauses |
| FOF | current_formula (FOFType::Empty) |
| vector< FOF > | all_formulas |
| qi::rule< Iter, char()> | percentage_sign |
| qi::rule< Iter, char()> | double_quote |
| qi::rule< Iter, char()> | do_char |
| qi::rule< Iter, char()> | single_quote |
| qi::rule< Iter, char()> | sq_char |
| qi::rule< Iter, char()> | sign |
| qi::rule< Iter, char()> | dot |
| qi::rule< Iter, char()> | exponent |
| qi::rule< Iter, char()> | slash_char |
| qi::rule< Iter, char()> | slosh_char |
| qi::rule< Iter, char()> | zero_numeric |
| qi::rule< Iter, char()> | non_zero_numeric |
| qi::rule< Iter, char()> | numeric |
| qi::rule< Iter, char()> | lower_alpha |
| qi::rule< Iter, char()> | upper_alpha |
| qi::rule< Iter, char()> | alpha_numeric |
| qi::rule< Iter, char()> | dollar |
| qi::rule< Iter, char()> | printable_char |
| qi::rule< Iter, char()> | viewable_char |
| qi::rule< Iter, string()> | slash |
| qi::rule< Iter, string()> | slosh |
| qi::rule< Iter, string()> | unsigned_exp_integer |
| qi::rule< Iter, string()> | signed_exp_integer |
| qi::rule< Iter, string()> | exp_integer |
| qi::rule< Iter, string()> | dot_decimal |
| qi::rule< Iter, string()> | positive_decimal |
| qi::rule< Iter, string()> | decimal |
| qi::rule< Iter, string()> | decimal_fraction |
| qi::rule< Iter, string()> | decimal_exponent |
| qi::rule< Iter, string()> | unsigned_integer |
| qi::rule< Iter, string()> | signed_integer |
| qi::rule< Iter, string()> | integer |
| qi::rule< Iter, string()> | unsigned_rational |
| qi::rule< Iter, string()> | signed_rational |
| qi::rule< Iter, string()> | rational |
| qi::rule< Iter, string()> | unsigned_real |
| qi::rule< Iter, string()> | signed_real |
| qi::rule< Iter, string()> | real |
| qi::rule< Iter, string()> | vline |
| qi::rule< Iter, string()> | star |
| qi::rule< Iter, string()> | plus |
| qi::rule< Iter, string()> | arrow |
| qi::rule< Iter, string()> | less_sign |
| qi::rule< Iter, string()> | hash |
| qi::rule< Iter, string()> | lower_word |
| qi::rule< Iter, string()> | formula_role |
| qi::rule< Iter, string()> | upper_word |
| qi::rule< Iter, string()> | variable |
| qi::rule< Iter, string()> | dollar_dollar_word |
| qi::rule< Iter, string()> | dollar_word |
| qi::rule< Iter, string()> | distinct_object |
| qi::rule< Iter, string()> | single_quoted |
| qi::rule< Iter, string()> | file_name |
| qi::rule< Iter > | null |
| qi::rule< Iter, string()> | comment_status |
| qi::rule< Iter, string(), ascii::space_type > | status_comment |
| qi::rule< Iter, string()> | standard_comment |
| qi::rule< Iter, string(), ascii::space_type > | comment_line |
| qi::rule< Iter, string()> | not_star_slash |
| qi::rule< Iter, string()> | comment_block |
| qi::rule< Iter, string(), ascii::space_type > | comment |
| qi::rule< Iter, string()> | atomic_defined_word |
| qi::rule< Iter, string()> | atomic_system_word |
| qi::rule< Iter, string()> | system_functor |
| qi::rule< Iter, string()> | system_constant |
| qi::rule< Iter, string()> | number |
| qi::rule< Iter, string()> | atomic_word |
| qi::rule< Iter, string()> | predicate |
| qi::rule< Iter, string()> | functor |
| qi::rule< Iter, string()> | constant |
| qi::rule< Iter, string()> | proposition |
| qi::rule< Iter, string()> | name |
| qi::rule< Iter, string()> | defined_predicate |
| qi::rule< Iter, string()> | defined_proposition |
| qi::rule< Iter, string()> | defined_functor |
| qi::rule< Iter, string()> | defined_constant |
| qi::rule< Iter, string()> | defined_term |
| qi::rule< Iter, string()> | infix_equality |
| qi::rule< Iter, string()> | infix_inequality |
| qi::rule< Iter, string()> | defined_infix_pred |
| qi::rule< Iter, string()> | fof_quantifier |
| qi::rule< Iter, string()> | nonassoc_connective |
| qi::rule< Iter, string()> | assoc_connective |
| qi::rule< Iter, string()> | unary_connective |
The tptp_parser namespace contains a lot of stuff that's essentially just global.
Corresponds to v8.1.0.0 of the TPTP definition on 2-8-22.
WARNING!
You should probably REALLY not touch this unless you're very familiar indeed with the Spirit library in Boost, which is what's used to build the parser.
The good news is that you should never have to, because I'm a lovely man and have done all the hard work so you don't have to. Essentially the class TPTPParser wraps everything up and a call to TPTPParser::parse_tptp_from_file does a great deal (all!) of the work for you. This happens in StackProver::read_from_tptp_file, and at that point all the indices for Terms etc and the Matrix should be built.
Final note: yes this could be simpler, but the aim is to follow the actual TPTP specification as closely as possible. The naming should support this – names are chosen as much as possible to correspond to the TPTP documentation.
"What is this madness!?" I hear you cry.
Well, writing this is made very straightforward if you allow semantic actions to construct the results of the parse in what are essentially global data structures. Hiding them in a namespace takes some of the sting and uglyness away. Doing it differently is, I claim, just making life more difficult – this way, the TPTPParser class can just pull things out of the eventual globals – the user doesn't have to be any the wiser and they end up using the TermIndex, Matrix and so on quite happily, because those are the actual end result.
The boost library does actually have good support for doing all this in a nice OO way. Yes, I've tried that too. I came to the conclusion that the current approach yields much more readable code.
Variant - Term arguments can be Variables or other Terms.
Definition at line 92 of file TPTPParser.hpp.
An atomic formula can be infix as well.
Definition at line 121 of file TPTPParser.hpp.
| void tptp_parser::read_tptp_from_file_simple | ( | const string & | file_name, |
| string & | file_contents ) |
Definition at line 1982 of file TPTPParser.cpp.
| void tptp_parser::recursive_tptp_include | ( | const FileIncludeItem & | include_item | ) |
Definition at line 2027 of file TPTPParser.cpp.
| vector<Clause> tptp_parser::all_clauses |
Definition at line 156 of file TPTPParser.cpp.
| vector<string> tptp_parser::all_defined |
Definition at line 112 of file TPTPParser.cpp.
| vector<FOF> tptp_parser::all_formulas |
Definition at line 161 of file TPTPParser.cpp.
| vector<string> tptp_parser::all_system |
Definition at line 113 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::alpha_numeric |
Definition at line 222 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::arrow |
Definition at line 288 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::assoc_connective |
Definition at line 484 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::atomic_defined_word |
Definition at line 385 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::atomic_system_word |
Definition at line 387 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::atomic_word |
Definition at line 398 of file TPTPParser.cpp.
| vector<string> tptp_parser::clause_names |
Definition at line 140 of file TPTPParser.cpp.
| vector<string> tptp_parser::clause_roles |
Definition at line 141 of file TPTPParser.cpp.
| bool tptp_parser::cnf_only = false |
Definition at line 132 of file TPTPParser.cpp.
| qi::rule<Iter, string(), ascii::space_type> tptp_parser::comment |
Definition at line 383 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::comment_block |
Definition at line 378 of file TPTPParser.cpp.
| qi::rule<Iter, string(), ascii::space_type> tptp_parser::comment_line |
Definition at line 369 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::comment_status |
Definition at line 347 of file TPTPParser.cpp.
| bool tptp_parser::conjecture_false = false |
Definition at line 126 of file TPTPParser.cpp.
| bool tptp_parser::conjecture_found = false |
Definition at line 123 of file TPTPParser.cpp.
| bool tptp_parser::conjecture_true = false |
Definition at line 125 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::constant |
Definition at line 405 of file TPTPParser.cpp.
| Clause tptp_parser::current_clause |
Definition at line 155 of file TPTPParser.cpp.
| string tptp_parser::current_clause_name |
Definition at line 138 of file TPTPParser.cpp.
| string tptp_parser::current_clause_role |
Definition at line 139 of file TPTPParser.cpp.
| string tptp_parser::current_formula_name |
Definition at line 148 of file TPTPParser.cpp.
| string tptp_parser::current_formula_role |
Definition at line 146 of file TPTPParser.cpp.
| Literal tptp_parser::current_lit |
Definition at line 154 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::decimal |
Definition at line 253 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::decimal_exponent |
Definition at line 257 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::decimal_fraction |
Definition at line 255 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_constant |
Definition at line 452 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_functor |
Definition at line 433 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_infix_pred |
Definition at line 460 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_predicate |
Definition at line 411 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_proposition |
Definition at line 425 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::defined_term |
Definition at line 454 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::distinct_object |
Definition at line 330 of file TPTPParser.cpp.
| set<string> tptp_parser::distinct_objects |
Definition at line 114 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::do_char |
Definition at line 190 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::dollar |
Definition at line 227 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::dollar_dollar_word |
Definition at line 323 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::dollar_word |
Definition at line 327 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::dot |
Definition at line 204 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::dot_decimal |
Definition at line 249 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::double_quote |
Definition at line 188 of file TPTPParser.cpp.
| bool tptp_parser::equals_added |
Definition at line 118 of file TPTPParser.cpp.
| Predicate* tptp_parser::equals_p |
Definition at line 119 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::exp_integer |
Definition at line 246 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::exponent |
Definition at line 206 of file TPTPParser.cpp.
| vector<FileIncludeItem> tptp_parser::file_includes |
Definition at line 90 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::file_name |
Definition at line 342 of file TPTPParser.cpp.
| vector<vector<string> > tptp_parser::fof_clause_names |
Definition at line 142 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::fof_quantifier |
Definition at line 472 of file TPTPParser.cpp.
| vector<string> tptp_parser::formula_names |
Definition at line 149 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::formula_role |
Definition at line 299 of file TPTPParser.cpp.
| vector<string> tptp_parser::formula_roles |
Definition at line 147 of file TPTPParser.cpp.
| bool tptp_parser::found_false_axiom = false |
Definition at line 128 of file TPTPParser.cpp.
| bool tptp_parser::found_true_axiom = false |
Definition at line 127 of file TPTPParser.cpp.
| FunctionIndex* tptp_parser::fun_index_p |
Definition at line 82 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::functor |
Definition at line 403 of file TPTPParser.cpp.
| bool tptp_parser::has_axioms = false |
Definition at line 130 of file TPTPParser.cpp.
| bool tptp_parser::has_axioms_remaining = false |
Definition at line 131 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::hash |
Definition at line 292 of file TPTPParser.cpp.
| fs::path tptp_parser::include_file_name |
Definition at line 105 of file TPTPParser.cpp.
| fs::path tptp_parser::include_file_path |
Definition at line 104 of file TPTPParser.cpp.
| bool tptp_parser::include_this_item |
Definition at line 100 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::infix_equality |
Definition at line 456 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::infix_inequality |
Definition at line 458 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::integer |
Definition at line 263 of file TPTPParser.cpp.
| bool tptp_parser::is_first_status = true |
Definition at line 109 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::less_sign |
Definition at line 290 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::lower_alpha |
Definition at line 218 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::lower_word |
Definition at line 297 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::name |
Definition at line 409 of file TPTPParser.cpp.
| bool tptp_parser::neg_lit |
Definition at line 153 of file TPTPParser.cpp.
| bool tptp_parser::negated_conjecture_exists = false |
Definition at line 129 of file TPTPParser.cpp.
| bool tptp_parser::negated_conjecture_found = false |
Definition at line 124 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::non_zero_numeric |
Definition at line 214 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::nonassoc_connective |
Definition at line 476 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::not_star_slash |
Definition at line 372 of file TPTPParser.cpp.
| qi::rule<Iter> tptp_parser::null |
Definition at line 344 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::number |
Definition at line 393 of file TPTPParser.cpp.
| size_t tptp_parser::number_of_negated_conjecture_clauses = 0 |
Definition at line 133 of file TPTPParser.cpp.
| size_t tptp_parser::number_of_simplified_negated_conjecture_clauses = 0 |
Definition at line 134 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::numeric |
Definition at line 216 of file TPTPParser.cpp.
| PredicateIndex* tptp_parser::p_index_p |
Definition at line 84 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::percentage_sign |
Definition at line 186 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::plus |
Definition at line 286 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::positive_decimal |
Definition at line 251 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::predicate |
Definition at line 401 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::printable_char |
Definition at line 229 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::proposition |
Definition at line 407 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::rational |
Definition at line 269 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::real |
Definition at line 275 of file TPTPParser.cpp.
| TPTPRecords* tptp_parser::records_p |
Definition at line 85 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::sign |
Definition at line 202 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::signed_exp_integer |
Definition at line 244 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::signed_integer |
Definition at line 261 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::signed_rational |
Definition at line 267 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::signed_real |
Definition at line 273 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::single_quote |
Definition at line 195 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::single_quoted |
Definition at line 337 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::slash |
Definition at line 237 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::slash_char |
Definition at line 208 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::slosh |
Definition at line 239 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::slosh_char |
Definition at line 210 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::sq_char |
Definition at line 197 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::standard_comment |
Definition at line 364 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::star |
Definition at line 284 of file TPTPParser.cpp.
| string tptp_parser::status |
Definition at line 110 of file TPTPParser.cpp.
| qi::rule<Iter, string(), ascii::space_type> tptp_parser::status_comment |
Definition at line 356 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::system_constant |
Definition at line 391 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::system_functor |
Definition at line 389 of file TPTPParser.cpp.
| TermIndex* tptp_parser::t_index_p |
Definition at line 83 of file TPTPParser.cpp.
| set<string> tptp_parser::to_include |
Definition at line 99 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::unary_connective |
Definition at line 488 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::unsigned_exp_integer |
Definition at line 242 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::unsigned_integer |
Definition at line 259 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::unsigned_rational |
Definition at line 265 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::unsigned_real |
Definition at line 271 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::upper_alpha |
Definition at line 220 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::upper_word |
Definition at line 318 of file TPTPParser.cpp.
| VariableIndex* tptp_parser::var_index_p |
Definition at line 81 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::variable |
Definition at line 321 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::viewable_char |
Definition at line 232 of file TPTPParser.cpp.
| qi::rule<Iter, string()> tptp_parser::vline |
Definition at line 282 of file TPTPParser.cpp.
| qi::rule<Iter, char()> tptp_parser::zero_numeric |
Definition at line 212 of file TPTPParser.cpp.