25#include "SimplePath.hpp"
30, num_preds(num_predicates)
48 cerr <<
"Stop it - the path is empty!" << endl;
60 cerr <<
"Stop it - the path is empty!" << endl;
66 for (
size_t i = 0; i < c.
size(); i++)
67 if (lit.subbed_equal(&(c[i])))
78 vector<InferenceItem>& result,
85 if (!neg_lit.is_compatible_with(&lit2)) {
89 UnificationOutcome outcome = u(neg_lit, lit2);
90 if (outcome == UnificationOutcome::Succeed) {
103 vector<InferenceItem>& result,
109 cerr <<
"You shouldn't be looking for reductions with an empty clause" << endl;
116 vector<InferenceItem>& result,
122 cerr <<
"You shouldn't be looking for reductions with an empty clause" << endl;
125 for (
size_t index = 0; index < c.
size(); index++)
141 result += p.to_string(subbed);
149 string s (
"\\textcolor{green}{[ }");
152 s += p.make_LaTeX(subbed);
155 s +=
"\\textcolor{green}{]}";
159ostream& operator<<(ostream& out,
const SimplePath& p) {
160 out <<
"Path:" << endl;
161 out <<
"-----" << endl;
Representation of clauses.
size_t size() const
Straightforward get method.
Basic representation of literals, bundling together (pointers to) a Predicate, a collection of argume...
Simple representation of the path within a proof tree.
vector< Literal > path
Simple representation of a path as a vector of Literals.
string to_string(bool=false) const
Convert the path to a string.
void push(const Literal &)
Add a new Literal to the Path.
void show_path_only(ostream &)
Show just the path.
string make_LaTeX(bool=false) const
Convert the Path only to a LaTeX representation.
bool test_for_regularity(Clause &) const
Regularity test.
void find_limited_reductions(Unifier &, vector< InferenceItem > &, Clause &)
Given a Clause, find all possible reductions given the current Path, but only for the first Literal i...
void clear()
Revert to the empty state without changing num_preds.
SimplePath()
You should usually never need a more compilcated constructor.
void pop()
Remove the last item from the Path.
void find_reductions(Unifier &, vector< InferenceItem > &, const Literal &, LitNum)
Find the reductions that you can perform for a specified Literal.
Literal back() const
Get the last Literal in the Path. Non-destructive.
void find_all_reductions(Unifier &, vector< InferenceItem > &, Clause &)
Given a Clause, find all possible reductions given the current Path.
Wrap up various applications of unificiation into a single class: all the unification you need to do ...
void backtrack()
Apply the backtracking process to the substitution that has been constructed.
Substitution get_substitution() const
Trivial get methods for the result.
Simple function object for putting commas in lists.
Full representation of inferences, beyond just the name.