27#include "StackItem.hpp"
65 for (
size_t i = 0; i < old_capacity; i++) {
66 stack[i] = old_stack[i];
94 inline size_t size()
const {
102 extend(params::stack_increment);
138 extend(params::stack_increment);
165 extend(params::stack_increment);
178 friend ostream& operator<<(ostream&,
Stack&);
Representation of clauses.
Representation of the lemma list.
Simple representation of the path within a proof tree.
If you implement the stacks used by the prover as a vector<StackItem> then every time you move down t...
void emplace_back(StackItemType sit, const Clause &_c, const SimplePath &_p, const Lemmata &_l, const Substitution &_sub, uint32_t _d)
(Almost!) exact analogue of the same function for vector<>.
Stack()
The constructor is straightforward - just make some initial space in the vector.
size_t next_item_index
Keep track of where the next empty space is.
void emplace_back(StackItemType sit, const Clause &_c, const SimplePath &_p, const Lemmata &_l, uint32_t _d)
(Almost!) exact analogue of the same function for vector<>.
size_t size() const
Exact analogue of the same function for vector<>.
StackItem & operator[](size_t _i)
Exact analogue of the same function for vector<>.
StackItem * stack
The idea is to store the stack here, but to never actually remove anything from it,...
bool empty() const
Exact analogue of the same function for vector<>.
void push_back(const StackItem &_item)
Exact analogue of the same function for vector<>.
void extend(size_t _n)
Make extra space later if needed.
void clear()
Exact analogue of the same function for vector<>.
void pop_back()
Exact analogue of the same function for vector<>. BUT - importantly - avoid calling the StackItem des...
StackItem & back()
Exact analogue of the same function for vector<>.
size_t capacity
Keep track of how much space we have. If we need more then extend as needed.
General representation of a substitution.
void clear()
Clear a substitution.
Stack items: each contains its own material for generating possible next inferences.
SimplePath p
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the path.
Substitution sub
Some nodes in the proof tree have an associated substitution.
uint32_t depth
How deep in the proof tree are we?
size_t bt_restriction_index
Pointer that allows a right branch to know where to delete alternatives for restricted backtracking.
Lemmata l
Each node in the proof tree is a tuple of clause, matrix, path, lemmas: this is the lemmas.
Clause c
Each node in the proof tree is a tuple of clause, matrix, path, lemmata: this is the clause.
StackItemType item_type
What type of StackItem is this?
void stack_item_setup()
Basic setup collected in a method to avoid repeating it in the various constructors.
Structure containing all the command line and other options.