21#ifndef GCC_ANALYZER_SYMBOLIC_RANGES_H
22#define GCC_ANALYZER_SYMBOLIC_RANGES_H
30template<
typename ConcreteValueType>
60 return range (start_offset, next_offset - start_offset);
67 +
m_size->get_complexity ());
79 ConcreteValueType concrete_one (1);
80 auto &symbolic_one =
m_start_offset->get_mgr ().get_concrete (concrete_one);
87 std::unique_ptr<text_art::tree_widget>
89 const char *prefix =
nullptr)
const;
106 if (
int c = node::cmp (*lhs.m_start_offset, *rhs.m_start_offset))
108 return node::cmp (*lhs.m_size, *rhs.m_size);
122 +
m_size->get_complexity ());
128 std::unique_ptr<json::object>
144 return m_size->is_zero_p ();
152template <
typename ConcreteValueType>
157 if (
auto *concrete_start_offset
159 if (
auto *concrete_size = in.
get_size ().dyn_cast_concrete_scalar ())
162 (concrete_start_offset->get_concrete (),
163 concrete_size->get_concrete ());
169template <
typename ConcreteValueType>
Definition concrete-ranges.h:33
ConcreteValueType get_start_offset() const
Definition concrete-ranges.h:54
ConcreteValueType get_size() const
Definition concrete-ranges.h:57
Definition analyzer-logging.h:36
Definition region-model.h:289
Definition symbolic-nodes.h:502
Definition symbolic-ranges.h:32
range(const scalar< ConcreteValueType > &start_offset, const scalar< ConcreteValueType > &size)
Definition symbolic-ranges.h:42
tristate intersects(const range< ConcreteValueType > &other, const region_model &model) const
bool access_range_contains_p(const range< ConcreteValueType > &other) const
range(const concrete::range< ConcreteValueType > &conc_range, scalar_manager< ConcreteValueType > &mgr)
Definition symbolic-ranges.h:49
bool operator<(const range< ConcreteValueType > &other) const
Definition symbolic-ranges.h:113
void log(const char *label, logger &log) const
static int cmp(const range< ConcreteValueType > &lhs, const range< ConcreteValueType > &rhs)
Definition symbolic-ranges.h:103
std::unique_ptr< json::object > to_json() const
const scalar< integer_with_unit< units::bit > > * m_size
Definition symbolic-ranges.h:149
complexity get_complexity() const
Definition symbolic-ranges.h:119
bool empty_p() const
Definition symbolic-ranges.h:142
const scalar< ConcreteValueType > & get_last_offset() const
Definition symbolic-ranges.h:77
const scalar< integer_with_unit< units::bit > > & get_size() const
Definition symbolic-ranges.h:74
complexity get_children_complexity() const
Definition symbolic-ranges.h:64
const scalar< integer_with_unit< units::bit > > & get_next_offset() const
Definition symbolic-ranges.h:85
range()
Definition symbolic-ranges.h:34
static range from_endpoints(const scalar< ConcreteValueType > &start_offset, const scalar< ConcreteValueType > &next_offset)
Definition symbolic-ranges.h:57
void accept_node_visitor(node_visitor &v) const
void dump_inline_to_pp(pretty_printer *pp) const
const scalar< integer_with_unit< units::bit > > & get_start_offset() const
Definition symbolic-ranges.h:71
std::unique_ptr< text_art::tree_widget > make_dump_widget(node_dump_state &nds, const char *prefix=nullptr) const
bool operator==(const range< ConcreteValueType > &other) const
Definition symbolic-ranges.h:96
const scalar< integer_with_unit< units::bit > > * m_start_offset
Definition symbolic-ranges.h:148
Definition symbolic-scalars.h:660
Definition symbolic-scalars.h:67
Definition pretty-print.h:241
symbolic::range< ConcreteValueType > symbolic_from_concrete(const concrete::range< ConcreteValueType > &conc_range, scalar_manager< concrete_bit_size > &bit_mgr)
Definition symbolic-ranges.h:171
bool concrete_from_symbolic(const symbolic::range< ConcreteValueType > &in, concrete::range< ConcreteValueType > *out)
Definition symbolic-ranges.h:154
Definition access-diagram.h:30
symbolic::range< integer_with_unit< units::bit > > symbolic_bit_range
Definition common.h:124
bool maybe_bytes_from_bits(concrete_bit_range bits, concrete_byte_range *out)
@ other
Definition common.h:535
concrete_bit_range bits_from_bytes(concrete_byte_range bytes)
Definition concrete-ranges.h:121
symbolic::range< integer_with_unit< units::byte > > symbolic_byte_range
Definition common.h:125
Definition complexity.h:31
Definition symbolic-nodes.h:276