25#include "ClauseCopyCache.hpp"
37 _clause = (
cache[_index])[n];
41 cache[_index].push_back(_clause);
45 stack.push_back(_index);
49 size_t i =
stack.back();
55 cache = vector<vector<Clause>>(
size, vector<Clause>());
void set_size(size_t)
You probably don't know the size at the point when this needs to be constructed.
vector< vector< Clause > > cache
Cache containing some number of copies (with unique variables, not used anywhere else) of clauses fro...
vector< size_t > stack
Each time you supply a copy, remember the action so that you can backtrack.
void clear()
We will sometimes need to clear the cache and start again because of reordering operations on the mat...
void make_copy_with_new_variables(size_t, Clause &, VariableIndex &, TermIndex &)
If there is a copy cached, replace the parameter with it. Otherwise, use the parameter to actually ma...
void backtrack()
Backtracking is just looking at the last copy supplied and undoing that action.
vector< size_t > current_copy_number
When 0, there are no copies available. When 1, the last copy we used is the one at index 0,...
vector< size_t > number_of_copies_available
How many copies of each clause, in total, are currently available? At any given time some may be avai...
size_t size
Keep track of how many clauses there are in the matrix.
Representation of clauses.
Look after terms, using hash consing to avoid storing copies of terms.
Storage of named variables, and management of new, anonymous and unique variables.