#if SWIG_VERSION < 0x030000
%define final %enddef
%define override %enddef
+%define noexcept %enddef
#endif
%import "bindings/swig.h"
Trace("decision") << "Justification heuristic enabled" << std::endl;
}
-JustificationHeuristic::~JustificationHeuristic() throw() {
+JustificationHeuristic::~JustificationHeuristic()
+{
smtStatisticsRegistry()->unregisterStat(&d_helfulness);
smtStatisticsRegistry()->unregisterStat(&d_giveup);
smtStatisticsRegistry()->unregisterStat(&d_timestat);
context::UserContext *uc,
context::Context *c);
- ~JustificationHeuristic() throw();
+ ~JustificationHeuristic();
prop::SatLiteral getNext(bool &stopSearch);
return *this;
}
-const ArrayType& ArrayStoreAll::getType() const throw() { return *d_type; }
+const ArrayType& ArrayStoreAll::getType() const { return *d_type; }
-const Expr& ArrayStoreAll::getExpr() const throw() { return *d_expr; }
+const Expr& ArrayStoreAll::getExpr() const { return *d_expr; }
-bool ArrayStoreAll::operator==(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator==(const ArrayStoreAll& asa) const
+{
return getType() == asa.getType() && getExpr() == asa.getExpr();
}
-bool ArrayStoreAll::operator!=(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator!=(const ArrayStoreAll& asa) const
+{
return !(*this == asa);
}
-bool ArrayStoreAll::operator<(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator<(const ArrayStoreAll& asa) const
+{
return (getType() < asa.getType()) ||
(getType() == asa.getType() && getExpr() < asa.getExpr());
}
-bool ArrayStoreAll::operator<=(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator<=(const ArrayStoreAll& asa) const
+{
return (getType() < asa.getType()) ||
(getType() == asa.getType() && getExpr() <= asa.getExpr());
}
-bool ArrayStoreAll::operator>(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator>(const ArrayStoreAll& asa) const
+{
return !(*this <= asa);
}
-bool ArrayStoreAll::operator>=(const ArrayStoreAll& asa) const throw() {
+bool ArrayStoreAll::operator>=(const ArrayStoreAll& asa) const
+{
return !(*this < asa);
}
* not a constant of type `type`.
*/
ArrayStoreAll(const ArrayType& type, const Expr& expr);
- ~ArrayStoreAll() throw();
+ ~ArrayStoreAll();
ArrayStoreAll(const ArrayStoreAll& other);
ArrayStoreAll& operator=(const ArrayStoreAll& other);
- const ArrayType& getType() const throw();
- const Expr& getExpr() const throw();
+ const ArrayType& getType() const;
+ const Expr& getExpr() const;
- bool operator==(const ArrayStoreAll& asa) const throw();
- bool operator!=(const ArrayStoreAll& asa) const throw();
- bool operator<(const ArrayStoreAll& asa) const throw();
- bool operator<=(const ArrayStoreAll& asa) const throw();
- bool operator>(const ArrayStoreAll& asa) const throw();
- bool operator>=(const ArrayStoreAll& asa) const throw();
+ bool operator==(const ArrayStoreAll& asa) const;
+ bool operator!=(const ArrayStoreAll& asa) const;
+ bool operator<(const ArrayStoreAll& asa) const;
+ bool operator<=(const ArrayStoreAll& asa) const;
+ bool operator>(const ArrayStoreAll& asa) const;
+ bool operator>=(const ArrayStoreAll& asa) const;
private:
std::unique_ptr<ArrayType> d_type;
#endif
}
-ExprManager::~ExprManager() throw() {
+ExprManager::~ExprManager()
+{
NodeManagerScope nms(d_nodeManager);
try {
return d_nodeManager->getOptions();
}
-ResourceManager* ExprManager::getResourceManager() throw() {
+ResourceManager* ExprManager::getResourceManager()
+{
return d_nodeManager->getResourceManager();
}
* any expression references that used to be managed by this expression
* manager and are left-over are bad.
*/
- ~ExprManager() throw();
+ ~ExprManager();
/** Get this expr manager's options */
const Options& getOptions() const;
/** Get this expr manager's resource manager */
- ResourceManager* getResourceManager() throw();
+ ResourceManager* getResourceManager();
/** Get the type for booleans */
BooleanType booleanType() const;
SortConstructorType mkSortConstructor(const std::string& name,
size_t arity) const;
- /**
- * Make a predicate subtype type defined by the given LAMBDA
- * expression. A TypeCheckingException can be thrown if lambda is
- * not a LAMBDA, or is ill-typed, or if CVC4 fails at proving that
- * the resulting predicate subtype is inhabited.
- */
- // not in release 1.0
- //Type mkPredicateSubtype(Expr lambda)
- // throw(TypeCheckingException);
-
- /**
- * Make a predicate subtype type defined by the given LAMBDA
- * expression and whose non-emptiness is witnessed by the given
- * witness. A TypeCheckingException can be thrown if lambda is not
- * a LAMBDA, or is ill-typed, or if the witness is not a witness or
- * ill-typed.
- */
- // not in release 1.0
- //Type mkPredicateSubtype(Expr lambda, Expr witness)
- // throw(TypeCheckingException);
-
/** Get the type of an expression */
Type getType(Expr e, bool check = false)
throw(TypeCheckingException);
}
/** Get this node manager's resource manager */
- ResourceManager* getResourceManager() throw() { return d_resourceManager; }
+ ResourceManager* getResourceManager() { return d_resourceManager; }
/** Get this node manager's statistics registry */
- StatisticsRegistry* getStatisticsRegistry() const throw() {
+ StatisticsRegistry* getStatisticsRegistry() const
+ {
return d_statisticsRegistry;
}
/** A pointer to the options in play */
extern CVC4_THREAD_LOCAL Options* pOptions;
-/** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */
-void cvc4_init() throw(Exception);
+/** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV.
+ * This can throw a CVC4::Exception.
+ */
+void cvc4_init();
/** Shutdown the driver. Frees memory for the signal handlers. */
-void cvc4_shutdown() throw();
-
+void cvc4_shutdown() noexcept;
}/* CVC4::main namespace */
}/* CVC4 namespace */
cnt(0)
{}
- ~PortfolioLemmaOutputChannel() throw() { }
+ ~PortfolioLemmaOutputChannel() {}
void notifyNewLemma(Expr lemma);
};/* class PortfolioLemmaOutputChannel */
VarMap& to,
VarMap& from);
- ~PortfolioLemmaInputChannel() throw() { }
+ ~PortfolioLemmaInputChannel() {}
bool hasNewLemma();
Expr getNewLemma();
}
/** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */
-void cvc4_init() throw(Exception) {
+void cvc4_init()
+{
#ifdef CVC4_DEBUG
LastExceptionBuffer::setCurrent(new LastExceptionBuffer());
#endif
namespace CVC4 {
-bool
-BooleanSimplification::push_back_associative_commute_recursive
- (Node n, std::vector<Node>& buffer, Kind k, Kind notK, bool negateNode)
- throw(AssertionException) {
+bool BooleanSimplification::push_back_associative_commute_recursive(
+ Node n, std::vector<Node>& buffer, Kind k, Kind notK, bool negateNode)
+{
Node::iterator i = n.begin(), end = n.end();
for(; i != end; ++i){
Node child = *i;
BooleanSimplification() CVC4_UNDEFINED;
BooleanSimplification(const BooleanSimplification&) CVC4_UNDEFINED;
- static bool push_back_associative_commute_recursive
- (Node n, std::vector<Node>& buffer, Kind k, Kind notK, bool negateNode)
- throw(AssertionException) CVC4_WARN_UNUSED_RESULT;
-
-public:
+ static bool push_back_associative_commute_recursive(
+ Node n, std::vector<Node>& buffer, Kind k, Kind notK, bool negateNode)
+ CVC4_WARN_UNUSED_RESULT;
+ public:
/**
* The threshold for removing duplicates. (See removeDuplicates().)
*/
* function is a no-op.
*/
static void removeDuplicates(std::vector<Node>& buffer)
- throw(AssertionException) {
+ {
if(buffer.size() < DUPLICATE_REMOVAL_THRESHOLD) {
std::sort(buffer.begin(), buffer.end());
std::vector<Node>::iterator new_end =
* push_back_associative_commute()), removes duplicates, and returns
* the resulting Node.
*/
- static Node simplifyConflict(Node andNode) throw(AssertionException) {
+ static Node simplifyConflict(Node andNode)
+ {
AssertArgument(!andNode.isNull(), andNode);
AssertArgument(andNode.getKind() == kind::AND, andNode);
* push_back_associative_commute()), removes duplicates, and returns
* the resulting Node.
*/
- static Node simplifyClause(Node orNode) throw(AssertionException) {
+ static Node simplifyClause(Node orNode)
+ {
AssertArgument(!orNode.isNull(), orNode);
AssertArgument(orNode.getKind() == kind::OR, orNode);
* The input doesn't actually have to be Horn, it seems, but that's
* the common case(?), hence the name.
*/
- static Node simplifyHornClause(Node implication) throw(AssertionException) {
+ static Node simplifyHornClause(Node implication)
+ {
AssertArgument(implication.getKind() == kind::IMPLIES, implication);
TNode left = implication[0];
* this if e.g. you're simplifying the (OR...) in (NOT (OR...)),
* intending to make the result an AND.
*/
- static inline void
- push_back_associative_commute(Node n, std::vector<Node>& buffer,
- Kind k, Kind notK, bool negateChildren = false)
- throw(AssertionException) {
+ static inline void push_back_associative_commute(Node n,
+ std::vector<Node>& buffer,
+ Kind k,
+ Kind notK,
+ bool negateChildren = false)
+ {
AssertArgument(buffer.empty(), buffer);
AssertArgument(!n.isNull(), n);
AssertArgument(k != kind::UNDEFINED_KIND && k != kind::NULL_EXPR, k);
*
* @param n the node to negate (cannot be the null node)
*/
- static Node negate(TNode n) throw(AssertionException) {
+ static Node negate(TNode n)
+ {
AssertArgument(!n.isNull(), n);
bool polarity = true;
*
* @param e the Expr to negate (cannot be the null Expr)
*/
- static Expr negate(Expr e) throw(AssertionException) {
+ static Expr negate(Expr e)
+ {
ExprManagerScope ems(e);
return negate(Node::fromExpr(e)).toExpr();
}
* Simplify an OR, AND, or IMPLIES. This function is the identity
* for all other kinds.
*/
- inline static Node simplify(TNode n) throw(AssertionException) {
+ inline static Node simplify(TNode n)
+ {
switch(n.getKind()) {
case kind::AND:
return simplifyConflict(n);
class CVC4_PUBLIC LemmaInputChannel {
public:
- virtual ~LemmaInputChannel() throw() { }
+ virtual ~LemmaInputChannel() {}
- virtual bool hasNewLemma() = 0;
- virtual Expr getNewLemma() = 0;
+ virtual bool hasNewLemma() = 0;
+ virtual Expr getNewLemma() = 0;
};/* class LemmaOutputChannel */
*/
class CVC4_PUBLIC LemmaOutputChannel {
public:
- virtual ~LemmaOutputChannel() throw() { }
+ virtual ~LemmaOutputChannel() {}
- /**
- * Notifies this output channel that there's a new lemma.
- * The lemma may or may not be in CNF.
- */
- virtual void notifyNewLemma(Expr lemma) = 0;
+ /**
+ * Notifies this output channel that there's a new lemma.
+ * The lemma may or may not be in CNF.
+ */
+ virtual void notifyNewLemma(Expr lemma) = 0;
};/* class LemmaOutputChannel */
}/* CVC4 namespace */