: d_type(new ArrayType(other.getType())),
d_expr(new Expr(other.getExpr())) {}
-ArrayStoreAll::~ArrayStoreAll() throw() {}
-
+ArrayStoreAll::~ArrayStoreAll() {}
ArrayStoreAll& ArrayStoreAll::operator=(const ArrayStoreAll& other) {
(*d_type) = other.getType();
(*d_expr) = other.getExpr();
*/
class CVC4_PUBLIC AscriptionType {
Type d_type;
-public:
- AscriptionType(Type t) throw() : d_type(t) {}
- Type getType() const throw() { return d_type; }
- bool operator==(const AscriptionType& other) const throw() {
+
+ public:
+ AscriptionType(Type t) : d_type(t) {}
+ Type getType() const { return d_type; }
+ bool operator==(const AscriptionType& other) const
+ {
return d_type == other.d_type;
}
- bool operator!=(const AscriptionType& other) const throw() {
+ bool operator!=(const AscriptionType& other) const
+ {
return d_type != other.d_type;
}
};/* class AscriptionType */
const std::vector<Type>& replacements,
const std::vector< SortConstructorType >& paramTypes,
const std::vector< DatatypeType >& paramReplacements)
- throw(IllegalArgumentException, DatatypeResolutionException) {
-
+{
PrettyCheckArgument(em != NULL, em, "cannot resolve a Datatype with a NULL expression manager");
PrettyCheckArgument(!d_resolved, this, "cannot resolve a Datatype twice");
PrettyCheckArgument(resolutions.find(d_name) != resolutions.end(), resolutions,
d_isRecord = true;
}
-Cardinality Datatype::getCardinality( Type t ) const throw(IllegalArgumentException) {
+Cardinality Datatype::getCardinality(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this );
std::vector< Type > processing;
return d_card;
}
-Cardinality Datatype::getCardinality() const throw(IllegalArgumentException) {
+Cardinality Datatype::getCardinality() const
+{
PrettyCheckArgument(!isParametric(), this, "for getCardinality, this datatype cannot be parametric");
return getCardinality( d_self );
}
-Cardinality Datatype::computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException){
+Cardinality Datatype::computeCardinality(Type t,
+ std::vector<Type>& processing) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){
d_card = Cardinality::INTEGERS;
return d_card;
}
-bool Datatype::isRecursiveSingleton( Type t ) const throw(IllegalArgumentException) {
+bool Datatype::isRecursiveSingleton(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this );
if( d_card_rec_singleton.find( t )==d_card_rec_singleton.end() ){
return d_card_rec_singleton[t]==1;
}
-bool Datatype::isRecursiveSingleton() const throw(IllegalArgumentException) {
+bool Datatype::isRecursiveSingleton() const
+{
PrettyCheckArgument(!isParametric(), this, "for isRecursiveSingleton, this datatype cannot be parametric");
return isRecursiveSingleton( d_self );
}
-unsigned Datatype::getNumRecursiveSingletonArgTypes( Type t ) const throw(IllegalArgumentException) {
+unsigned Datatype::getNumRecursiveSingletonArgTypes(Type t) const
+{
Assert( d_card_rec_singleton.find( t )!=d_card_rec_singleton.end() );
Assert( isRecursiveSingleton( t ) );
return d_card_u_assume[t].size();
}
-unsigned Datatype::getNumRecursiveSingletonArgTypes() const throw(IllegalArgumentException) {
+unsigned Datatype::getNumRecursiveSingletonArgTypes() const
+{
PrettyCheckArgument(!isParametric(), this, "for getNumRecursiveSingletonArgTypes, this datatype cannot be parametric");
return getNumRecursiveSingletonArgTypes( d_self );
}
-Type Datatype::getRecursiveSingletonArgType( Type t, unsigned i ) const throw(IllegalArgumentException) {
+Type Datatype::getRecursiveSingletonArgType(Type t, unsigned i) const
+{
Assert( d_card_rec_singleton.find( t )!=d_card_rec_singleton.end() );
Assert( isRecursiveSingleton( t ) );
return d_card_u_assume[t][i];
}
-Type Datatype::getRecursiveSingletonArgType( unsigned i ) const throw(IllegalArgumentException) {
+Type Datatype::getRecursiveSingletonArgType(unsigned i) const
+{
PrettyCheckArgument(!isParametric(), this, "for getRecursiveSingletonArgType, this datatype cannot be parametric");
return getRecursiveSingletonArgType( d_self, i );
}
-bool Datatype::computeCardinalityRecSingleton( Type t, std::vector< Type >& processing, std::vector< Type >& u_assume ) const throw(IllegalArgumentException){
+bool Datatype::computeCardinalityRecSingleton(Type t,
+ std::vector<Type>& processing,
+ std::vector<Type>& u_assume) const
+{
if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){
return true;
}else{
}
}
-bool Datatype::isFinite( Type t ) const throw(IllegalArgumentException) {
+bool Datatype::isFinite(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this );
self.setAttribute(DatatypeFiniteAttr(), true);
return true;
}
-bool Datatype::isFinite() const throw(IllegalArgumentException) {
+bool Datatype::isFinite() const
+{
PrettyCheckArgument(isResolved() && !isParametric(), this, "this datatype must be resolved and not parametric");
return isFinite( d_self );
}
-bool Datatype::isInterpretedFinite( Type t ) const throw(IllegalArgumentException) {
+bool Datatype::isInterpretedFinite(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this );
// we're using some internals, so we have to set up this library context
self.setAttribute(DatatypeUFiniteAttr(), true);
return true;
}
-bool Datatype::isInterpretedFinite() const throw(IllegalArgumentException) {
+bool Datatype::isInterpretedFinite() const
+{
PrettyCheckArgument(isResolved() && !isParametric(), this, "this datatype must be resolved and not parametric");
return isInterpretedFinite( d_self );
}
-bool Datatype::isWellFounded() const throw(IllegalArgumentException) {
+bool Datatype::isWellFounded() const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
if( d_well_founded==0 ){
// we're using some internals, so we have to set up this library context
return d_well_founded==1;
}
-bool Datatype::computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException) {
+bool Datatype::computeWellFounded(std::vector<Type>& processing) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){
return d_isCo;
}
}
-Expr Datatype::mkGroundTerm( Type t ) const throw(IllegalArgumentException) {
+Expr Datatype::mkGroundTerm(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved");
ExprManagerScope ems(d_self);
Debug("datatypes") << "mkGroundTerm of type " << t << std::endl;
}
}
-Expr Datatype::computeGroundTerm( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException) {
+Expr Datatype::computeGroundTerm(Type t, std::vector<Type>& processing) const
+{
if( std::find( processing.begin(), processing.end(), t )==processing.end() ){
processing.push_back( t );
for( unsigned r=0; r<2; r++ ){
return Expr();
}
-DatatypeType Datatype::getDatatypeType() const throw(IllegalArgumentException) {
+DatatypeType Datatype::getDatatypeType() const
+{
PrettyCheckArgument(isResolved(), *this, "Datatype must be resolved to get its DatatypeType");
PrettyCheckArgument(!d_self.isNull(), *this);
return DatatypeType(d_self);
}
-DatatypeType Datatype::getDatatypeType(const std::vector<Type>& params)
- const throw(IllegalArgumentException) {
+DatatypeType Datatype::getDatatypeType(const std::vector<Type>& params) const
+{
PrettyCheckArgument(isResolved(), *this, "Datatype must be resolved to get its DatatypeType");
PrettyCheckArgument(!d_self.isNull() && DatatypeType(d_self).isParametric(), this);
return DatatypeType(d_self).instantiate(params);
const std::vector<Type>& replacements,
const std::vector< SortConstructorType >& paramTypes,
const std::vector< DatatypeType >& paramReplacements, size_t cindex)
- throw(IllegalArgumentException, DatatypeResolutionException) {
-
+{
PrettyCheckArgument(em != NULL, em, "cannot resolve a Datatype with a NULL expression manager");
PrettyCheckArgument(!isResolved(),
"cannot resolve a Datatype constructor twice; "
return d_sygus_pc;
}
-Cardinality DatatypeConstructor::getCardinality( Type t ) const throw(IllegalArgumentException) {
+Cardinality DatatypeConstructor::getCardinality(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved");
Cardinality c = 1;
}
/** compute the cardinality of this datatype */
-Cardinality DatatypeConstructor::computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException){
+Cardinality DatatypeConstructor::computeCardinality(
+ Type t, std::vector<Type>& processing) const
+{
Cardinality c = 1;
std::vector< Type > instTypes;
std::vector< Type > paramTypes;
return c;
}
-bool DatatypeConstructor::computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException){
+bool DatatypeConstructor::computeWellFounded(
+ std::vector<Type>& processing) const
+{
for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) {
Type t = SelectorType((*i).getSelector().getType()).getRangeType();
if( t.isDatatype() ){
return true;
}
-
-bool DatatypeConstructor::isFinite( Type t ) const throw(IllegalArgumentException) {
+bool DatatypeConstructor::isFinite(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved");
// we're using some internals, so we have to set up this library context
return true;
}
-bool DatatypeConstructor::isInterpretedFinite( Type t ) const throw(IllegalArgumentException) {
+bool DatatypeConstructor::isInterpretedFinite(Type t) const
+{
PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved");
// we're using some internals, so we have to set up this library context
ExprManagerScope ems(d_constructor);
return true;
}
-Expr DatatypeConstructor::computeGroundTerm( Type t, std::vector< Type >& processing, std::map< Type, Expr >& gt ) const throw(IllegalArgumentException) {
-// we're using some internals, so we have to set up this library context
+Expr DatatypeConstructor::computeGroundTerm(Type t,
+ std::vector<Type>& processing,
+ std::map<Type, Expr>& gt) const
+{
+ // we're using some internals, so we have to set up this library context
ExprManagerScope ems(d_constructor);
std::vector<Expr> groundTerms;
return os;
}
-DatatypeIndexConstant::DatatypeIndexConstant(unsigned index) throw(IllegalArgumentException) : d_index(index){
-
-}
-
+DatatypeIndexConstant::DatatypeIndexConstant(unsigned index) : d_index(index) {}
std::ostream& operator<<(std::ostream& out, const DatatypeIndexConstant& dic) {
return out << "index_" << dic.getIndex();
}
* Return the cardinality of this constructor (the product of the
* cardinalities of its arguments).
*/
- Cardinality getCardinality( Type t ) const throw(IllegalArgumentException);
+ Cardinality getCardinality(Type t) const;
/**
* Return true iff this constructor is finite (it is nullary or
* each of its argument types are finite). This function can
* only be called for resolved constructors.
*/
- bool isFinite( Type t ) const throw(IllegalArgumentException);
+ bool isFinite(Type t) const;
/**
* Return true iff this constructor is finite (it is nullary or
* each of its argument types are finite) under assumption
* uninterpreted sorts are finite. This function can
* only be called for resolved constructors.
*/
- bool isInterpretedFinite( Type t ) const throw(IllegalArgumentException);
+ bool isInterpretedFinite(Type t) const;
/**
* Returns true iff this Datatype constructor has already been
const std::vector<Type>& replacements,
const std::vector<SortConstructorType>& paramTypes,
const std::vector<DatatypeType>& paramReplacements,
- size_t cindex) throw(IllegalArgumentException,
- DatatypeResolutionException);
+ size_t cindex);
/** Helper function for resolving parametric datatypes.
*
const std::vector<DatatypeType>& paramReplacements);
/** compute the cardinality of this datatype */
- Cardinality computeCardinality(Type t, std::vector<Type>& processing) const
- throw(IllegalArgumentException);
+ Cardinality computeCardinality(Type t, std::vector<Type>& processing) const;
/** compute whether this datatype is well-founded */
- bool computeWellFounded(std::vector<Type>& processing) const
- throw(IllegalArgumentException);
+ bool computeWellFounded(std::vector<Type>& processing) const;
/** compute ground term */
Expr computeGroundTerm(Type t,
std::vector<Type>& processing,
- std::map<Type, Expr>& gt) const
- throw(IllegalArgumentException);
+ std::map<Type, Expr>& gt) const;
/** compute shared selectors
* This computes the maps d_shared_selectors and d_shared_selector_index.
*/
* for parametric datatypes, where t is an instantiated
* parametric datatype type whose datatype is this class.
*/
- Cardinality getCardinality( Type t ) const throw(IllegalArgumentException);
- Cardinality getCardinality() const throw(IllegalArgumentException);
+ Cardinality getCardinality(Type t) const;
+ Cardinality getCardinality() const;
/**
* Return true iff this Datatype has finite cardinality. If the
* for parametric datatypes, where t is an instantiated
* parametric datatype type whose datatype is this class.
*/
- bool isFinite( Type t ) const throw(IllegalArgumentException);
- bool isFinite() const throw(IllegalArgumentException);
+ bool isFinite(Type t) const;
+ bool isFinite() const;
/**
* Return true iff this Datatype is finite (all constructors are
* for parametric datatypes, where t is an instantiated
* parametric datatype type whose datatype is this class.
*/
- bool isInterpretedFinite( Type t ) const throw(IllegalArgumentException);
- bool isInterpretedFinite() const throw(IllegalArgumentException);
+ bool isInterpretedFinite(Type t) const;
+ bool isInterpretedFinite() const;
/** is well-founded
*
* values of this type).
* This datatype must be resolved or an exception is thrown.
*/
- bool isWellFounded() const throw(IllegalArgumentException);
+ bool isWellFounded() const;
/** is recursive singleton
*
* for parametric datatypes, where t is an instantiated
* parametric datatype type whose datatype is this class.
*/
- bool isRecursiveSingleton( Type t ) const throw(IllegalArgumentException);
- bool isRecursiveSingleton() const throw(IllegalArgumentException);
+ bool isRecursiveSingleton(Type t) const;
+ bool isRecursiveSingleton() const;
/** recursive single arguments
*
* for parametric datatypes, where t is an instantiated
* parametric datatype type whose datatype is this class.
*/
- unsigned getNumRecursiveSingletonArgTypes( Type t ) const throw(IllegalArgumentException);
- Type getRecursiveSingletonArgType( Type t, unsigned i ) const throw(IllegalArgumentException);
- unsigned getNumRecursiveSingletonArgTypes() const throw(IllegalArgumentException);
- Type getRecursiveSingletonArgType( unsigned i ) const throw(IllegalArgumentException);
+ unsigned getNumRecursiveSingletonArgTypes(Type t) const;
+ Type getRecursiveSingletonArgType(Type t, unsigned i) const;
+ unsigned getNumRecursiveSingletonArgTypes() const;
+ Type getRecursiveSingletonArgType(unsigned i) const;
/**
* Construct and return a ground term of this Datatype. The
* datatype is this class, which may be an instantiated datatype
* type if this datatype is parametric.
*/
- Expr mkGroundTerm( Type t ) const throw(IllegalArgumentException);
+ Expr mkGroundTerm(Type t) const;
/**
* Get the DatatypeType associated to this Datatype. Can only be
* called post-resolution.
*/
- DatatypeType getDatatypeType() const throw(IllegalArgumentException);
+ DatatypeType getDatatypeType() const;
/**
* Get the DatatypeType associated to this (parameterized) Datatype. Can only be
* called post-resolution.
*/
- DatatypeType getDatatypeType(const std::vector<Type>& params) const throw(IllegalArgumentException);
+ DatatypeType getDatatypeType(const std::vector<Type>& params) const;
/**
* Return true iff the two Datatypes are the same.
const std::vector<Type>& placeholders,
const std::vector<Type>& replacements,
const std::vector<SortConstructorType>& paramTypes,
- const std::vector<DatatypeType>&
- paramReplacements) throw(IllegalArgumentException,
- DatatypeResolutionException);
+ const std::vector<DatatypeType>& paramReplacements);
friend class ExprManager; // for access to resolve()
/** compute the cardinality of this datatype */
- Cardinality computeCardinality(Type t, std::vector<Type>& processing) const
- throw(IllegalArgumentException);
+ Cardinality computeCardinality(Type t, std::vector<Type>& processing) const;
/** compute whether this datatype is a recursive singleton */
bool computeCardinalityRecSingleton(Type t,
std::vector<Type>& processing,
- std::vector<Type>& u_assume) const
- throw(IllegalArgumentException);
+ std::vector<Type>& u_assume) const;
/** compute whether this datatype is well-founded */
- bool computeWellFounded(std::vector<Type>& processing) const
- throw(IllegalArgumentException);
+ bool computeWellFounded(std::vector<Type>& processing) const;
/** compute ground term */
- Expr computeGroundTerm(Type t, std::vector<Type>& processing) const
- throw(IllegalArgumentException);
+ Expr computeGroundTerm(Type t, std::vector<Type>& processing) const;
/** Get the shared selector
*
* This returns the index^th (constructor-agnostic)
/* stores an index to Datatype residing in NodeManager */
class CVC4_PUBLIC DatatypeIndexConstant {
-public:
-
- DatatypeIndexConstant(unsigned index) throw(IllegalArgumentException);
+ public:
+ DatatypeIndexConstant(unsigned index);
- ~DatatypeIndexConstant() {}
const unsigned getIndex() const { return d_index; }
bool operator==(const DatatypeIndexConstant& uc) const
{
return *this;
}
-
-EmptySet::~EmptySet() throw() {
- delete d_type;
-}
-
+EmptySet::~EmptySet() { delete d_type; }
const SetType& EmptySet::getType() const {
return *d_type;
}
-
-bool EmptySet::operator==(const EmptySet& es) const throw() {
+bool EmptySet::operator==(const EmptySet& es) const
+{
return getType() == es.getType();
}
-bool EmptySet::operator!=(const EmptySet& es) const throw() {
- return !(*this == es);
-}
-
-bool EmptySet::operator<(const EmptySet& es) const throw() {
+bool EmptySet::operator!=(const EmptySet& es) const { return !(*this == es); }
+bool EmptySet::operator<(const EmptySet& es) const
+{
return getType() < es.getType();
}
-bool EmptySet::operator<=(const EmptySet& es) const throw() {
+bool EmptySet::operator<=(const EmptySet& es) const
+{
return getType() <= es.getType();
}
-bool EmptySet::operator>(const EmptySet& es) const throw() {
- return !(*this <= es);
-}
-
-bool EmptySet::operator>=(const EmptySet& es) const throw() {
- return !(*this < es);
-}
-
-
+bool EmptySet::operator>(const EmptySet& es) const { return !(*this <= es); }
+bool EmptySet::operator>=(const EmptySet& es) const { return !(*this < es); }
}/* CVC4 namespace */
namespace CVC4 {
class CVC4_PUBLIC EmptySet {
-public:
+ public:
/**
* Constructs an emptyset of the specified type. Note that the argument
* is the type of the set itself, NOT the type of the elements.
*/
EmptySet(const SetType& setType);
- ~EmptySet() throw();
+ ~EmptySet();
EmptySet(const EmptySet& other);
EmptySet& operator=(const EmptySet& other);
const SetType& getType() const;
- bool operator==(const EmptySet& es) const throw();
- bool operator!=(const EmptySet& es) const throw();
- bool operator<(const EmptySet& es) const throw();
- bool operator<=(const EmptySet& es) const throw();
- bool operator>(const EmptySet& es) const throw() ;
- bool operator>=(const EmptySet& es) const throw();
+ bool operator==(const EmptySet& es) const;
+ bool operator!=(const EmptySet& es) const;
+ bool operator<(const EmptySet& es) const;
+ bool operator<=(const EmptySet& es) const;
+ bool operator>(const EmptySet& es) const;
+ bool operator>=(const EmptySet& es) const;
-private:
+ private:
/** Pointer to the SetType node. This is never NULL. */
SetType* d_type;
}
/* Helper functions for toPickle */
- void toCaseNode(TNode n) throw(AssertionException, PicklingException);
- void toCaseVariable(TNode n) throw(AssertionException, PicklingException);
+ void toCaseNode(TNode n);
+ void toCaseVariable(TNode n);
void toCaseConstant(TNode n);
- void toCaseOperator(TNode n) throw(AssertionException, PicklingException);
+ void toCaseOperator(TNode n);
void toCaseString(Kind k, const std::string& s);
/* Helper functions for toPickle */
}
void Pickler::toPickle(Expr e, Pickle& p)
- throw(PicklingException) {
+{
Assert(NodeManager::fromExprManager(e.getExprManager()) == d_private->d_nm);
Assert(d_private->atDefaultState());
}
void PicklerPrivate::toCaseNode(TNode n)
- throw(AssertionException, PicklingException) {
+{
Debug("pickler") << "toCaseNode: " << n << std::endl;
Kind k = n.getKind();
kind::MetaKind m = metaKindOf(k);
}
void PicklerPrivate::toCaseOperator(TNode n)
- throw(AssertionException, PicklingException) {
+{
Kind k = n.getKind();
kind::MetaKind m = metaKindOf(k);
Assert(m == kind::metakind::PARAMETERIZED || m == kind::metakind::OPERATOR);
}
void PicklerPrivate::toCaseVariable(TNode n)
- throw(AssertionException, PicklingException) {
+{
Kind k = n.getKind();
Assert(metaKindOf(k) == kind::metakind::VARIABLE);
friend class PicklerPrivate;
protected:
- virtual uint64_t variableToMap(uint64_t x) const
- throw(PicklingException) {
- return x;
- }
- virtual uint64_t variableFromMap(uint64_t x) const {
- return x;
- }
-
+ virtual uint64_t variableToMap(uint64_t x) const { return x; }
+ virtual uint64_t variableFromMap(uint64_t x) const { return x; }
public:
Pickler(ExprManager* em);
virtual ~Pickler();
*
* @return the pickle, which should be dispose()'d when you're done with it
*/
- void toPickle(Expr e, Pickle& p) throw(PicklingException);
+ void toPickle(Expr e, Pickle& p);
/**
* Constructs a node from a Pickle.
d_fromMap(from) {
}
- virtual ~MapPickler() throw() {}
-
protected:
-
- virtual uint64_t variableToMap(uint64_t x) const
- throw(PicklingException) {
- VarMap::const_iterator i = d_toMap.find(x);
- if(i != d_toMap.end()) {
- return i->second;
- } else {
- throw PicklingException();
- }
+ uint64_t variableToMap(uint64_t x) const override
+ {
+ VarMap::const_iterator i = d_toMap.find(x);
+ if (i != d_toMap.end())
+ {
+ return i->second;
+ }
+ else
+ {
+ throw PicklingException();
+ }
}
- virtual uint64_t variableFromMap(uint64_t x) const;
+ uint64_t variableFromMap(uint64_t x) const override;
};/* class MapPickler */
}/* CVC4::expr::pickle namespace */
// operators for record update
class CVC4_PUBLIC RecordUpdate {
std::string d_field;
-public:
- RecordUpdate(const std::string& field) throw() : d_field(field) { }
- std::string getField() const throw() { return d_field; }
- bool operator==(const RecordUpdate& t) const throw() { return d_field == t.d_field; }
- bool operator!=(const RecordUpdate& t) const throw() { return d_field != t.d_field; }
+
+ public:
+ RecordUpdate(const std::string& field) : d_field(field) {}
+ std::string getField() const { return d_field; }
+ bool operator==(const RecordUpdate& t) const { return d_field == t.d_field; }
+ bool operator!=(const RecordUpdate& t) const { return d_field != t.d_field; }
};/* class RecordUpdate */
struct CVC4_PUBLIC RecordUpdateHashFunction {
// now an actual record definition
class CVC4_PUBLIC Record {
-public:
+ public:
// Type must stay as incomplete types throughout this header!
// Everything containing a Type must be a pointer or a reference.
typedef std::vector< std::pair<std::string, Type> > FieldVector;
namespace CVC4 {
-UninterpretedConstant::UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException)
- : d_type(type)
- , d_index(index)
+UninterpretedConstant::UninterpretedConstant(Type type, Integer index)
+ : d_type(type), d_index(index)
{
//PrettyCheckArgument(type.isSort(), type, "uninterpreted constants can only be created for uninterpreted sorts, not `%s'", type.toString().c_str());
PrettyCheckArgument(index >= 0, index, "index >= 0 required for uninterpreted constant index, not `%s'", index.toString().c_str());
namespace CVC4 {
class CVC4_PUBLIC UninterpretedConstant {
-public:
+ public:
+ UninterpretedConstant(Type type, Integer index);
- UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException);
-
- ~UninterpretedConstant() throw() { }
-
- Type getType() const throw() {
- return d_type;
- }
- const Integer& getIndex() const throw() {
- return d_index;
- }
-
- bool operator==(const UninterpretedConstant& uc) const throw() {
+ Type getType() const { return d_type; }
+ const Integer& getIndex() const { return d_index; }
+ bool operator==(const UninterpretedConstant& uc) const
+ {
return d_type == uc.d_type && d_index == uc.d_index;
}
- bool operator!=(const UninterpretedConstant& uc) const throw() {
+ bool operator!=(const UninterpretedConstant& uc) const
+ {
return !(*this == uc);
}
- bool operator<(const UninterpretedConstant& uc) const throw() {
+ bool operator<(const UninterpretedConstant& uc) const
+ {
return d_type < uc.d_type ||
(d_type == uc.d_type && d_index < uc.d_index);
}
- bool operator<=(const UninterpretedConstant& uc) const throw() {
+ bool operator<=(const UninterpretedConstant& uc) const
+ {
return d_type < uc.d_type ||
(d_type == uc.d_type && d_index <= uc.d_index);
}
- bool operator>(const UninterpretedConstant& uc) const throw() {
+ bool operator>(const UninterpretedConstant& uc) const
+ {
return !(*this <= uc);
}
- bool operator>=(const UninterpretedConstant& uc) const throw() {
+ bool operator>=(const UninterpretedConstant& uc) const
+ {
return !(*this < uc);
}
-private:
+ private:
const Type d_type;
const Integer d_index;
};/* class UninterpretedConstant */