Beispiel #1
0
YAPApplTerm::YAPApplTerm(const std::string f, YAPTerm a1, YAPTerm a2) {
  BACKUP_H();
  arity_t arity = 2;
  Functor ff = Yap_MkFunctor(Yap_LookupAtom(f.c_str()), arity);
  Term o = Yap_MkNewApplTerm(ff, arity);
  Term *tt = RepAppl(o) + 1;
  tt[0] = a1.term();
  tt[1] = a2.term();
  mk(o);
    RECOVER_H();
}
Beispiel #2
0
YAPPairTerm::YAPPairTerm(YAPTerm th, YAPTerm tl) : YAPTerm() {
  CACHE_REGS
    BACKUP_H();
  mk ( MkPairTerm( th.term(), tl.term() ) );
  RECOVER_H();
}