19 auto is_inconsistent =
false;
21 for(
const auto &cex :
cexs)
32 return !is_inconsistent;
40 const auto id = expr.
id();
130 if(
id == ID_constant)
141 "Boolean constant must be either true or false: " + expr.
pretty());
145 "Found a unsupported boolean operator during quick filtering: " +
154 const auto id = expr.
id();
185 "Variable not found in the havoced set or the un-havoced set: " +
196 if(
id == ID_loop_entry)
207 "Variable not found in the havoced set or the un-havoced set: " +
218 if(
id == ID_typecast)
229 if(
id == ID_object_size)
238 "Variable not found in the object size set: " + expr.
pretty());
258 if(
id == ID_pointer_offset)
260 if(expr.
operands()[0].id() != ID_loop_entry)
284 "Variable not found in the offset set: " + expr.
pretty());
300 "Variable not found in the offset set: " + expr.
pretty());
311 if(
id == ID_constant)
342 "Found a unsupported operator during quick filtering: " + expr.
id_string());
Evaluate if an expression is consistent with examples.
const std::vector< cext > & cexs
The set of examples evaluated against.
const exprt & checked_expr
The expression being evaluated.
bool evaluate_rec_bool(const exprt &expr, const cext &cex, const bool is_positive)
mp_integer evaluate_rec_int(const exprt &expr, const cext &cex, const bool is_positive)
Formatted counterexample.
std::unordered_map< exprt, mp_integer, irep_hash > loop_entry_values
std::unordered_map< exprt, mp_integer, irep_hash > loop_entry_offsets
std::unordered_map< exprt, mp_integer, irep_hash > havoced_values
std::unordered_map< exprt, mp_integer, irep_hash > havoced_pointer_offsets
std::unordered_map< exprt, mp_integer, irep_hash > object_sizes
Base class for all expressions.
typet & type()
Return the type of the expression.
The Boolean constant false.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const std::string & id_string() const
const irep_idt & id() const
The Boolean constant true.
#define UNREACHABLE_BECAUSE(REASON)
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
exprt is_positive(const exprt &x)