当前位置: 首页>>代码示例>>C++>>正文


C++ SymbolicVal::GetValType方法代码示例

本文整理汇总了C++中SymbolicVal::GetValType方法的典型用法代码示例。如果您正苦于以下问题:C++ SymbolicVal::GetValType方法的具体用法?C++ SymbolicVal::GetValType怎么用?C++ SymbolicVal::GetValType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SymbolicVal的用法示例。


在下文中一共展示了SymbolicVal::GetValType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: VisitFunction

 void VisitFunction( const SymbolicFunction &v)
 {
     if (target.GetValType() == VAL_FUNCTION && cur == target)
         result = true;
     else {
         for (SymbolicFunction::const_iterator p = v.args_begin();
                 p != v.args_end(); ++p) {
             SymbolicVal tmp = *p;
             cur = tmp;
             cur.Visit(this);
             if ( result)
                 break;
         }
     }
 }
开发者ID:alexjohn1362,项目名称:rose,代码行数:15,代码来源:SymbolicFind.C

示例2: VisitExpr

 void VisitExpr( const SymbolicExpr &v)
 {
     if (target.GetValType() == VAL_EXPR && cur == target)
         result = true;
     else {
         for (SymbolicExpr::OpdIterator iter = v.GetOpdIterator();
                 !iter.ReachEnd(); iter.Advance()) {
             SymbolicVal tmp = v.Term2Val(iter.Current());
             cur = tmp;
             cur.Visit(this);
             if (result)
                 break;
         }
     }
 }
开发者ID:alexjohn1362,项目名称:rose,代码行数:15,代码来源:SymbolicFind.C

示例3: if

 void Default0( const SymbolicVal &v1, const SymbolicVal &v2)
 {  
   Default1(v1,v2);
   if (DebugCompareVal())
       std::cerr << " in CompareOperator::Default \n";
   if (result == REL_UNKNOWN) {
     int tmp = comparetime;
     SymbolicVal diff = v1 - v2;
     comparetime = tmp;
     if (diff.GetValType() == VAL_CONST) {
        int diffval = atoi( diff.toString().c_str());
        if (diffval  < 0) 
            result = REL_LT;
        else if (diffval > 0)
            result = REL_GT;
        else 
            result = REL_EQ; 
    }
    else if (func != 0) {
       int tmp = comparetime;
       SymbolicBound b1 = GetValBound(v1,*func), b2 = GetValBound(v2,*func);
       comparetime = tmp;
       CompareRel ge1 = (b1.lb != v1)? CompareValHelp(b1.lb,v2,func) : REL_UNKNOWN;
       CompareRel le2 = (b2.ub != v2)? CompareValHelp(b2.ub,v1,func) : REL_UNKNOWN; 
       CompareRel le1 = (b1.ub != v1)? CompareValHelp(b1.ub,v2,func) : REL_UNKNOWN;
       CompareRel ge2 = (b2.lb != v2)? CompareValHelp(b2.lb,v1,func) : REL_UNKNOWN; 
       if (CountGT(ge1) || CountLT(le2))
            result = REL_GT; 
       else if (CountGE(ge1) || CountLE(le2))
            result = REL_GE; 
       else if (CountLT(le1) || CountGT(ge2))
            result = REL_LT; 
       else if (CountLE(le1) || CountGE(ge2))
            result = REL_LE; 
   }
  }
 }
开发者ID:billhoffman,项目名称:rose-develop,代码行数:37,代码来源:SymbolicOperator.C


注:本文中的SymbolicVal::GetValType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。