Connect++ 0.1
A fast, readable connection prover for first-order logic.
|
Basic representation of functions. More...
#include <Function.hpp>
Public Member Functions | |
Function (const Function &)=delete | |
You want to inforce sharing, so don't allow copies to be made. | |
Function (const Function &&)=delete | |
Function & | operator= (const Function &)=delete |
Function & | operator= (const Function &&)=delete |
string | get_name () const |
Most basic access function. | |
Arity | get_arity () const |
Most basic access function. | |
string | to_string () const |
make a useable string representation. | |
string | make_LaTeX () const |
Make a useable LaTeX version. | |
Friends | |
class | FunctionIndex |
ostream & | operator<< (ostream &, const Function &) |
Really only for debugging. | |
Basic representation of functions.
As with Variables, these are ultimately wrapped in a Term. These are also ultimately looked after by a FunctionIndex (which is a friend), so there should not be any need to mess with them directly. (This is why the constructors are private.)
Note that this is somewhat simpler than Variable because you are not dealing with substitutions: you only need id, name and arity.
|
delete |
You want to inforce sharing, so don't allow copies to be made.
It should never be necessary to make copies, so this is to help the compiler to detect errors.
string Function::make_LaTeX | ( | ) | const |
Make a useable LaTeX version.
Assumes you are typesetting in Math Mode. Makes a limited attempt to deal with special characters in the function name, but if your name is too fancy it's likely to produce something either ugly or unacceptable to LaTeX.
|
friend |
Really only for debugging.
Use Function::to_string if you want something pretty.