![]() |
Connect++ 0.4.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 (vector< StackItem > *_p) | |
The constructor yuo want. | |
void | set_proof (vector< StackItem > *_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_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. | |
void | show_tptp () |
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. | |
Private Attributes | |
vector< StackItem > * | 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 61 of file ProofPrinter.hpp.
|
inline |
Basic constructor.
Definition at line 92 of file ProofPrinter.hpp.
|
inline |
The constructor yuo want.
_p | Pointer to the output of StackProver. |
Definition at line 98 of file ProofPrinter.hpp.
|
inline |
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 360 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 116 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 189 of file ProofPrinter.cpp.
|
inline |
Basic set method.
_p | Pointer to the output of StackProver. |
Definition at line 104 of file ProofPrinter.hpp.
void ProofPrinter::show_Prolog | ( | ) |
Show the proof in Prolog format.
Definition at line 247 of file ProofPrinter.cpp.
void ProofPrinter::show_tptp | ( | ) |
Show the proof in a TPTP-friendly format.
Definition at line 303 of file ProofPrinter.cpp.
|
private |
Pointer to the output of StackProver.
Definition at line 66 of file ProofPrinter.hpp.