cloud9_root/src/third_party/stp/src/simplifier/simplifier.cpp
//this function assumes that the input is a vector of childnodes of
//a BVPLUS term. it combines like terms and returns a bvplus
//term. e.g. 1.x + 2.x is converted to 3.x
this function assumes that the input is a vector of childnodes of
a BVPLUS term. it combines like terms and returns a bvplus
term.
this function assumes that the input is a vector of childnodes of a BVPLUS term . it combines like terms and returns a bvplus term .
ASTNode
  Simplifier::CombineLikeTerms(const ASTNode& a)
  {
    if (BVPLUS != a.GetKind())
      return a;
    ASTNode output;
    if (CheckSimplifyMap(a, output, false))
      {
        return output;
      }
    return CombineLikeTerms(a.GetChildren());
  }
ASTNode Simplifier :: CombineLikeTerms ( const ASTNode & a ) { if ( BVPLUS != a . GetKind ( ) ) return a ; ASTNode output ; if ( CheckSimplifyMap ( a , output , false ) ) { return output ; } return CombineLikeTerms ( a . GetChildren ( ) ) ; }
this function assumes that the input is a vector of childnodes of
a BVPLUS term.
this function assumes that the input is a vector of childnodes of a BVPLUS term .
//check memo table //cerr << "output of SimplifyTerm Cache: " << output << endl;