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


C++ TypeNode::isReal方法代码示例

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


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

示例1: hasNonArithmeticVariable

bool InstantiationEngine::hasNonArithmeticVariable( Node f ){
  for( int i=0; i<(int)f[0].getNumChildren(); i++ ){
    TypeNode tn = f[0][i].getType();
    if( !tn.isInteger() && !tn.isReal() ){
      return true;
    }
  }
  return false;
}
开发者ID:ahmedirfan1983,项目名称:CVC4,代码行数:9,代码来源:instantiation_engine.cpp

示例2: hasNonCbqiVariable

bool InstStrategyCbqi::hasNonCbqiVariable( Node q ){
  for( unsigned i=0; i<q[0].getNumChildren(); i++ ){
    TypeNode tn = q[0][i].getType();
    if( !tn.isInteger() && !tn.isReal() && !tn.isBoolean() ){
      if( options::cbqiSplx() ){
        return true;
      }else{
        //datatypes supported in new implementation
        if( !tn.isDatatype() ){
          return true;
        }
      }
    }
  }
  return false;
}
开发者ID:kyledewey,项目名称:CVC4,代码行数:16,代码来源:inst_strategy_cbqi.cpp

示例3: getFreeVariableForInstConstant

Node TermDb::getFreeVariableForInstConstant( Node n ){
  TypeNode tn = n.getType();
  if( d_free_vars.find( tn )==d_free_vars.end() ){
    //if integer or real, make zero
    if( tn.isInteger() || tn.isReal() ){
      Rational z(0);
      d_free_vars[tn] = NodeManager::currentNM()->mkConst( z );
    }else{
      if( d_type_map[ tn ].empty() ){
        d_free_vars[tn] = NodeManager::currentNM()->mkSkolem( "freevar_$$", tn, "is a free variable created by termdb" );
        Trace("mkVar") << "FreeVar:: Make variable " << d_free_vars[tn] << " : " << tn << std::endl;
      }else{
        d_free_vars[tn] = d_type_map[ tn ][ 0 ];
      }
    }
  }
  return d_free_vars[tn];
}
开发者ID:remccleeary,项目名称:CVC4,代码行数:18,代码来源:term_database.cpp

示例4: getOrderKind

Kind SymmetryBreaker::getOrderKind(Node node)
{
  TypeNode tn = node.getType();
  if (tn.isBoolean())
  {
    return IMPLIES;
  }
  else if (tn.isReal())
  {
    return LEQ;
  }
  else if (tn.isBitVector())
  {
    return BITVECTOR_ULE;
  }
  if (tn.isFirstClass())
  {
    return EQUAL;
  }
  return UNDEFINED_KIND;
}
开发者ID:CVC4,项目名称:CVC4,代码行数:21,代码来源:symmetry_breaker.cpp

示例5: removeToFPGeneric

  Node removeToFPGeneric (TNode node) {
    Assert(node.getKind() == kind::FLOATINGPOINT_TO_FP_GENERIC);
    
    FloatingPointToFPGeneric info = node.getOperator().getConst<FloatingPointToFPGeneric>();
    
    size_t children = node.getNumChildren();
    
    Node op;
    
    if (children == 1) {
      op = NodeManager::currentNM()->mkConst(FloatingPointToFPIEEEBitVector(info.t.exponent(),
									    info.t.significand()));
      return NodeManager::currentNM()->mkNode(op, node[0]);
      
    } else {
      Assert(children == 2);
      Assert(node[0].getType().isRoundingMode());
      
      TypeNode t = node[1].getType();
      
      if (t.isFloatingPoint()) {
	op = NodeManager::currentNM()->mkConst(FloatingPointToFPFloatingPoint(info.t.exponent(),
									      info.t.significand()));
      } else if (t.isReal()) {
	op = NodeManager::currentNM()->mkConst(FloatingPointToFPReal(info.t.exponent(),
								     info.t.significand()));
      } else if (t.isBitVector()) {
	op = NodeManager::currentNM()->mkConst(FloatingPointToFPSignedBitVector(info.t.exponent(),
										info.t.significand()));
	
      } else {
	throw TypeCheckingExceptionPrivate(node, "cannot rewrite to_fp generic due to incorrect type of second argument");
      }
      
      return NodeManager::currentNM()->mkNode(op, node[0], node[1]);
    }
    
    Unreachable("to_fp generic not rewritten");
  }
开发者ID:Dunedune,项目名称:CVC4,代码行数:39,代码来源:theory_fp.cpp


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