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.
*/
bool is_def_eq_args(expr t, expr s, context & c, delayed_justification & jst) {
try {
while (is_app(t) && is_app(s)) {
if (!is_def_eq(app_arg(t), app_arg(s), c, jst))
return false;
t = app_fn(t);
s = app_fn(s);
}
return !is_app(t) && !is_app(s);
} catch (add_cnstr_exception &) {
return false;
while (is_app(t) && is_app(s)) {
if (!is_def_eq(app_arg(t), app_arg(s), c, jst))
return false;
t = app_fn(t);
s = app_fn(s);
}
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) */

View file

@ -8,9 +8,6 @@ Author: Leonardo de Moura
#include "kernel/environment.h"
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 {
public:
/** \brief Abstract context that must be provided to a converter object. */