From 1fb8416fc4a2053d91ec59aa0871d0174578f5d6 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Mon, 4 May 2015 11:27:04 -0400 Subject: [PATCH] fix(contractor/contractor_ibex.cpp): remove ibex::EmptyBoxException close #88 --- src/contractor/contractor_ibex.cpp | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/contractor/contractor_ibex.cpp b/src/contractor/contractor_ibex.cpp index b6030cece..7cc34821c 100644 --- a/src/contractor/contractor_ibex.cpp +++ b/src/contractor/contractor_ibex.cpp @@ -166,18 +166,12 @@ box contractor_ibex_fwdbwd::prune(box b, SMTConfig & config) const { DREAL_LOG_DEBUG << m_var_array[i].name << " = " << iv[i]; } // Prune on iv - try { - DREAL_LOG_DEBUG << "Before pruning using ibex_fwdbwd(" << *m_numctr << ")"; - DREAL_LOG_DEBUG << b; - DREAL_LOG_DEBUG << "ibex interval = " << iv << " (before)"; - DREAL_LOG_DEBUG << "function = " << m_ctc->f; - DREAL_LOG_DEBUG << "domain = " << m_ctc->d; - m_ctc->contract(iv); - } catch(ibex::EmptyBoxException& e) { - // Do nothing - // TODO(soonhok): we will remove this try-catch block once - // IBEX-team eliminate EmptyBoxException - } + DREAL_LOG_DEBUG << "Before pruning using ibex_fwdbwd(" << *m_numctr << ")"; + DREAL_LOG_DEBUG << b; + DREAL_LOG_DEBUG << "ibex interval = " << iv << " (before)"; + DREAL_LOG_DEBUG << "function = " << m_ctc->f; + DREAL_LOG_DEBUG << "domain = " << m_ctc->d; + m_ctc->contract(iv); DREAL_LOG_DEBUG << "ibex interval = " << iv << " (after)"; if (iv.is_empty()) { b.set_empty(); @@ -272,14 +266,8 @@ box contractor_ibex_polytope::prune(box b, SMTConfig & config) const { if (!m_ctc) { init(b); } thread_local static box old_box(b); old_box = b; - try { - m_ctc->contract(b.get_values()); - } catch(ibex::EmptyBoxException&) { - // Do nothing - // TODO(soonhok): we will remove this try-catch block once - // IBEX-team eliminate EmptyBoxException - assert(b.is_empty()); - } + m_ctc->contract(b.get_values()); + // setup output vector diff_dims = b.diff_dims(old_box); m_output = ibex::BitSet::empty(old_box.size());