16 static bool by_length(
const std::string &lhs,
const std::string &rhs)
18 if(lhs.size() < rhs.size())
20 if(lhs.size() > rhs.size())
30 std::vector<std::string> output_values;
31 for(
const auto &value :
values)
33 std::ostringstream ss;
34 value->output(ss, ai, ns);
35 output_values.emplace_back(ss.str());
37 std::sort(output_values.begin(), output_values.end(),
by_length);
39 join_strings(out, output_values.begin(), output_values.end(),
", ");
47 std::dynamic_pointer_cast<const abstract_value_objectt>(
first())
50 if(initial.is_boolean() &&
values.size() == 2)
53 exprt lower_expr = initial.get_lower();
54 exprt upper_expr = initial.get_upper();
56 for(
const auto &value :
values)
59 std::dynamic_pointer_cast<const abstract_value_objectt>(value);
60 const auto &value_expr = v->to_interval();
static bool by_length(const std::string &lhs, const std::string &rhs)
an unordered set of value objects
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const
abstract_object_pointert first() const
constant_interval_exprt to_interval() const
Calculate the set of values as an interval.
This is the basic interface of the abstract interpreter with default implementations of the core func...
Represents an interval of values.
static exprt get_max(const exprt &a, const exprt &b)
static exprt get_min(const exprt &a, const exprt &b)
Base class for all expressions.
The Boolean constant false.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The Boolean constant true.
#define PRECONDITION(CONDITION)
Stream & join_strings(Stream &&os, const It b, const It e, const Delimiter &delimiter, TransformFunc &&transform_func)
Prints items to an stream, separated by a constant delimiter.