36#include "InferenceItem.hpp"
48using std::filesystem::path;
56using MatrixPairType = pair<ClauseNum, LitNum>;
75 vector<Clause> clauses;
81 vector<bool> positive_clauses;
87 vector<bool> negative_clauses;
93 vector<string> clause_roles;
103 vector<Clause> clauses_copy;
108 vector<string> roles_copy;
120 vector<vector<MatrixPairType>> index;
140 void find_extensions(
Unifier&, vector<InferenceItem>&,
const Literal&,
145 void make_clauses_copy() {
146 clauses_copy.clear();
147 clauses_copy = clauses;
149 roles_copy = clause_roles;
292 vector<Clause>::const_iterator cbegin()
const {
return clauses.cbegin(); }
293 vector<Clause>::const_iterator cend()
const {
return clauses.cend(); }
294 vector<Clause>::iterator begin() {
return clauses.begin(); }
295 vector<Clause>::iterator end() {
return clauses.end(); }
315 friend ostream& operator<<(ostream&,
const Matrix&);
Representation of clauses.
Definition Clause.hpp:50
Basic representation of literals, bundling together (pointers to) a Predicate, a collection of argume...
Definition Literal.hpp:50
Representation of the Matrix within a proof.
Definition Matrix.hpp:70
string to_string() const
Make a string representation.
Definition Matrix.cpp:201
void deterministic_reorder(size_t)
Deterministic reorder of the clauses.
Definition Matrix.cpp:103
void move_equals_to_start()
Self-explanatory.
Definition Matrix.cpp:134
ClauseNum get_num_clauses() const
Straightforward get method.
Definition Matrix.hpp:185
string make_LaTeX(bool=false) const
Make a usable LaTeX representation.
Definition Matrix.cpp:224
Matrix()
Use this constructor if you really want an empty Matrix.
Definition Matrix.hpp:156
void add_clause(Clause &, string="")
Add a Clause to the Matrix and update the index accordingly.
Definition Matrix.cpp:89
bool is_negative(size_t i) const
Is a particular Clause negative?.
Definition Matrix.hpp:205
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.
Definition Matrix.cpp:179
void find_all_extensions(Unifier &, vector< InferenceItem > &, Clause &, VariableIndex &, TermIndex &)
Find all possible extensions given a Clause, considering all Literals in the Clause.
Definition Matrix.cpp:189
bool is_conjecture(size_t i) const
Is a particular Clause a conjecture?
Definition Matrix.cpp:44
void write_to_prolog_file(const path &) const
Write to a file that can be read by Prolog.
Definition Matrix.cpp:237
void set_num_equals(uint32_t n)
Straightforward set method.
Definition Matrix.hpp:217
const Clause & operator[](size_t i) const
Straightforward get method.
Definition Matrix.hpp:193
Matrix(const Matrix &)=delete
You're never going to need to copy a Matrix.
bool is_positive(size_t i) const
Is a particular Clause positive?.
Definition Matrix.hpp:199
void set_num_preds(size_t)
Make an empty index.
Definition Matrix.cpp:40
pair< bool, size_t > find_start() const
Use a simple heuristic to find a good start clause.
Definition Matrix.cpp:49
Look after terms, (ideally) using hash consing to avoid storing copies of terms.
Definition TermIndex.hpp:75
Wrap up various applications of unificiation into a single class: all the unification you need to do ...
Definition Unifier.hpp:83
Storage of named variables, and management of new, anonymous variables.
Definition VariableIndex.hpp:61