10#include <unordered_map>
12#include "TermHash.hpp"
14using std::unordered_map;
28 unordered_map<Term, Term*, term_hash> index;
29 vector<Term*> term_pointers;
41 size_t get_size()
const {
return term_pointers.size(); }
70 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, using hash consing to avoid storing copies of terms.
Definition TermIndex-hash.hpp:26
Term * add_function_term(Function *, const vector< Term * > &)
Self-explanatory: add a Term containing a function to the index.
Definition TermIndex-hash.cpp:28
Term * add_variable_term(Variable *)
Self-explanatory: add a Term containing a variable to the index.
Definition TermIndex-hash.cpp:13
Term * replace_variable_in_term_with_term(Term *, Variable *, Term *)
Minor variation on replace_variable_in_term.
Definition TermIndex-hash.cpp:67
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-hash.cpp:46
TermIndex(const TermIndex &)=delete
Don't allow copying as this is a terrible idea.
Basic representation of variables.
Definition Variable.hpp:58