![]() |
Connect++ 0.7.0
A fast, readable connection prover for first-order logic.
|
Class for rendering a proof in various formats. More...
#include <ProofPrinter.hpp>

Public Member Functions | |
| ProofPrinter () | |
| Basic constructor. | |
| ProofPrinter (Stack *_p) | |
| The constructor you want. | |
| void | set_proof (Stack *_p) |
| Basic set method. | |
| void | clear () |
| Basic set method. | |
| void | make_LaTeX (const path &, const path &, const string &) |
| Convert to LaTeX and store in the specified file. | |
| void | make_LaTeX_connection_tableau (const path &, const path &, const string &, Matrix *, VariableIndex *, TermIndex *) |
| Convert to LaTeX in the connection tableau calculus and store in the specified file. | |
| void | make_graphviz_connection_tableau (const path &, const path &, Matrix *, VariableIndex *, TermIndex *) |
| Convert to LaTeX in the connection tableau calculus and store in the specified file. | |
| void | make_Prolog (const path &) |
| Convert to a form suitable for use by the Prolog proof checker and write to a file. | |
| void | show_Prolog () |
| Show the proof in Prolog format. | |
| pair< string, unordered_set< string > > | make_tptp (Matrix *, VariableIndex *, TermIndex *) |
| Show the proof in a TPTP-friendly format. | |
| vector< pair< string, vector< size_t > > > | make_internal () const |
| Make a simple data structure representing the proof stack. | |
Private Member Functions | |
| string | make_LaTeX_state (StackItem *) const |
| Helper for producing LaTeX output. | |
| string | make_LaTeX_subtree (StackItem *) const |
| Helper for producing LaTeX output. | |
| string | make_LaTeX_start (const path &, const path &, const string &) const |
| The beginning and end of output LaTeX files are the same for all formats. | |
| string | make_LaTeX_end () const |
| The beginning and end of output LaTeX files are the same for all formats. | |
Private Attributes | |
| Stack * | p |
| Pointer to the output of StackProver. | |
Class for rendering a proof in various formats.
A proof is supplied as a stack of StackItem produced by StackProver.
At present, this class will render a proof as LaTeX, or in a Prolog-readable certificate format that can be passed through the Connect++ certificate checker.
It will be extended later if a standard format for connection calculus proof certificates is agreed – this discussion is ongoing.
Definition at line 62 of file ProofPrinter.hpp.
|
inline |
|
inline |
The constructor you want.
| _p | Pointer to the output of StackProver. |
Definition at line 109 of file ProofPrinter.hpp.
|
inline |
| void ProofPrinter::make_graphviz_connection_tableau | ( | const path & | path_to_file, |
| const path & | problem_path, | ||
| Matrix * | _m_p, | ||
| VariableIndex * | _vi, | ||
| TermIndex * | _ti ) |
Convert to LaTeX in the connection tableau calculus and store in the specified file.
| path_to_file | Path of file to store to |
Definition at line 223 of file ProofPrinter.cpp.
| vector< pair< string, vector< size_t > > > ProofPrinter::make_internal | ( | ) | const |
Make a simple data structure representing the proof stack.
The first part each element of the output is a string naming the proof rules. The second contains the associated numbers.
Definition at line 365 of file ProofPrinter.cpp.
| void ProofPrinter::make_LaTeX | ( | const path & | path_to_file, |
| const path & | path_to_input_file, | ||
| const string & | matrix_as_latex ) |
Convert to LaTeX and store in the specified file.
| path_to_file | Path of file to store to |
| path_to_input_file | File for the problem being solved |
| matrix_as_latex | LaTeX formatted matrix |
Definition at line 161 of file ProofPrinter.cpp.
| void ProofPrinter::make_LaTeX_connection_tableau | ( | const path & | path_to_file, |
| const path & | path_to_input_file, | ||
| const string & | matrix_as_latex, | ||
| Matrix * | _m_p, | ||
| VariableIndex * | _vi, | ||
| TermIndex * | _ti ) |
Convert to LaTeX in the connection tableau calculus and store in the specified file.
| path_to_file | Path of file to store to |
| path_to_input_file | File for the problem being solved |
| matrix_as_latex | LaTeX formatted matrix |
Definition at line 193 of file ProofPrinter.cpp.
|
private |
The beginning and end of output LaTeX files are the same for all formats.
Definition at line 152 of file ProofPrinter.cpp.
|
private |
The beginning and end of output LaTeX files are the same for all formats.
Definition at line 118 of file ProofPrinter.cpp.
|
private |
Helper for producing LaTeX output.
Make a string with the LaTeX reprresentation of the clause, path and lemmata list.
| item_p | Pointer to StackItem to render |
Definition at line 40 of file ProofPrinter.cpp.
|
private |
Helper for producing LaTeX output.
A bit tricky. This should produce \prf???{axioms1}{axioms2} with the {conclusion} being added by the caller. The exception is right branches, which can include the conclusion themselves.
| item_p | Pointer to StackItem to render |
Definition at line 52 of file ProofPrinter.cpp.
| void ProofPrinter::make_Prolog | ( | const path & | path_to_file | ) |
Convert to a form suitable for use by the Prolog proof checker and write to a file.
| path_to_file | Path for output file |
Definition at line 241 of file ProofPrinter.cpp.
| pair< string, unordered_set< string > > ProofPrinter::make_tptp | ( | Matrix * | _m_p, |
| VariableIndex * | _vi, | ||
| TermIndex * | _ti ) |
Show the proof in a TPTP-friendly format.
Definition at line 357 of file ProofPrinter.cpp.
|
inline |
Basic set method.
| _p | Pointer to the output of StackProver. |
Definition at line 115 of file ProofPrinter.hpp.
| void ProofPrinter::show_Prolog | ( | ) |
Show the proof in Prolog format.
Definition at line 300 of file ProofPrinter.cpp.
|
private |
Pointer to the output of StackProver.
Definition at line 67 of file ProofPrinter.hpp.