YAPApplTerm¶
A compound term, with functor and fixed number of arguments, also known as a function application.
Notice that lists and big numbers do not belong to this class.
Public Function:¶
1. YAPApplTerm::YAPApplTerm(Term t0): : There are very many ways to build one of these terms:
- engine representation to YAPApplTerm
1. YAPApplTerm::YAPApplTerm(Functor f, Term ts[]):
- this is the way the engine builds App, but in C you need to give the arity. Notice we build from the engine world.
1. YAPApplTerm::YAPApplTerm(YAPFunctor f, YAPTerm ts[]):
- similar to before, but wwe use objects. This is useful if we already got the objects.
1. YAPApplTerm::YAPApplTerm(const std::string s, std::vector< Term > ts): : not really needed, but we may not want to look inside the vector.
1. YAPApplTerm::YAPApplTerm(const std::string s, std::vector< YAPTerm > ts):
1. YAPApplTerm::YAPApplTerm(const std::string s, Term a1):
1. YAPApplTerm::YAPApplTerm(const std::string s, Term a1, Term a2):
1. YAPApplTerm::YAPApplTerm(const std::string s, Term a1, Term a2, Term a3):
1. YAPApplTerm::YAPApplTerm(const std::string s, unsigned int arity):
- build empty compound term, that is, all arguments are free variables.
1. YAPApplTerm::YAPApplTerm(YAPFunctor f):
1. Functor YAPApplTerm::functor(): : use the functor object. to construct a new object
1. YAPFunctor YAPApplTerm::getFunctor():
1. Term YAPApplTerm::getArg(arity_t i): : extract the argument i of the term, where i in 1...arity
1. void YAPApplTerm::putArg(int i, Term targ):
1. void YAPApplTerm::putArg(int i, YAPTerm t):
1. virtual bool YAPApplTerm::isVar(): : type check for unbound
1. virtual bool YAPApplTerm::isAtom(): : type check for unbound
1. virtual bool YAPApplTerm::isInteger(): : type check for atom
1. virtual bool YAPApplTerm::isFloat(): : type check for integer
1. virtual bool YAPApplTerm::isString(): : type check for floating-point
1. virtual bool YAPApplTerm::isCompound(): : type check for a string " ... "
1. virtual bool YAPApplTerm::isAppl(): : is a primitive term
1. virtual bool YAPApplTerm::isPair(): : is a structured term
1. virtual bool YAPApplTerm::isGround(): : is a pair term
1. virtual bool YAPApplTerm::isList(): : term is ground