class TypeChecker {
public:
+ static TypeNode computeType(NodeManager* nodeManager,
+ TNode n,
+ bool check = false);
- static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check = false)
- throw (TypeCheckingExceptionPrivate, AssertionException);
+ static bool computeIsConst(NodeManager* nodeManager, TNode n);
- static bool computeIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException);
-
- static bool neverIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException);
+ static bool neverIsConst(NodeManager* nodeManager, TNode n);
};/* class TypeChecker */
namespace expr {
TypeNode TypeChecker::computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+{
TypeNode typeNode;
// Infer the type
}/* TypeChecker::computeType */
bool TypeChecker::computeIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException) {
-
+{
Assert(n.getMetaKind() == kind::metakind::OPERATOR || n.getMetaKind() == kind::metakind::PARAMETERIZED || n.getMetaKind() == kind::metakind::NULLARY_OPERATOR);
switch(n.getKind()) {
}/* TypeChecker::computeIsConst */
bool TypeChecker::neverIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException) {
-
+{
Assert(n.getMetaKind() == kind::metakind::OPERATOR || n.getMetaKind() == kind::metakind::PARAMETERIZED || n.getMetaKind() == kind::metakind::NULLARY_OPERATOR);
switch(n.getKind()) {
class ArithConstantTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::CONST_RATIONAL);
if(n.getConst<Rational>().isIntegral()){
return nodeManager->integerType();
class ArithOperatorTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode integerType = nodeManager->integerType();
TypeNode realType = nodeManager->realType();
TNode::iterator child_it = n.begin();
class IntOperatorTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TNode::iterator child_it = n.begin();
TNode::iterator child_it_end = n.end();
if(check) {
class RealOperatorTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TNode::iterator child_it = n.begin();
TNode::iterator child_it_end = n.end();
if(check) {
class ArithPredicateTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode lhsType = n[0].getType(check);
if (!lhsType.isReal()) {
class ArithUnaryPredicateTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isReal()) {
class IntUnaryPredicateTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isInteger()) {
class RealNullaryOperatorTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
// for nullary operators, we only computeType for check=true, since they are given TypeAttr() on creation
Assert(check);
TypeNode realType = n.getType();
struct ArraySelectTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SELECT);
TypeNode arrayType = n[0].getType(check);
if( check ) {
struct ArrayStoreTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if (n.getKind() == kind::STORE) {
TypeNode arrayType = n[0].getType(check);
if( check ) {
}
inline static bool computeIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException) {
+ {
Assert(n.getKind() == kind::STORE);
NodeManagerScope nms(nodeManager);
struct ArrayTableFunTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::ARR_TABLE_FUN);
TypeNode arrayType = n[0].getType(check);
if( check ) {
struct ArrayLambdaTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::ARRAY_LAMBDA);
TypeNode lamType = n[0].getType(check);
if( check ) {
struct ArrayPartialSelectTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::PARTIAL_SELECT_0 || n.getKind() == kind::PARTIAL_SELECT_1);
return nodeManager->integerType();
}
class BooleanTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode booleanType = nodeManager->booleanType();
if( check ) {
TNode::iterator child_it = n.begin();
class IteTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode thenType = n[1].getType(check);
TypeNode elseType = n[2].getType(check);
TypeNode iteType = TypeNode::leastCommonTypeNode(thenType, elseType);
namespace builtin {
class ApplyTypeRule {
- public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TNode f = n.getOperator();
TypeNode fType = f.getType(check);
if( !fType.isFunction() && n.getNumChildren() > 0 ) {
class EqualityTypeRule {
- public:
- inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate, AssertionException) {
+ public:
+ inline static TypeNode computeType(NodeManager* nodeManager,
+ TNode n,
+ bool check)
+ {
TypeNode booleanType = nodeManager->booleanType();
- if( check ) {
+ if (check)
+ {
TypeNode lhsType = n[0].getType(check);
TypeNode rhsType = n[1].getType(check);
-
- if ( TypeNode::leastCommonTypeNode(lhsType, rhsType).isNull() ) {
+
+ if (TypeNode::leastCommonTypeNode(lhsType, rhsType).isNull())
+ {
std::stringstream ss;
ss << "Subexpressions must have a common base type:" << std::endl;
ss << "Equation: " << n << std::endl;
class DistinctTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
if( check ) {
TNode::iterator child_it = n.begin();
};/* class DistinctTypeRule */
class SExprTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
std::vector<TypeNode> types;
for(TNode::iterator child_it = n.begin(), child_it_end = n.end();
};/* class SExprTypeRule */
class UninterpretedConstantTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
return TypeNode::fromType(n.getConst<UninterpretedConstant>().getType());
}
};/* class UninterpretedConstantTypeRule */
class AbstractValueTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
// An UnknownTypeException means that this node has no type. For now,
// only abstract values are like this---and then, only if they are created
};/* class AbstractValueTypeRule */
class LambdaTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
if( n[0].getType(check) != nodeManager->boundVarListType() ) {
std::stringstream ss;
}
// computes whether a lambda is a constant value, via conversion to array representation
inline static bool computeIsConst(NodeManager* nodeManager, TNode n)
- throw (AssertionException) {
+ {
Assert(n.getKind() == kind::LAMBDA);
//get array representation of this function, if possible
Node na = TheoryBuiltinRewriter::getArrayRepresentationForLambda( n, true );
}; /* class ChoiceTypeRule */
class ChainTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
Assert(n.getKind() == kind::CHAIN);
};/* class ChainTypeRule */
class ChainedOperatorTypeRule {
-public:
+ public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) {
Assert(n.getKind() == kind::CHAIN_OP);
return nodeManager->getType(nodeManager->operatorOf(n.getConst<Chain>().getOperator()), check);
};/* class ChainedOperatorTypeRule */
class SortProperties {
-public:
+ public:
inline static bool isWellFounded(TypeNode type) {
return true;
}
};/* class SortProperties */
class FunctionProperties {
-public:
+ public:
inline static Cardinality computeCardinality(TypeNode type) {
// Don't assert this; allow other theories to use this cardinality
// computation.
};/* class FuctionProperties */
class SExprProperties {
-public:
+ public:
inline static Cardinality computeCardinality(TypeNode type) {
// Don't assert this; allow other theories to use this cardinality
// computation.
struct QuantifierForallTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Debug("typecheck-q") << "type check for fa " << n << std::endl;
Assert(n.getKind() == kind::FORALL && n.getNumChildren()>0 );
if( check ){
struct QuantifierExistsTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Debug("typecheck-q") << "type check for ex " << n << std::endl;
Assert(n.getKind() == kind::EXISTS && n.getNumChildren()>0 );
if( check ){
struct QuantifierBoundVarListTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::BOUND_VAR_LIST );
if( check ){
for( int i=0; i<(int)n.getNumChildren(); i++ ){
struct QuantifierInstPatternTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::INST_PATTERN );
if( check ){
TypeNode tn = n[0].getType(check);
struct QuantifierInstNoPatternTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::INST_NO_PATTERN );
return nodeManager->instPatternType();
}
struct QuantifierInstAttributeTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::INST_ATTRIBUTE );
return nodeManager->instPatternType();
}
struct QuantifierInstPatternListTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::INST_PATTERN_LIST );
if( check ){
for( int i=0; i<(int)n.getNumChildren(); i++ ){
struct QuantifierInstClosureTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::INST_CLOSURE );
if( check ){
TypeNode tn = n[0].getType(check);
*/
inline static TypeNode computeType(NodeManager* nodeManager, TNode n,
bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Debug("typecheck-r") << "type check for rr " << n << std::endl;
Assert(n.getKind() == kind::REWRITE_RULE && n.getNumChildren()==3 );
if( check ){
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::RR_REWRITE );
if( check ){
if( n[0].getType(check)!=n[1].getType(check) ){
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw(TypeCheckingExceptionPrivate) {
+ {
Assert(n.getKind() == kind::RR_REDUCTION ||
n.getKind() == kind::RR_DEDUCTION );
if( check ){
class SepEmpTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SEP_EMP);
return nodeManager->booleanType();
}
struct SepPtoTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SEP_PTO);
if( check ) {
TypeNode refType = n[0].getType(check);
struct SepStarTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode btype = nodeManager->booleanType();
Assert(n.getKind() == kind::SEP_STAR);
if( check ){
struct SepWandTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode btype = nodeManager->booleanType();
Assert(n.getKind() == kind::SEP_WAND);
if( check ){
struct SepLabelTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
TypeNode btype = nodeManager->booleanType();
Assert(n.getKind() == kind::SEP_LABEL);
if( check ){
struct SepNilTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SEP_NIL);
Assert(check);
TypeNode type = n.getType();
*/
inline static TypeNode computeType(NodeManager* nodeManager, TNode n,
bool check)
- throw (TypeCheckingExceptionPrivate) {
-
+ {
// TODO: implement me!
Unimplemented();
struct SetsBinaryOperatorTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::UNION ||
n.getKind() == kind::INTERSECTION ||
n.getKind() == kind::SETMINUS);
struct SubsetTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SUBSET);
TypeNode setType = n[0].getType(check);
if( check ) {
struct MemberTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::MEMBER);
TypeNode setType = n[1].getType(check);
if( check ) {
struct SingletonTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::SINGLETON);
return nodeManager->mkSetType(n[0].getType(check));
}
struct EmptySetTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::EMPTYSET);
EmptySet emptySet = n.getConst<EmptySet>();
Type setType = emptySet.getType();
struct CardTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::CARD);
TypeNode setType = n[0].getType(check);
if( check ) {
struct ComplementTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::COMPLEMENT);
TypeNode setType = n[0].getType(check);
if( check ) {
struct UniverseSetTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::UNIVERSE_SET);
// for nullary operators, we only computeType for check=true, since they are given TypeAttr() on creation
Assert(check);
struct InsertTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::INSERT);
size_t numChildren = n.getNumChildren();
Assert( numChildren >= 2 );
struct RelBinaryOperatorTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::PRODUCT ||
n.getKind() == kind::JOIN);
struct RelTransposeTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::TRANSPOSE);
TypeNode setType = n[0].getType(check);
if(check && (!setType.isSet() || !setType.getSetElementType().isTuple())) {
struct RelTransClosureTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::TCLOSURE);
TypeNode setType = n[0].getType(check);
if(check) {
struct JoinImageTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::JOIN_IMAGE);
TypeNode firstRelType = n[0].getType(check);
struct RelIdenTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
Assert(n.getKind() == kind::IDEN);
TypeNode setType = n[0].getType(check);
if(check) {
class StringConstantTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
return nodeManager->stringType();
}
};
class StringConcatTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ){
TNode::iterator it = n.begin();
TNode::iterator it_end = n.end();
class StringLengthTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringSubstrTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringContainTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringCharAtTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringIndexOfTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringReplaceTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringPrefixOfTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringSuffixOfTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringIntToStrTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isInteger()) {
class StringStrToIntTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class RegExpConstantTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
return nodeManager->regExpType();
}
};
class RegExpConcatTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
TNode::iterator it_end = n.end();
class RegExpUnionTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
TNode::iterator it_end = n.end();
class RegExpInterTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
TNode::iterator it_end = n.end();
class RegExpStarTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isRegExp()) {
class RegExpPlusTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isRegExp()) {
class RegExpOptTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isRegExp()) {
class RegExpRangeTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
unsigned char ch[2];
class RegExpLoopTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
TNode::iterator it_end = n.end();
class StringToRegExpTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isString()) {
class StringInRegExpTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TNode::iterator it = n.begin();
TypeNode t = (*it).getType(check);
class EmptyRegExpTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
-
+ {
Assert(n.getKind() == kind::REGEXP_EMPTY);
return nodeManager->regExpType();
}
class SigmaRegExpTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
-
+ {
Assert(n.getKind() == kind::REGEXP_SIGMA);
return nodeManager->regExpType();
}
class RegExpRVTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- throw (TypeCheckingExceptionPrivate, AssertionException) {
+ {
if( check ) {
TypeNode t = n[0].getType(check);
if (!t.isInteger()) {