25#include "SubstitutionStack.hpp"
30 for (SubPair& p : sub) {
31 stack.push_back(p.first);
41 stack.back()->remove_substitution();
47 out << st.
stack.size();
49 for (
size_t i = 0; i < st.
stack.size(); i++) {
56 out << st.
stack[i]->to_string() <<
" -> "
57 << st.
stack[i]->get_subbed_term() << endl;
General representation of a substitution.
As you build a proof you make substitutions that apply to the entire proof: if you backtrack during t...
void backtrack()
Remove variables from the stack, and remove substitutions as you go, as far back as the most recent b...
void push_all(Substitution &)
Take all the substitutions provided and add the corresponding variables to the stack.
vector< size_t > backtrack_points
Indexes on the stack that can be backtracked to.
vector< Variable * > stack
Stack of pointers to Variables that have been substituted.
size_t next_index
Self-explanatory.