![]() |
Connect++ 0.6.1
A fast, readable connection prover for first-order logic.
|
Stack items: each contains its own material for generating possible next inferences. More...
#include <StackItem.hpp>
Public Member Functions | |
StackItem (StackItemType sit, const Clause &_c, const SimplePath &_p, const Lemmata &_l, uint32_t _d) | |
void | set_this_action (const InferenceItem &inf_i) |
Basic set method. | |
void | set_bt_restriction_index (size_t i) |
Basic set method. | |
void | stack_item_setup () |
Basic setup collected in a method to avoid repeating it in the various constructors. | |
void | initialize (Matrix &) |
Call this after the constructor but before you want to use the enumeration of possible actions. | |
InferenceItem | next_lemma () |
Generate the next lemma. | |
InferenceItem | next_reduction (Unifier &) |
Find the next possible reduction or indicate there is none. The state of the object keeps track of where we are. | |
InferenceItem | next_extension (Matrix &, Unifier &) |
Find the next possible extension or indicate there is none. The state of the object keeps track of where we are. | |
void | restrict_backtrack () |
Adjust the collection of actions to limit backtracking. | |
InferenceItem | get_next_inference (Matrix &, Unifier &) |
Get the next inference to try. | |
string | to_string_unsubbed () const |
Make a string representation. | |
Public Attributes | |
StackItemType | item_type |
What type of StackItem is this? | |
Clause | c |
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the clause. | |
Literal | lit |
First literal of clause c. | |
Literal | neg_lit |
Negation of lit. | |
SimplePath | p |
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the path. | |
size_t | path_length |
Length of current path. | |
Lemmata | l |
Each node in the proof tree is a tuple of clause, matrix, path, lemmas: this is the lemmas. | |
size_t | lemma_size |
Length of current lemmas. | |
Substitution | sub |
Some nodes in the proof tree have an associated substitution. | |
uint32_t | depth |
How deep in the proof tree are we? | |
InferenceItem | this_action |
Action that got you to this clause, path etc. | |
size_t | bt_restriction_index |
Pointer that allows a right branch to know where to delete alternatives for restricted backtracking. | |
size_t | lemma_current_lemma_index |
Which possible lemma will we consider next? | |
bool | lemma_backtrack_restricted |
Setting this to true stops any further possibilities from being generated. | |
bool | lemma_no_more_results |
Make it easy to know when there are no more possibilities. | |
size_t | reduction_current_path_index |
Which possible reduction will we consider next? | |
bool | reduction_backtrack_restricted |
Setting this to true stops any further possibilities from being generated. | |
bool | reduction_no_more_results |
Make it easy to know when there are no more possibilities. | |
size_t | extension_i |
Index computed for neg_lit telling us where to find the information we need in the matrix index. | |
size_t | extension_current_index_entry |
Which possible extension will we consider next? | |
bool | extension_backtrack_restricted |
Setting this to true stops any further possibilities from being generated. | |
bool | extension_no_more_results |
Make it easy to know when there are no more possibilities. | |
Stack items: each contains its own material for generating possible next inferences.
Note: this is really performance critical.
Definition at line 54 of file StackItem.hpp.
|
inline |
Definition at line 168 of file StackItem.hpp.
|
inline |
Definition at line 170 of file StackItem.hpp.
InferenceItem StackItem::get_next_inference | ( | Matrix & | _m, |
Unifier & | _u ) |
Get the next inference to try.
Definition at line 159 of file StackItem.cpp.
void StackItem::initialize | ( | Matrix & | _m | ) |
Call this after the constructor but before you want to use the enumeration of possible actions.
Definition at line 138 of file StackItem.cpp.
InferenceItem StackItem::next_extension | ( | Matrix & | _m, |
Unifier & | _u ) |
Find the next possible extension or indicate there is none. The state of the object keeps track of where we are.
Definition at line 112 of file StackItem.cpp.
InferenceItem StackItem::next_lemma | ( | ) |
Generate the next lemma.
This is slightly different to the others as you only ever need one.
Definition at line 70 of file StackItem.cpp.
InferenceItem StackItem::next_reduction | ( | Unifier & | _u | ) |
Find the next possible reduction or indicate there is none. The state of the object keeps track of where we are.
Definition at line 87 of file StackItem.cpp.
void StackItem::restrict_backtrack | ( | ) |
Adjust the collection of actions to limit backtracking.
Of course, you might want to modify how this works if you want to do something more sophisticated. At present you have the leanCop style.
Definition at line 150 of file StackItem.cpp.
|
inline |
Basic set method.
Definition at line 195 of file StackItem.hpp.
|
inline |
void StackItem::stack_item_setup | ( | ) |
Basic setup collected in a method to avoid repeating it in the various constructors.
Definition at line 51 of file StackItem.cpp.
string StackItem::to_string_unsubbed | ( | ) | const |
Make a string representation.
Definition at line 182 of file StackItem.cpp.
size_t StackItem::bt_restriction_index |
Pointer that allows a right branch to know where to delete alternatives for restricted backtracking.
DO NOT try to do this by storing a pointer to the StackItem. As the vector can have its storage reallocated in the background, you end up with all manner of segfaultyness.
Definition at line 111 of file StackItem.hpp.
Clause StackItem::c |
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the clause.
Definition at line 63 of file StackItem.hpp.
uint32_t StackItem::depth |
How deep in the proof tree are we?
Definition at line 98 of file StackItem.hpp.
bool StackItem::extension_backtrack_restricted |
Setting this to true stops any further possibilities from being generated.
Definition at line 160 of file StackItem.hpp.
size_t StackItem::extension_current_index_entry |
Which possible extension will we consider next?
Definition at line 155 of file StackItem.hpp.
size_t StackItem::extension_i |
Index computed for neg_lit telling us where to find the information we need in the matrix index.
Definition at line 151 of file StackItem.hpp.
bool StackItem::extension_no_more_results |
Make it easy to know when there are no more possibilities.
Definition at line 164 of file StackItem.hpp.
StackItemType StackItem::item_type |
What type of StackItem is this?
Definition at line 58 of file StackItem.hpp.
Lemmata StackItem::l |
Each node in the proof tree is a tuple of clause, matrix, path, lemmas: this is the lemmas.
Definition at line 85 of file StackItem.hpp.
bool StackItem::lemma_backtrack_restricted |
Setting this to true stops any further possibilities from being generated.
Definition at line 123 of file StackItem.hpp.
size_t StackItem::lemma_current_lemma_index |
Which possible lemma will we consider next?
Definition at line 118 of file StackItem.hpp.
bool StackItem::lemma_no_more_results |
Make it easy to know when there are no more possibilities.
Definition at line 127 of file StackItem.hpp.
size_t StackItem::lemma_size |
Length of current lemmas.
Definition at line 89 of file StackItem.hpp.
Literal StackItem::lit |
First literal of clause c.
Definition at line 67 of file StackItem.hpp.
Literal StackItem::neg_lit |
Negation of lit.
Definition at line 71 of file StackItem.hpp.
SimplePath StackItem::p |
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the path.
Definition at line 76 of file StackItem.hpp.
size_t StackItem::path_length |
Length of current path.
Definition at line 80 of file StackItem.hpp.
bool StackItem::reduction_backtrack_restricted |
Setting this to true stops any further possibilities from being generated.
Definition at line 139 of file StackItem.hpp.
size_t StackItem::reduction_current_path_index |
Which possible reduction will we consider next?
Definition at line 134 of file StackItem.hpp.
bool StackItem::reduction_no_more_results |
Make it easy to know when there are no more possibilities.
Definition at line 143 of file StackItem.hpp.
Substitution StackItem::sub |
Some nodes in the proof tree have an associated substitution.
Definition at line 94 of file StackItem.hpp.
InferenceItem StackItem::this_action |
Action that got you to this clause, path etc.
Definition at line 102 of file StackItem.hpp.