}
bool Type::isSubtype() const {
- return isPredicateSubtype();
+ return false;
}
Cardinality Type::card() const {
}
Type ValidityChecker::subtypeType(const Expr& pred, const Expr& witness) {
+ Unimplemented("Records not supported by CVC4 yet (sorry!)");
+ /*
if(witness.isNull()) {
return d_em->mkPredicateSubtype(pred);
} else {
return d_em->mkPredicateSubtype(pred, witness);
}
+ */
}
Type ValidityChecker::tupleType(const Type& type0, const Type& type1) {
}
Type ValidityChecker::getBaseType(const Type& t) {
- Type type = t;
- while(type.isPredicateSubtype()) {
- type = CVC4::PredicateSubtype(type).getBaseType();
- }
- // We might still be a (primitive) subtype. Check the types that can
- // form the base of such a type.
- if(type.isReal()) {
- return d_em->realType();
- }
- assert(!type.isInteger());// should be handled by Real
- if(type.isBoolean()) {
- return d_em->booleanType();
- }
- return type;
+ return t.getBaseType();
}
Expr ValidityChecker::getTypePred(const Type&t, const Expr& e) {
new TypeNode(d_nodeManager->mkSortConstructor(name, arity))));
}
+/* - not in release 1.0
Type ExprManager::mkPredicateSubtype(Expr lambda)
throw(TypeCheckingException) {
NodeManagerScope nms(d_nodeManager);
throw TypeCheckingException(this, &e);
}
}
+*/
+/* - not in release 1.0
Type ExprManager::mkPredicateSubtype(Expr lambda, Expr witness)
throw(TypeCheckingException) {
NodeManagerScope nms(d_nodeManager);
throw TypeCheckingException(this, &e);
}
}
+*/
Type ExprManager::mkSubrangeType(const SubrangeBounds& bounds)
throw(TypeCheckingException) {
* not a LAMBDA, or is ill-typed, or if CVC4 fails at proving that
* the resulting predicate subtype is inhabited.
*/
- Type mkPredicateSubtype(Expr lambda)
- throw(TypeCheckingException);
+ // not in release 1.0
+ //Type mkPredicateSubtype(Expr lambda)
+ // throw(TypeCheckingException);
/**
* Make a predicate subtype type defined by the given LAMBDA
* a LAMBDA, or is ill-typed, or if the witness is not a witness or
* ill-typed.
*/
- Type mkPredicateSubtype(Expr lambda, Expr witness)
- throw(TypeCheckingException);
+ // not in release 1.0
+ //Type mkPredicateSubtype(Expr lambda, Expr witness)
+ // throw(TypeCheckingException);
/**
* Make an integer subrange type as defined by the argument.
}
/** Is this a predicate subtype */
+/* - not in release 1.0
bool Type::isPredicateSubtype() const {
NodeManagerScope nms(d_nodeManager);
return d_typeNode->isPredicateSubtype();
}
+*/
/** Cast to a predicate subtype */
+/* - not in release 1.0
Type::operator PredicateSubtype() const throw(IllegalArgumentException) {
NodeManagerScope nms(d_nodeManager);
CheckArgument(isNull() || isPredicateSubtype(), this);
return PredicateSubtype(*this);
}
+*/
/** Is this an integer subrange */
bool Type::isSubrange() const {
CheckArgument(isNull() || isSortConstructor(), this);
}
+/* - not in release 1.0
PredicateSubtype::PredicateSubtype(const Type& t)
throw(IllegalArgumentException) :
Type(t) {
CheckArgument(isNull() || isPredicateSubtype(), this);
}
+*/
SubrangeType::SubrangeType(const Type& t)
throw(IllegalArgumentException) :
return BooleanType(makeType(d_nodeManager->booleanType()));
}
+/* - not in release 1.0
Expr PredicateSubtype::getPredicate() const {
NodeManagerScope nms(d_nodeManager);
return d_typeNode->getSubtypePredicate().toExpr();
NodeManagerScope nms(d_nodeManager);
return d_typeNode->getSubtypeParentType().toType();
}
+*/
SubrangeBounds SubrangeType::getSubrangeBounds() const {
NodeManagerScope nms(d_nodeManager);
class SExprType;
class SortType;
class SortConstructorType;
-class PredicateSubtype;
+// not in release 1.0
+//class PredicateSubtype;
class SubrangeType;
class Type;
* Is this a predicate subtype?
* @return true if this is a predicate subtype
*/
- bool isPredicateSubtype() const;
+ // not in release 1.0
+ //bool isPredicateSubtype() const;
/**
* Cast this type to a predicate subtype
* @return the predicate subtype
*/
- operator PredicateSubtype() const throw(IllegalArgumentException);
+ // not in release 1.0
+ //operator PredicateSubtype() const throw(IllegalArgumentException);
/**
* Is this an integer subrange type?
};/* class SortConstructorType */
+// not in release 1.0
+#if 0
/**
* Class encapsulating a predicate subtype.
*/
Type getParentType() const;
};/* class PredicateSubtype */
+#endif /* 0 */
/**
* Class encapsulating an integer subrange type.
{ /*SymbolTable* old = PARSER_STATE->getSymbolTable();
PARSER_STATE->useDeclarationsFrom(symtab);
delete old;*/
- t = f2.isNull() ?
+ PARSER_STATE->unimplementedFeature("predicate subtyping not supported in this release");
+ /*t = f2.isNull() ?
EXPR_MANAGER->mkPredicateSubtype(f) :
EXPR_MANAGER->mkPredicateSubtype(f, f2);
+ */
}
/* subrange types */