30#include <unordered_map>
36#include "TermHash.hpp"
38using std::unordered_map;
86 unordered_map<Term, Term*, term_hash> index;
93 vector<Term*> term_pointers;
103 TermIndex() : index(), term_pointers() {}
121 size_t get_size()
const {
return term_pointers.size(); }
175 friend ostream& operator<<(ostream&,
const TermIndex&);
Basic representation of functions.
Definition Function.hpp:54
General representation of terms.
Definition Term.hpp:62
Look after terms, (ideally) using hash consing to avoid storing copies of terms.
Definition TermIndex.hpp:75
size_t get_size() const
Basic get method.
Definition TermIndex.hpp:121
Term * add_function_term(Function *, const vector< Term * > &)
Self-explanatory: add a Term containing a function to the index.
Definition TermIndex.cpp:73
Term * add_variable_term(Variable *)
Self-explanatory: add a Term containing a variable to the index.
Definition TermIndex.cpp:56
Term * replace_variable_in_term_with_term(Term *, Variable *, Term *)
Minor variation on replace_variable_in_term.
Definition TermIndex.cpp:114
Term * replace_variable_in_term(Variable *, Variable *, Term *)
Replace a variable in a term with an alternative, maintaining the structure of the TermIndex.
Definition TermIndex.cpp:93
TermIndex(const TermIndex &)=delete
Don't allow copying as this is a terrible idea.
Basic representation of variables.
Definition Variable.hpp:58