stop libcall loop unroller when the state becomes UB
MODIFY
ir/instr.cpp
ir/instr.cpp
@@ -75,7 +75,7 @@ struct LoopLikeFunctionApproximator {
if (is_last)
s.addPre(prefix().implies(!continue_i));
- if (is_last || continue_i.isFalse() || ub.isFalse())
+ if (is_last || continue_i.isFalse() || ub.isFalse() || !s.isViablePath())
return { std::move(res_i), std::move(np_i), std::move(ub) };
prefix.add(continue_i);

MODIFY
ir/state.h
ir/state.h
@@ -213,6 +213,7 @@ public:
void addUB(const smt::expr &ub);
void addUB(smt::AndExpr &&ubs);
void addNoReturn(const smt::expr &cond);
+ bool isViablePath() const { return domain.UB; }
std::vector<StateValue>
addFnCall(const std::string &name, std::vector<StateValue> &&inputs,

stop libcall loop unroller when the state becomes UB