|
Connect++ 0.1
A fast, readable connection prover for first-order logic.
|
General representation of a substitution. More...
#include <Substitution.hpp>
Public Member Functions | |
| Substitution () | |
| Trivial constructor. | |
| size_t | size () const |
| Trivial get method. | |
| void | push_back (Variable *, Term *) |
| Add a pair to a substitution. | |
| void | clear () |
| Clear a substitution. | |
| void | apply () const |
| Apply a substitution everywhere. | |
| void | backtrack () const |
| Remove a substitution everywhere. | |
| string | to_string (bool=false) const |
| Make a string representation. | |
| string | make_LaTeX (bool=false) const |
| Make a useable LaTeX representation. | |
| vector< SubPair >::iterator | begin () |
| Iteration is just iteration over the vector of pairs. | |
| vector< SubPair >::iterator | end () |
| Iteration is just iteration over the vector of pairs. | |
| vector< SubPair >::const_iterator | cbegin () |
| Iteration is just iteration over the vector of pairs. | |
| vector< SubPair >::const_iterator | cend () |
| Iteration is just iteration over the vector of pairs. | |
Friends | |
| ostream & | operator<< (ostream &, const Substitution &) |
General representation of a substitution.
This is just a vector of individual substitutions, each a pair of pointers, one to the Variable and one to the Term.
Only very minimal methods are needed, essentially for applying and removing the substitutions.
| void Substitution::apply | ( | ) | const |
Apply a substitution everywhere.
Because of the way terms are represented this is easy, and involves updating a single pointer for each variable.
| void Substitution::backtrack | ( | ) | const |
Remove a substitution everywhere.
Because of the way terms are represented this is easy, and involves updating a single pointer for each variable.
| string Substitution::make_LaTeX | ( | bool | subbed = false | ) | const |
Make a useable LaTeX representation.
Assumes you're in Math Mode.
| subbed | Implement substitutions if true. |
| string Substitution::to_string | ( | bool | subbed = false | ) | const |
Make a string representation.
| subbed | Implement substitutions if true. |