refactor(kernel/converter): remove unnecessary exception

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-19 23:05:20 -07:00
parent 05d1832425
commit 2954d10df5
2 changed files with 6 additions and 13 deletions

View file

@ -330,17 +330,13 @@ struct default_converter : public converter {
This method is used to implement an optimization in the method \c is_def_eq. This method is used to implement an optimization in the method \c is_def_eq.
*/ */
bool is_def_eq_args(expr t, expr s, context & c, delayed_justification & jst) { bool is_def_eq_args(expr t, expr s, context & c, delayed_justification & jst) {
try { while (is_app(t) && is_app(s)) {
while (is_app(t) && is_app(s)) { if (!is_def_eq(app_arg(t), app_arg(s), c, jst))
if (!is_def_eq(app_arg(t), app_arg(s), c, jst)) return false;
return false; t = app_fn(t);
t = app_fn(t); s = app_fn(s);
s = app_fn(s);
}
return !is_app(t) && !is_app(s);
} catch (add_cnstr_exception &) {
return false;
} }
return !is_app(t) && !is_app(s);
} }
/** \brief Return true iff t is a constant named f_name or an application of the form (f_name a_1 ... a_k) */ /** \brief Return true iff t is a constant named f_name or an application of the form (f_name a_1 ... a_k) */

View file

@ -8,9 +8,6 @@ Author: Leonardo de Moura
#include "kernel/environment.h" #include "kernel/environment.h"
namespace lean { namespace lean {
/** \brief Auxiliary exception used to sign that constraints cannot be created when \c m_cnstrs_enabled flag is false. */
struct add_cnstr_exception {};
class converter { class converter {
public: public:
/** \brief Abstract context that must be provided to a converter object. */ /** \brief Abstract context that must be provided to a converter object. */