本文整理汇总了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;
}
示例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;
}
示例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];
}
示例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;
}
示例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");
}