Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
Matrix Class Reference

Representation of the Matrix within a proof. More...

#include <Matrix.hpp>

Collaboration diagram for Matrix:

Public Member Functions

 Matrix ()
 Use this constructor if you really want an empty Matrix.
 
 Matrix (size_t)
 Use this constructor when you know how many predicates there are.
 
 Matrix (const Matrix &)=delete
 You're never going to need to copy a Matrix.
 
 Matrix (const Matrix &&)=delete
 
Matrixoperator= (const Matrix &)=delete
 
Matrixoperator= (const Matrix &&)=delete
 
ClauseNum get_num_clauses () const
 Straightforward get method.
 
const Clauseoperator[] (size_t i) const
 Straightforward get method.
 
bool is_positive (size_t i) const
 Is a particular Clause positive?.
 
bool is_negative (size_t i) const
 Is a particular Clause negative?.
 
bool is_conjecture (size_t i) const
 Is a particular Clause a conjecture?
 
void set_num_equals (uint32_t n)
 Straightforward set method.
 
pair< bool, size_t > find_start () const
 Use a simple heuristic to find a good start clause.
 
void set_num_preds (size_t)
 Make an empty index.
 
void add_clause (Clause &, string="")
 Add a Clause to the Matrix and update the index accordingly.
 
void find_limited_extensions (Unifier &, vector< InferenceItem > &, Clause &, VariableIndex &, TermIndex &)
 Find all possible extensions given a Clause, but only consider the first Literal in the Clause.
 
void find_all_extensions (Unifier &, vector< InferenceItem > &, Clause &, VariableIndex &, TermIndex &)
 Find all possible extensions given a Clause, considering all Literals in the Clause.
 
void deterministic_reorder (size_t)
 Deterministic reorder of the clauses.
 
void random_reorder ()
 Randomly reorder the matrix.
 
void random_reorder_literals ()
 Randomly reorder the literals in each clause in the matrix.
 
void move_equals_to_start ()
 Self-explanatory.
 
vector< Clause >::const_iterator cbegin () const
 
vector< Clause >::const_iterator cend () const
 
vector< Clause >::iterator begin ()
 
vector< Clause >::iterator end ()
 
string to_string () const
 Make a string representation.
 
string make_LaTeX (bool=false) const
 Make a usable LaTeX representation.
 
void write_to_prolog_file (const path &) const
 Write to a file that can be read by Prolog.
 
void show_tptp () const
 Output in TPTP compatible format.
 
void sort_clauses_by_increasing_size ()
 Self-explanatory.
 

Private Member Functions

void find_extensions (Unifier &, vector< InferenceItem > &, const Literal &, LitNum, VariableIndex &, TermIndex &)
 Find all possible extensions, given a Literal.
 
void make_clauses_copy ()
 Store a copy of the clauses.
 
template<class Comparison >
void sort_clauses (Comparison comparison)
 Template method for general sorting of clauses, which sorts roles at the same time.
 

Private Attributes

vector< Clauseclauses
 The Matrix itself is just a set of Clauses.
 
vector< bool > positive_clauses
 Keep track of which clauses are positive.
 
vector< bool > negative_clauses
 Keep track of which clauses are negative.
 
vector< string > clause_roles
 Keep track of which clauses are conjectures etc.
 
uint32_t num_equals
 You need to know how many equality axioms there are in case you want to move them around.
 
vector< Clauseclauses_copy
 It makes sense to keep a copy of the clauses if your schedule reorders multiple times.
 
vector< string > roles_copy
 It makes sense to keep a copy of the roles if your schedule reorders multiple times.
 
bool copy_saved
 Remember whether you've saved a copy.
 
vector< vector< MatrixPairType > > index
 We want to be able to quickly identify where in each clause a particular literal lives.
 

Static Private Attributes

static std::mt19937 d
 Randomness for random reordering.
 

Friends

ostream & operator<< (ostream &, const Matrix &)
 

Detailed Description

Representation of the Matrix within a proof.

The Matrix itself never actually changes. However we do want to be able to look things up quickly when finding possible extension steps, so we build an index to help with that.

This class is also the natural place to implement the finding of all extensions, and the start clause heuristics.

Definition at line 73 of file Matrix.hpp.

Constructor & Destructor Documentation

◆ Matrix() [1/3]

Matrix::Matrix ( )
inline

Use this constructor if you really want an empty Matrix.

Definition at line 198 of file Matrix.hpp.

199 : clauses()
200 , index()
203 , clause_roles()
204 , clauses_copy()
205 , roles_copy()
206 , copy_saved(false)
207 {}
vector< Clause > clauses
The Matrix itself is just a set of Clauses.
Definition Matrix.hpp:78
vector< string > clause_roles
Keep track of which clauses are conjectures etc.
Definition Matrix.hpp:96
vector< vector< MatrixPairType > > index
We want to be able to quickly identify where in each clause a particular literal lives.
Definition Matrix.hpp:123
bool copy_saved
Remember whether you've saved a copy.
Definition Matrix.hpp:115
vector< string > roles_copy
It makes sense to keep a copy of the roles if your schedule reorders multiple times.
Definition Matrix.hpp:111
vector< Clause > clauses_copy
It makes sense to keep a copy of the clauses if your schedule reorders multiple times.
Definition Matrix.hpp:106
vector< bool > negative_clauses
Keep track of which clauses are negative.
Definition Matrix.hpp:90
vector< bool > positive_clauses
Keep track of which clauses are positive.
Definition Matrix.hpp:84

◆ Matrix() [2/3]

Matrix::Matrix ( size_t num_predicates)

Use this constructor when you know how many predicates there are.

Parameters
num_predicatesNumber of predicates.

Definition at line 30 of file Matrix.cpp.

31: clauses()
32, index((num_predicates * 2), vector<MatrixPairType>())
36, num_equals(0)
38, roles_copy()
39, copy_saved(false)
40{}
uint32_t num_equals
You need to know how many equality axioms there are in case you want to move them around.
Definition Matrix.hpp:101

◆ Matrix() [3/3]

Matrix::Matrix ( const Matrix & )
delete

You're never going to need to copy a Matrix.

Let the compiler be your friend.

Member Function Documentation

◆ add_clause()

void Matrix::add_clause ( Clause & clause,
string role = "" )

Add a Clause to the Matrix and update the index accordingly.

Optionally add a clause role.

Parameters
clauseReference to the Clause.
roleA string denoting the role of the clause.

Definition at line 91 of file Matrix.cpp.

91 {
92 ClauseNum clause_number = clauses.size();
93 LitNum literal_number = 0;
94 for (size_t j = 0; j < clause.size(); j++) {
95 size_t i = clause[j].get_pred_as_index();
96 index[i].push_back(MatrixPairType(clause_number, literal_number));
97 literal_number++;
98 }
99 clauses.push_back(clause);
100 positive_clauses.push_back(clause.is_positive());
101 negative_clauses.push_back(clause.is_negative());
102 clause_roles.push_back(role);
103}
bool is_positive() const
A clause is positive if it has no negated literals.
Definition Clause.cpp:30
size_t size() const
Straightforward get method.
Definition Clause.hpp:78
bool is_negative() const
A clause is negative if it has only negated literals.
Definition Clause.cpp:42

◆ begin()

vector< Clause >::iterator Matrix::begin ( )
inline

Definition at line 345 of file Matrix.hpp.

345{ return clauses.begin(); }

◆ cbegin()

vector< Clause >::const_iterator Matrix::cbegin ( ) const
inline

Definition at line 343 of file Matrix.hpp.

343{ return clauses.cbegin(); }

◆ cend()

vector< Clause >::const_iterator Matrix::cend ( ) const
inline

Definition at line 344 of file Matrix.hpp.

344{ return clauses.cend(); }

◆ deterministic_reorder()

void Matrix::deterministic_reorder ( size_t n)

Deterministic reorder of the clauses.

Call the reorder algorithm the specified number of times. This assumes you have stored a copy of the original clauses.

Parameters
nNumber of times to call the reorder algorithm

Only store a copy of the clauses the first time you do this.

Definition at line 105 of file Matrix.cpp.

105 {
109 if (!copy_saved) {
110 copy_saved = true;
112 }
113 /*
114 * Find a suitably reordered set of indices.
115 */
116 vector<uint32_t> new_order;
117 size_t s = clauses.size();
118 for (size_t i = 0; i < s; i++)
119 new_order.push_back(i);
120 new_order = deterministic_reorder_n_times<uint32_t>(new_order, n);
121 /*
122 * Clear and rebuild as necessary.
123 */
124 clauses.clear();
125 positive_clauses.clear();
126 negative_clauses.clear();
127 clause_roles.clear();
128 size_t s2 = index.size();
129 index.clear();
130 index = vector<vector<MatrixPairType> >(s2, vector<MatrixPairType>());
131 for (size_t i = 0; i < s; i++) {
132 add_clause(clauses_copy[new_order[i]], roles_copy[new_order[i]]);
133 }
134}
void make_clauses_copy()
Store a copy of the clauses.
Definition Matrix.hpp:152
void add_clause(Clause &, string="")
Add a Clause to the Matrix and update the index accordingly.
Definition Matrix.cpp:91

◆ end()

vector< Clause >::iterator Matrix::end ( )
inline

Definition at line 346 of file Matrix.hpp.

346{ return clauses.end(); }

◆ find_all_extensions()

void Matrix::find_all_extensions ( Unifier & u,
vector< InferenceItem > & result,
Clause & c,
VariableIndex & var_index,
TermIndex & term_index )

Find all possible extensions given a Clause, considering all Literals in the Clause.

See the documentation for find_extensions, which does all the heavy lifting.

Parameters
uA reference to a Unifier function object.
resultA reference to a vector of InferenceItems. Start with this empty.
cThe Clause of interest.
var_indexA reference to the VariableIndex.
term_indexA reference to the TermIndex.

Definition at line 238 of file Matrix.cpp.

240 {
241 if (c.size() == 0) {
242 cerr << "You shouldn't be looking for extensions with an empty clause" << endl;
243 return;
244 }
245 for (size_t index = 0; index < c.size(); index++) {
246 find_extensions(u, result, c[index], index, var_index, term_index);
247 }
248}
void find_extensions(Unifier &, vector< InferenceItem > &, const Literal &, LitNum, VariableIndex &, TermIndex &)
Find all possible extensions, given a Literal.
Definition Matrix.cpp:207

◆ find_extensions()

void Matrix::find_extensions ( Unifier & u,
vector< InferenceItem > & result,
const Literal & lit,
LitNum ind,
VariableIndex & var_index,
TermIndex & term_index )
private

Find all possible extensions, given a Literal.

Essentially this involves finding all the Clauses in the Matrix containing a Literal complementary to the one of interest, and selecting each of those Literals that unifies with the one of interest. You can do this by traversing a single row of the index.

It's up to the caller to decide whether to clear the result.

Parameters
uReference to a Unifier function object.
resultReference to a vector of InferenceItems.
litReference to the Literal of interest.
indthe index (position) of the Literal in its Clause.
var_indexReference to the VariableIndex.
term_indexReference to the TermIndex.

Definition at line 207 of file Matrix.cpp.

209 {
210 Literal neg_lit(lit);
211 neg_lit.invert();
212 size_t i = neg_lit.get_pred_as_index();
213 for (const MatrixPairType& p : index[i]) {
214 ClauseNum c_num = p.first;
215 LitNum l_num = p.second;
216 var_index.add_backtrack_point();
217 Clause new_c = (clauses[c_num]).make_copy_with_new_vars(var_index, term_index);
218 UnificationOutcome outcome = u(neg_lit, new_c[l_num]);
219 if (outcome == UnificationOutcome::Succeed) {
220 result.push_back(InferenceItem(InferenceItemType::Extension, lit, ind,
221 c_num, l_num, u.get_substitution()));
222 }
223 var_index.backtrack();
224 u.backtrack();
225 }
226}
Representation of clauses.
Definition Clause.hpp:52
Basic representation of literals, bundling together (pointers to) a Predicate, a collection of argume...
Definition Literal.hpp:50
void backtrack()
Apply the backtracking process to the substitution that has been constructed.
Definition Unifier.cpp:134
Substitution get_substitution() const
Trivial get methods for the result.
Definition Unifier.hpp:116
void backtrack()
Backtrack to the last marker.
void add_backtrack_point()
Add a backtrack point.
Full representation of inferences, beyond just the name.

◆ find_limited_extensions()

void Matrix::find_limited_extensions ( Unifier & u,
vector< InferenceItem > & result,
Clause & c,
VariableIndex & var_index,
TermIndex & term_index )

Find all possible extensions given a Clause, but only consider the first Literal in the Clause.

See the documentation for find_extensions, which does all the heavy lifting.

Parameters
uA reference to a Unifier function object.
resultA reference to a vector of InferenceItems. Start with this empty.
cThe Clause of interest.
var_indexA reference to the VariableIndex.
term_indexA reference to the TermIndex.

Definition at line 228 of file Matrix.cpp.

230 {
231 if (c.size() == 0) {
232 cerr << "You shouldn't be looking for extensions with an empty clause" << endl;
233 return;
234 }
235 find_extensions(u, result, c[0], 0, var_index, term_index);
236}

◆ find_start()

pair< bool, size_t > Matrix::find_start ( ) const

Use a simple heuristic to find a good start clause.

Find a start clause that is positive/negative according to the –negative flag, and if possible also a conjecture clause. Also, indicate if there is no positive/negative clause, which means the problem is trivial.

Definition at line 51 of file Matrix.cpp.

51 {
52 bool found_positive = false;
53 bool found_negative = false;
54 size_t first_positive = 0;
55 size_t first_negative = 0;
56 bool found_candidate = false;
57 size_t candidate = 0;
58 size_t i = 0;
59 for (bool positive : positive_clauses) {
60 if (positive_clauses[i]) {
61 if (!found_positive) {
62 first_positive = i;
63 found_positive = true;
64 }
65 }
66 if (negative_clauses[i]) {
67 if (!found_negative) {
68 first_negative = i;
69 found_negative = true;
70 }
71 }
72 if (is_conjecture(i) && !found_candidate) {
73 if ((params::positive_representation && positive_clauses[i]) ||
74 (!params::positive_representation && negative_clauses[i])) {
75 found_candidate = true;
76 candidate = i;
77 }
78 }
79 i++;
80 }
81 if (!(found_positive && found_negative))
82 return pair<bool,size_t>(false, 0);
83 if (found_candidate)
84 return pair<bool, size_t>(true, candidate);
85 else if (params::positive_representation)
86 return pair<bool, size_t>(true, first_positive);
87 else
88 return pair<bool, size_t>(true, first_negative);
89}
bool is_conjecture(size_t i) const
Is a particular Clause a conjecture?
Definition Matrix.cpp:46

◆ get_num_clauses()

ClauseNum Matrix::get_num_clauses ( ) const
inline

Straightforward get method.

Definition at line 227 of file Matrix.hpp.

227{ return clauses.size(); }

◆ is_conjecture()

bool Matrix::is_conjecture ( size_t i) const

Is a particular Clause a conjecture?

Parameters
iIndex of Clause to check.

Definition at line 46 of file Matrix.cpp.

46 {
47 return clause_roles[i] == "negated_conjecture" ||
48 clause_roles[i] == "conjecture";
49}

◆ is_negative()

bool Matrix::is_negative ( size_t i) const
inline

Is a particular Clause negative?.

Parameters
iIndex of Clause to check.

Definition at line 247 of file Matrix.hpp.

247{ return negative_clauses[i]; }

◆ is_positive()

bool Matrix::is_positive ( size_t i) const
inline

Is a particular Clause positive?.

Parameters
iIndex of Clause to check.

Definition at line 241 of file Matrix.hpp.

241{ return positive_clauses[i]; }

◆ make_clauses_copy()

void Matrix::make_clauses_copy ( )
inlineprivate

Store a copy of the clauses.

Definition at line 152 of file Matrix.hpp.

152 {
153 clauses_copy.clear();
155 roles_copy.clear();
157 }

◆ make_LaTeX()

string Matrix::make_LaTeX ( bool subbed = false) const

Make a usable LaTeX representation.

Parameters
subbedImplement substitutions if true.

Definition at line 273 of file Matrix.cpp.

273 {
274 string s ("\\[\n\\begin{split}\n");
275 s += "\\textcolor{magenta}{M} = ";
276 for (const Clause& c : clauses) {
277 s += "&\\,";
278 s += c.make_LaTeX(subbed);
279 s += "\\\\";
280 }
281 s += "\n\\end{split}\n\\]\n";
282
283 return s;
284}

◆ move_equals_to_start()

void Matrix::move_equals_to_start ( )

Self-explanatory.

BUT only do this to the matrix built at the start of the process, as it assumes the equality axioms are at the end of the matrix.

Definition at line 183 of file Matrix.cpp.

183 {
184 if (num_equals == 0) {
185 cerr << "Why are you trying to move equality axioms - there aren't any?" << endl;
186 return;
187 }
189 clauses.clear();
190 positive_clauses.clear();
191 negative_clauses.clear();
192 clause_roles.clear();
193 size_t s2 = index.size();
194 index.clear();
195 index = vector<vector<MatrixPairType> >(s2, vector<MatrixPairType>());
196 size_t n_clauses = clauses_copy.size();
197 for (size_t i = n_clauses - num_equals; i < n_clauses; i++) {
199 }
200 for (size_t i = 0; i < n_clauses - num_equals; i++) {
202 }
203 clauses_copy.clear();
204 roles_copy.clear();
205}

◆ operator[]()

const Clause & Matrix::operator[] ( size_t i) const
inline

Straightforward get method.

Beware - the parameter is not checked, so behave!

Parameters
iIndex of item to get.

Definition at line 235 of file Matrix.hpp.

235{ return clauses[i]; }

◆ random_reorder()

void Matrix::random_reorder ( )

Randomly reorder the matrix.

Definition at line 136 of file Matrix.cpp.

136 {
137 vector<Clause> saved_clauses(clauses);
138 vector<string> saved_clause_roles(clause_roles);
139 /*
140 * Find a suitably reordered set of indices.
141 */
142 vector<uint32_t> new_order;
143 size_t s = clauses.size();
144 for (size_t i = 0; i < s; i++)
145 new_order.push_back(i);
146 std::shuffle(new_order.begin(), new_order.end(), d);
147 /*
148 * Clear and rebuild as necessary.
149 */
150 clauses.clear();
151 positive_clauses.clear();
152 negative_clauses.clear();
153 clause_roles.clear();
154 size_t s2 = index.size();
155 index.clear();
156 index = vector<vector<MatrixPairType> >(s2, vector<MatrixPairType>());
157 for (size_t i = 0; i < s; i++) {
158 add_clause(saved_clauses[new_order[i]], saved_clause_roles[new_order[i]]);
159 }
160}
static std::mt19937 d
Randomness for random reordering.
Definition Matrix.hpp:127

◆ random_reorder_literals()

void Matrix::random_reorder_literals ( )

Randomly reorder the literals in each clause in the matrix.

Definition at line 162 of file Matrix.cpp.

162 {
163 vector<Clause> saved_clauses(clauses);
164 vector<string> saved_clause_roles(clause_roles);
165 size_t s = clauses.size();
166 /*
167 * Clear and rebuild as necessary, reordering as you go.
168 */
169 clauses.clear();
170 positive_clauses.clear();
171 negative_clauses.clear();
172 clause_roles.clear();
173 size_t s2 = index.size();
174 index.clear();
175 index = vector<vector<MatrixPairType> >(s2, vector<MatrixPairType>());
176 for (size_t i = 0; i < s; i++) {
177 Clause c(saved_clauses[i]);
178 c.random_reorder();
179 add_clause(c, saved_clause_roles[i]);
180 }
181}

◆ set_num_equals()

void Matrix::set_num_equals ( uint32_t n)
inline

Straightforward set method.

Parameters
nNumber of equality axioms.

Definition at line 259 of file Matrix.hpp.

259{ num_equals = n; }

◆ set_num_preds()

void Matrix::set_num_preds ( size_t num_predicates)

Make an empty index.

Definition at line 42 of file Matrix.cpp.

42 {
43 index = vector<vector<MatrixPairType> >((num_predicates * 2), vector<MatrixPairType>());
44}

◆ show_tptp()

void Matrix::show_tptp ( ) const

Output in TPTP compatible format.

Definition at line 303 of file Matrix.cpp.

303 {
304 size_t matrix_i = 0;
305 for (const Clause& c : clauses) {
306 cout << "cnf(matrix-";
307 cout << std::to_string(matrix_i++);
308 cout << ", plain, ";
309 cout << c.to_tptp_string();
310 cout << ").";
311 cout << std::endl;
312 }
313}

◆ sort_clauses()

template<class Comparison >
void Matrix::sort_clauses ( Comparison comparison)
inlineprivate

Template method for general sorting of clauses, which sorts roles at the same time.

ClauseComparisons.hpp contains function objects that can be used with this to implement different orderings.

Definition at line 166 of file Matrix.hpp.

166 {
167 /*
168 * Combine the clauses with their roles.
169 */
170 vector<ClauseAndRole> cr;
171 size_t s = clauses.size();
172 for (size_t i = 0; i < s; i++) {
173 cr.push_back(ClauseAndRole(clauses[i], clause_roles[i]));
174 }
175 /*
176 * Sort them according to the relevant ordering.
177 */
178 std::sort(cr.begin(), cr.end(), comparison);
179 /*
180 * Split them again and re-build the index.
181 */
182 clauses.clear();
183 positive_clauses.clear();
184 negative_clauses.clear();
185 clause_roles.clear();
186 size_t s2 = index.size();
187 index.clear();
188 index = vector<vector<MatrixPairType> >(s2, vector<MatrixPairType>());
189 for (size_t i = 0; i < s; i++) {
190 add_clause(cr[i].first, cr[i].second);
191 }
192 }

◆ sort_clauses_by_increasing_size()

void Matrix::sort_clauses_by_increasing_size ( )
inline

Self-explanatory.

Inspired by "Machine Learning Guidance for Connection Tableaux," Farber et al. 2020 although with a different measure of size and happening at a different place.

Makes use of the sort_clauses template.

Definition at line 379 of file Matrix.hpp.

379 {
380 ClauseLengthCompare comparison;
381 sort_clauses<ClauseLengthCompare>(comparison);
382 }
Provide a function object to compare clauses by size.

◆ to_string()

string Matrix::to_string ( ) const

Make a string representation.

Definition at line 250 of file Matrix.cpp.

250 {
251 string result;
252 colour_string::ColourString cs(params::use_colours);
253 size_t i = 0;
254 for (const Clause& c : clauses) {
255 if (is_conjecture(i))
256 result += cs("*").orange();
257 else
258 result += " ";
259 if (positive_clauses[i])
260 result += cs("+").orange();
261 else if (negative_clauses[i])
262 result += cs("-").orange();
263 else
264 result += " ";
265 result += " ";
266 i++;
267 result += c.to_string();
268 result += "\n";
269 }
270 return result;
271}
Simple addition of colour to strings and ostreams.

◆ write_to_prolog_file()

void Matrix::write_to_prolog_file ( const path & path_to_file) const

Write to a file that can be read by Prolog.

This is for proof checking.

Parameters
path_to_fileReference to path object.

Definition at line 286 of file Matrix.cpp.

286 {
287 std::ofstream file(path_to_file);
288 size_t matrix_i = 0;
289 // Nasty hack needed to stop the proof checker from printing
290 // a bunch of warnings when reading the matrix.
291 file << ":- style_check(-singleton)." << std::endl;
292 for (const Clause& c : clauses) {
293 file << "matrix(";
294 file << std::to_string(matrix_i++);
295 file << ", ";
296 file << c.to_prolog_string();
297 file << ").";
298 file << std::endl;
299 }
300 file.close();
301}

Friends And Related Symbol Documentation

◆ operator<<

ostream & operator<< ( ostream & out,
const Matrix & m )
friend

Definition at line 315 of file Matrix.cpp.

315 {
316 out << "Clauses in matrix:" << endl;
317 out << "------------------" << endl;
318 size_t i = 0;
319 for (const Clause& c : m.clauses)
320 out << setw(params::output_width) << i++
321 << ": " << c << endl;
322 vector<string> index_lits(m.index.size(), string(""));
323 for (Clause c : m.clauses)
324 for (size_t i = 0; i < c.size(); i++)
325 index_lits[c[i].get_pred_as_index()] = c[i].get_small_lit();
326 i = 0;
327 out << endl << "Index: (Clause, Literal):" << endl;
328 out << "-------------------------" << endl;
329 for (vector<MatrixPairType> v : m.index) {
330 out << setw(params::output_width + 20) << index_lits[i++] << ": ";
331 for (MatrixPairType p : v) {
332 out << "(" << p.first << ", " << p.second << ") ";
333 }
334 out << endl;
335 }
336 return out;
337}
Structure containing all the command line and other options.

Member Data Documentation

◆ clause_roles

vector<string> Matrix::clause_roles
private

Keep track of which clauses are conjectures etc.

This allows start clause heuristics to be applied.

Definition at line 96 of file Matrix.hpp.

◆ clauses

vector<Clause> Matrix::clauses
private

The Matrix itself is just a set of Clauses.

Definition at line 78 of file Matrix.hpp.

◆ clauses_copy

vector<Clause> Matrix::clauses_copy
private

It makes sense to keep a copy of the clauses if your schedule reorders multiple times.

Definition at line 106 of file Matrix.hpp.

◆ copy_saved

bool Matrix::copy_saved
private

Remember whether you've saved a copy.

Definition at line 115 of file Matrix.hpp.

◆ d

std::mt19937 Matrix::d
staticprivate

Randomness for random reordering.

Definition at line 127 of file Matrix.hpp.

◆ index

vector<vector<MatrixPairType> > Matrix::index
private

We want to be able to quickly identify where in each clause a particular literal lives.

Store clause and position as pairs in a row corresponding to the literal.

Definition at line 123 of file Matrix.hpp.

◆ negative_clauses

vector<bool> Matrix::negative_clauses
private

Keep track of which clauses are negative.

This allows start clause heuristics to be applied.

Definition at line 90 of file Matrix.hpp.

◆ num_equals

uint32_t Matrix::num_equals
private

You need to know how many equality axioms there are in case you want to move them around.

Definition at line 101 of file Matrix.hpp.

◆ positive_clauses

vector<bool> Matrix::positive_clauses
private

Keep track of which clauses are positive.

This allows start clause heuristics to be applied.

Definition at line 84 of file Matrix.hpp.

◆ roles_copy

vector<string> Matrix::roles_copy
private

It makes sense to keep a copy of the roles if your schedule reorders multiple times.

Definition at line 111 of file Matrix.hpp.


The documentation for this class was generated from the following files: