Beispiel #1
0
  bool equalTo(const Term & t) const
  {
    if(t->getType() != TT_FUNCTION)
      return false;

    if(_f != ((FunctionTerm *) t.get())->getSymbol())
      return false;

    const vector<Term> & t_ops = ((FunctionTerm *) t.get())->getOperands();

    if(_ops.size() != t_ops.size())
      return false;

    for(unsigned i = 0; i < _ops.size(); i++)
      if(!_ops[i]->equalTo(t_ops[i]))
        return false;

    return true;
  }
Beispiel #2
0
  virtual bool equalTo(const Term & t) const{
     return t->getType() == TT_VARIABLE &&
            ((VariableTerm *) t.get())->getVariable() == _v;
 }