Skip to content

Commit

Permalink
port to inherit from std::exception
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Nov 4, 2024
1 parent 407bad3 commit a38bf3e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/tactic/arith/add_bounds_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Revision History:
#include "ast/simplifiers/bound_manager.h"

struct is_unbounded_proc {
struct found {};
struct found : public std::exception {};
arith_util m_util;
bound_manager & m_bm;

Expand Down
4 changes: 2 additions & 2 deletions src/tactic/arith/pb2bv_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Module Name:

class pb2bv_tactic : public tactic {
public:
struct non_pb { expr* e; non_pb(expr* e) : e(e) {}};
struct non_pb : public std::exception { expr* e; non_pb(expr* e) : e(e) {}};

struct only_01_visitor {
typedef rational numeral;
Expand Down Expand Up @@ -167,7 +167,7 @@ class pb2bv_tactic : public tactic {

enum constraint_kind { EQ, GE, LE };

struct failed {};
struct failed : public std::exception {};

struct visitor {
imp & m_owner;
Expand Down
10 changes: 5 additions & 5 deletions src/tactic/arith/probe_arith.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class arith_bw_probe : public probe {
};

struct has_nlmul {
struct found {};
struct found : public std::exception {};
ast_manager& m;
arith_util a;
has_nlmul(ast_manager& m):m(m), a(m) {}
Expand Down Expand Up @@ -185,7 +185,7 @@ probe * mk_arith_max_bw_probe() {

namespace {
struct is_non_qflira_functor {
struct found {};
struct found : public std::exception {};
ast_manager & m;
arith_util u;
bool m_int;
Expand Down Expand Up @@ -240,7 +240,7 @@ struct is_non_qflira_functor {
};

struct is_non_qfauflira_functor {
struct found {};
struct found : public std::exception {};
ast_manager & m;
arith_util m_arith_util;
array_util m_array_util;
Expand Down Expand Up @@ -427,7 +427,7 @@ probe * mk_is_mip_probe() {
namespace {

struct is_non_nira_functor {
struct found {};
struct found : public std::exception {};
ast_manager & m;
arith_util u;
bool m_int;
Expand Down Expand Up @@ -572,7 +572,7 @@ static bool is_lira(goal const & g) {


struct is_non_qfufnra_functor {
struct found {};
struct found : public std::exception {};
ast_manager & m;
arith_util u;
bool m_has_nonlinear;
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/fpa/qffp_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Module Name:


struct is_non_fp_qfnra_predicate {
struct found {};
struct found : public std::exception {};
ast_manager & m;
bv_util bu;
fpa_util fu;
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/fpa/qffplra_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tactic * mk_qffplra_tactic(ast_manager & m, params_ref const & p) {
}

struct is_fpa_function {
struct found {};
struct found : public std::exception {};
ast_manager & m;
fpa_util fu;

Expand Down
2 changes: 1 addition & 1 deletion src/tactic/goal_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Revision History:
#include "tactic/goal.h"

struct has_term_ite_functor {
struct found {};
struct found : public std::exception {};
ast_manager & m;
has_term_ite_functor(ast_manager & _m):m(_m) {}
void operator()(var *) {}
Expand Down
12 changes: 6 additions & 6 deletions src/tactic/probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ probe * mk_div(probe * p1, probe * p2) {
}

struct is_non_propositional_predicate {
struct found {};
struct found : public std::exception {};
ast_manager & m;

is_non_propositional_predicate(ast_manager & _m):m(_m) {}
Expand All @@ -270,7 +270,7 @@ struct is_non_propositional_predicate {
};

struct is_non_qfbv_predicate {
struct found {};
struct found : public std::exception {};
ast_manager & m;
bv_util u;

Expand Down Expand Up @@ -325,7 +325,7 @@ probe * mk_is_qfbv_probe() {
}

struct is_non_qfaufbv_predicate {
struct found {};
struct found : public std::exception {};
ast_manager & m;
bv_util m_bv_util;
array_util m_array_util;
Expand Down Expand Up @@ -364,7 +364,7 @@ probe * mk_is_qfaufbv_probe() {


struct is_non_qfufbv_predicate {
struct found {};
struct found : public std::exception {};
ast_manager & m;
bv_util m_bv_util;

Expand Down Expand Up @@ -503,7 +503,7 @@ probe * mk_produce_unsat_cores_probe() {
}

struct has_pattern_probe : public probe {
struct found {};
struct found : public std::exception {};

struct proc {
void operator()(var * n) {}
Expand Down Expand Up @@ -536,7 +536,7 @@ probe * mk_has_pattern_probe() {


struct has_quantifier_probe : public probe {
struct found {};
struct found : public std::exception {};

struct proc {
void operator()(var * n) {}
Expand Down

0 comments on commit a38bf3e

Please sign in to comment.