feat(kernel/normalizer): let normalizer ignore 'undefined' constants

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-12-24 20:54:15 -08:00
parent 75cf751959
commit 1a0f0c1609

View file

@ -202,10 +202,10 @@ class normalizer::imp {
r = lookup(s, var_idx(a)); r = lookup(s, var_idx(a));
break; break;
case expr_kind::Constant: { case expr_kind::Constant: {
object const & obj = env()->get_object(const_name(a)); optional<object> obj = env()->find_object(const_name(a));
if (should_unfold(obj, m_unfold_opaque)) { if (obj && should_unfold(*obj, m_unfold_opaque)) {
freset<cache> reset(m_cache); freset<cache> reset(m_cache);
r = normalize(obj.get_value(), value_stack(), 0); r = normalize(obj->get_value(), value_stack(), 0);
} else { } else {
r = a; r = a;
} }