summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2017-09-14 10:09:40 -0700
committerAina Niemetz <aina.niemetz@gmail.com>2017-09-14 10:09:40 -0700
commite4fc6c7b57668f18ce087c45e001c101375c20ea (patch)
treeac305beac6241b6ba70cd1623b09d876ef499a29 /src/smt
parent4a014a12d7f72c4f73dfbee8c9f62868e920bc15 (diff)
Simplifying the throw specifier of SmtEngine::checkSat and related calls to CVC4::Exception. (#1085)
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp18
-rw-r--r--src/smt/smt_engine.h13
2 files changed, 17 insertions, 14 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index af4510ff1..b1a0a1acd 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -4383,14 +4383,14 @@ void SmtEngine::ensureBoolean(const Expr& e) throw(TypeCheckingException) {
}
}
-Result SmtEngine::checkSat(const Expr& ex, bool inUnsatCore) throw(TypeCheckingException, ModalException, LogicException) {
- return checkSatisfiability( ex, inUnsatCore, false );
-}/* SmtEngine::checkSat() */
+Result SmtEngine::checkSat(const Expr& ex, bool inUnsatCore) throw(Exception) {
+ return checkSatisfiability(ex, inUnsatCore, false);
+} /* SmtEngine::checkSat() */
-Result SmtEngine::query(const Expr& ex, bool inUnsatCore) throw(TypeCheckingException, ModalException, LogicException) {
+Result SmtEngine::query(const Expr& ex, bool inUnsatCore) throw(Exception) {
Assert(!ex.isNull());
- return checkSatisfiability( ex, inUnsatCore, true );
-}/* SmtEngine::query() */
+ return checkSatisfiability(ex, inUnsatCore, true);
+} /* SmtEngine::query() */
Result SmtEngine::checkSatisfiability(const Expr& ex, bool inUnsatCore, bool isQuery) {
try {
@@ -4497,8 +4497,7 @@ Result SmtEngine::checkSatisfiability(const Expr& ex, bool inUnsatCore, bool isQ
}
}
-
-Result SmtEngine::checkSynth(const Expr& e) throw(TypeCheckingException, ModalException, LogicException) {
+Result SmtEngine::checkSynth(const Expr& e) throw(Exception) {
SmtScope smts(this);
Trace("smt") << "Check synth: " << e << std::endl;
Trace("smt-synth") << "Check synthesis conjecture: " << e << std::endl;
@@ -5207,7 +5206,8 @@ void SmtEngine::printSynthSolution( std::ostream& out ) {
}
}
-Expr SmtEngine::doQuantifierElimination(const Expr& e, bool doFull, bool strict) throw(TypeCheckingException, ModalException, LogicException) {
+Expr SmtEngine::doQuantifierElimination(const Expr& e, bool doFull,
+ bool strict) throw(Exception) {
SmtScope smts(this);
if(!d_logic.isPure(THEORY_ARITH) && strict){
Warning() << "Unexpected logic for quantifier elimination " << d_logic << endl;
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index ed265e2b8..735364db8 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -462,19 +462,20 @@ public:
* of assertions by asserting the query expression's negation and
* calling check(). Returns valid, invalid, or unknown result.
*/
- Result query(const Expr& e, bool inUnsatCore = true) throw(TypeCheckingException, ModalException, LogicException);
+ Result query(const Expr& e, bool inUnsatCore = true) throw(Exception);
/**
* Assert a formula (if provided) to the current context and call
* check(). Returns sat, unsat, or unknown result.
*/
- Result checkSat(const Expr& e = Expr(), bool inUnsatCore = true) throw(TypeCheckingException, ModalException, LogicException);
+ Result checkSat(const Expr& e = Expr(),
+ bool inUnsatCore = true) throw(Exception);
/**
* Assert a synthesis conjecture to the current context and call
* check(). Returns sat, unsat, or unknown result.
*/
- Result checkSynth(const Expr& e) throw(TypeCheckingException, ModalException, LogicException);
+ Result checkSynth(const Expr& e) throw(Exception);
/**
* Simplify a formula without doing "much" work. Does not involve
@@ -536,9 +537,11 @@ public:
void printSynthSolution( std::ostream& out );
/**
- * Do quantifier elimination, doFull false means just output one disjunct, strict is whether to output warnings.
+ * Do quantifier elimination, doFull false means just output one disjunct,
+ * strict is whether to output warnings.
*/
- Expr doQuantifierElimination(const Expr& e, bool doFull, bool strict=true) throw(TypeCheckingException, ModalException, LogicException);
+ Expr doQuantifierElimination(const Expr& e, bool doFull,
+ bool strict = true) throw(Exception);
/**
* Get list of quantified formulas that were instantiated
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback