25#ifndef TABLEAUPROOF_HPP
26#define TABLEAUPROOF_HPP
30#include<unordered_set>
34#include "SimplePath.hpp"
37using std::unordered_set;
38using std::filesystem::path;
40using PathPair = pair<size_t, size_t>;
45enum class TableauNodeType {
46 Start, Extension, Connection, Reduction, Lemma, LemmaExtension, False
137 vector<TableauProofNode*> lemma_list_p;
160 : type(TableauNodeType::False)
190 type = TableauNodeType::Connection;
198 type = TableauNodeType::Start;
207 type = TableauNodeType::Extension;
221 string path_to_tptp_string();
222 string parent_to_tptp_string();
223 string make_path_string();
224 string lemmas_to_string();
255 vector<size_t> right_stack;
268 pair<string, string> lit_t_l_to_Graphviz(
TableauProofNode*,
const string&)
const;
274 , matrix_p(_matrix_p)
280 , current_node(nullptr)
284 stack_size = _stack_p->
size();
290 return tableau_to_tptp_string(root);
292 string make_LaTeX()
const;
293 string make_Graphviz(
const path&)
const;
294 void show_clauses_used_in_proof() {
300 cout << result << endl;
302 unordered_set<string> get_clauses_used_in_proof()
const {
Representation of clauses.
Basic representation of literals, bundling together (pointers to) a Predicate, a collection of argume...
Representation of the Matrix within a proof.
If you implement the stacks used by the prover as a vector<StackItem> then every time you move down t...
size_t size() const
Exact analogue of the same function for vector<>.
General representation of a substitution.
Class for representing a tableau proof in a format that allows extraction of TPTP-format proofs,...
unordered_set< string > clauses_used_in_proof
When you produce the proof you want to know which clauses were actually used so that you can limit th...
Class for representing nodes in a tableau proof.
bool needs_lemma_link
Used in producing LaTex output to indicate that a link has to be added.
size_t matrix_id
Some nodes need to produce output referring to a clause in the matrix.
TableauProofNode(Literal &_lit)
Nearly all the work here is done by constructors.
Clause c_output
A node is associated with a clause.
Substitution sub
Substitution associated with reduction, extension or lemma.
LitNum l
A node in the tableau is identified by ‘t : l’.
~TableauProofNode()
Usual destructor for this sort of thing. Remember to delete what needs deleting.
ClauseNum t_child
Nodes maintain the t value for children.
PathPair reduction_node
Which node is associated with this one?
TableauProofNode(Clause &_c, Literal &_lit)
Nearly all the work here is done by constructors.
ClauseNum t
A node in the tableau is identified by ‘t : l’.
vector< Literal > path
Paths are stored both as collections of literals and collections of t:l pairs. Both are needed for co...
TableauProofNode()
Basic constructor.
vector< size_t > lemma_list
Lemma lists are kept as both numbers and pointer to other nodes. Both are needed.
bool lemma_is_used
Used in producing LaTeX output so that only used lemmas are displayed.
vector< TableauProofNode * > children
Children of this node.
vector< PathPair > p
Paths are stored both as collections of literals and collections of t:l pairs. Both are needed for co...
bool needs_reduction_link
Used in producing LaTex output to indicate that a link has to be added.
TableauProofNode * lemma
Lemma associated with a reduction or extension.
Literal lit
Literal associated with the node.
LitNum l_child
Nodes maintain the l value for children.
size_t depth
Where are we in the tree? Used for backtracking.
TableauProofNode(Clause &_c)
Nearly all the work here is done by constructors.
size_t lemma_reduction_node
Which node is associated with this one?
size_t lemma_number
Numerical identifier for a lemma.
Clause c_remaining
Starts equal to c. At each step in constructing the tableau a single literal is dealt with in a child...
Look after terms, using hash consing to avoid storing copies of terms.
Storage of named variables, and management of new, anonymous and unique variables.