![]() |
Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
|
Representation of the lemma list. More...
#include <Lemmata.hpp>
Public Member Functions | |
Lemmata () | |
You should not need any more complicated constructor. | |
void | push_back (const Literal &) |
Self-explanatory. | |
void | clear () |
Self-explanatory. | |
void | find_all_lemmata (vector< InferenceItem > &, Clause &) |
Find all lemmata that are applicable, given a Clause. | |
void | find_initial_lemmata (vector< InferenceItem > &, Clause &) |
Find all lemmata that are applicable, but only for the initial Literal in a Clause. | |
string | to_string (bool=false) const |
Convert to a string. | |
string | make_LaTeX (bool=false) const |
Private Attributes | |
vector< Literal > | ls |
Lemmata list as appearing in the connection calculus. | |
size_t | len |
Friends | |
ostream & | operator<< (ostream &, const Lemmata &) |
Representation of the lemma list.
This is mostly straightforward is it is just a vector of Literals.
However it does have two critical methods: find_all_lemmata and find_initial_lemmata. You should probably read the documentation for these.
Definition at line 49 of file Lemmata.hpp.
|
inline |
You should not need any more complicated constructor.
Definition at line 60 of file Lemmata.hpp.
|
inline |
void Lemmata::find_all_lemmata | ( | vector< InferenceItem > & | inf, |
Clause & | c ) |
Find all lemmata that are applicable, given a Clause.
The connection calculus allows this, but there is a question of how you implement it. I suspect, but am not 100% certain, that leanCop only looks at the first Literal in the Clause, whereas this looks at all Literals in the Clause. For the (suspected) leanCop behavious use find_initial_lemmata.
In Connect++ the parameter params::all_lemmata controls this and is false by default.
inf | Reference to a vector of InferenceItem |
c | Reference to a Clause |
Definition at line 56 of file Lemmata.cpp.
void Lemmata::find_initial_lemmata | ( | vector< InferenceItem > & | inf, |
Clause & | c ) |
Find all lemmata that are applicable, but only for the initial Literal in a Clause.
See also the documentation for find_all_lemmata.
inf | Reference to a vector of InferenceItem |
c | Reference to a Clause |
Definition at line 33 of file Lemmata.cpp.
string Lemmata::make_LaTeX | ( | bool | subbed = false | ) | const |
Convert to a LaTeX representation.
subbed | Implement substitutions if true. |
Definition at line 94 of file Lemmata.cpp.
void Lemmata::push_back | ( | const Literal & | l | ) |
Self-explanatory.
l | Reference to Literal to add |
Definition at line 28 of file Lemmata.cpp.
string Lemmata::to_string | ( | bool | subbed = false | ) | const |
Convert to a string.
subbed | Implement substitutions if true. |
Definition at line 82 of file Lemmata.cpp.
|
friend |
Definition at line 105 of file Lemmata.cpp.
|
private |
Definition at line 55 of file Lemmata.hpp.
|
private |
Lemmata list as appearing in the connection calculus.
Definition at line 54 of file Lemmata.hpp.