|
GCC Middle and Back End API Reference
|
#include <symbolic-bit-contents.h>


Public Types | |
| enum class | kind { uninit , untracked , zero , baseline , conjured , named_test , concrete_overlay , symbolic_overlay , offset } |
| using | id_t = unsigned |
Static Public Member Functions | |
| static const bit_contents * | can_merge_p (const bit_contents &bit_contents_a, const bit_contents &bit_contents_b, tree type, model_merger *merger) |
| static int | cmp_ids (const symbolic::node *s1, const symbolic::node *s2) |
| static int | cmp (const symbolic::node &s1, const symbolic::node &s2) |
| static int | cmp_ptr_ptr (const void *, const void *) |
Protected Member Functions | |
| bit_contents (complexity c, node_manager &node_mgr) | |
| std::unique_ptr< json::object > | make_json_obj (const char *type_name) const |
Private Member Functions | |
| virtual void | print_dump_widget_label (pretty_printer *pp) const =0 |
| virtual void | add_dump_widget_children (text_art::tree_widget &, node_dump_state &nds) const =0 |
Private Attributes | |
| node_manager & | m_node_mgr |
| complexity | m_complexity |
| id_t | m_id |
Abstract base class for representing a total function from
symbolic bit ranges to symbolic bit vectors i.e. the contents
of a region of memory.
e.g. - "what is the value of bytes [8..16)?"
- "what is the value of bit[100000]?"
- "what is the value of byte[x]?" (for symbolic x)
It's permissable to get/set things at negative offsets e.g. for the
case of negative offsets from a symbolic pointer.
Any range checking happens at a higher level.
This is purely-functional: setters return a reference to a bit_contents
instance holding the update.
The class hierarchy looks like this (using indentation to show
inheritance):
symbolic::bit_contents (abstract)
symbolic::uniform_bit_contents (abstract): something that ignores the input range
symbolic::uninit_contents (concrete singleton): uninitialized everywhere
symbolic::untracked_bit_contents (concrete): unknown everywhere, has a set of possibly-live values
symbolic::zero_contents (concrete singleton): zero everywhere
symbolic::unfoldable_bit_contents (abstract): unfoldable; hands out bit_vector_from_ubc instances
symbolic::baseline_bit_contents (concrete): the initial contents of regions without known sizes
symbolic::conjured_bit_contents (concrete): a bit_contents arising from a stmt
symbolic::named_test_bit_contents (concrete): for use in selftests
symbolic::bit_overlay (abstract): a baseline overridden at some places
symbolic::concrete_bit_overlay (concrete)
symbolic::symbolic_bit_overlay (concrete)
symbolic::offset_bit_contents (concrete): offsets the coordinates of another bit_contents
|
inherited |
|
strong |
|
inlineprotected |
References m_node_mgr.
Referenced by ana::symbolic::bit_overlay::bit_overlay(), bits_live_p(), can_merge_p(), ana::symbolic::offset_bit_contents::for_each_value(), get_representative_path_vars(), ana::symbolic::offset_bit_contents::get_representative_path_vars(), ana::symbolic::offset_bit_contents::maybe_fold_offset(), poison_any_pointers_to_descendents(), ana::symbolic::offset_bit_contents::poison_any_pointers_to_descendents(), set_bits(), set_bits(), set_bytes(), set_bytes(), ana::symbolic::unfoldable_bit_contents::unfoldable_bit_contents(), and ana::symbolic::uniform_bit_contents::uniform_bit_contents().
|
pure virtualinherited |
Implemented in ana::alloca_region, ana::asm_output_svalue, ana::binop_svalue, ana::bit_range_region, ana::cast_region, ana::code_region, ana::const_fn_result_svalue, ana::constant_svalue, ana::decl_region, ana::element_region, ana::errno_region, ana::field_region, ana::frame_region, ana::function_region, ana::globals_region, ana::heap_allocated_region, ana::heap_region, ana::initial_svalue, ana::label_region, ana::offset_region, ana::placeholder_svalue, ana::pointer_svalue, ana::poisoned_svalue, ana::private_region, ana::root_region, ana::setjmp_svalue, ana::sized_region, ana::stack_region, ana::string_region, ana::svalue_from_bit_vector, ana::symbolic::baseline_bit_contents, ana::symbolic::bit_vector_from_svalue, ana::symbolic::bit_vector_from_ubc, ana::symbolic::bits_from_bytes_scalar, ana::symbolic::concat_bit_vector, ana::symbolic::concrete_bit_overlay, ana::symbolic::concrete_scalar< ConcreteValueType >, ana::symbolic::conjured_bit_contents, ana::symbolic::conjured_bit_vector, ana::symbolic::cropped_bit_vector, ana::symbolic::empty_bit_vector, ana::symbolic::offset_bit_contents, ana::symbolic::poisoned_bit_vector, ana::symbolic::product< ConcreteValueType >, ana::symbolic::repeated_bit_vector, ana::symbolic::scalar_from_svalue< ConcreteValueType >, ana::symbolic::sum< ConcreteValueType >, ana::symbolic::symbolic_bit_overlay, ana::symbolic::tristate_bit_vector, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, ana::symbolic::zero_contents, ana::symbolic_region, ana::thread_local_region, ana::unaryop_svalue, ana::unknown_region, ana::unknown_svalue, ana::unmergeable_svalue, ana::var_arg_region, and ana::widening_svalue.
Referenced by infinite_recursion_diagnostic::expr_uses_conjured_value_p().
|
privatepure virtualinherited |
Implemented in ana::asm_output_svalue, ana::binop_svalue, ana::const_fn_result_svalue, ana::initial_svalue, ana::pointer_svalue, ana::region, ana::setjmp_svalue, ana::svalue, ana::svalue_from_bit_vector, ana::symbolic::baseline_bit_contents, ana::symbolic::bit_vector_from_svalue, ana::symbolic::bit_vector_from_ubc, ana::symbolic::bits_from_bytes_scalar, ana::symbolic::concat_bit_vector, ana::symbolic::concrete_bit_overlay, ana::symbolic::concrete_scalar< ConcreteValueType >, ana::symbolic::conjured_bit_contents, ana::symbolic::conjured_bit_vector, ana::symbolic::cropped_bit_vector, ana::symbolic::empty_bit_vector, ana::symbolic::offset_bit_contents, ana::symbolic::poisoned_bit_vector, ana::symbolic::product< ConcreteValueType >, ana::symbolic::repeated_bit_vector, ana::symbolic::scalar_from_svalue< ConcreteValueType >, ana::symbolic::sum< ConcreteValueType >, ana::symbolic::symbolic_bit_overlay, ana::symbolic::tristate_bit_vector, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, ana::symbolic::zero_contents, ana::unaryop_svalue, ana::unmergeable_svalue, and ana::widening_svalue.
|
pure virtual |
|
static |
References bit_contents().
|
inlinestaticinherited |
References get_id().
|
staticinherited |
|
staticinherited |
|
inlinevirtual |
Reimplemented in ana::symbolic::conjured_bit_contents.
|
inherited |
|
inherited |
|
inherited |
|
inlinevirtual |
Reimplemented in ana::symbolic::baseline_bit_contents.
|
inlinevirtual |
Reimplemented in ana::symbolic::concrete_bit_overlay.
|
inlinevirtual |
Reimplemented in ana::symbolic::conjured_bit_contents.
|
inlinevirtual |
Reimplemented in ana::symbolic::offset_bit_contents.
|
inlinevirtual |
Reimplemented in ana::symbolic::symbolic_bit_overlay.
|
inlinevirtual |
Reimplemented in ana::symbolic::uniform_bit_contents.
|
inherited |
|
pure virtual |
|
inlineoverridevirtual |
Reimplemented from ana::symbolic::node.
|
inline |
References ana::symbolic::node_manager::get_bit_contents_manager(), and m_node_mgr.
|
inline |
References ana::symbolic::node_manager::get_bit_vector_manager(), and m_node_mgr.
| const bit_vector & ana::symbolic::bit_contents::get_bits | ( | const concrete_bit_range & | bit_range | ) | const |
|
pure virtual |
|
inline |
References get_bytes().
| const bit_vector & ana::symbolic::bit_contents::get_bytes | ( | const concrete_byte_range & | byte_range | ) | const |
Referenced by get_byte().
| const bit_vector & ana::symbolic::bit_contents::get_bytes | ( | const symbolic_byte_range & | byte_range | ) | const |
|
inlineinherited |
References m_complexity.
Referenced by ana::binop_svalue::binop_svalue(), ana::pointer_svalue::pointer_svalue(), and ana::widening_svalue::widening_svalue().
|
pure virtual |
Implemented in ana::symbolic::baseline_bit_contents, ana::symbolic::concrete_bit_overlay, ana::symbolic::conjured_bit_contents, ana::symbolic::offset_bit_contents, ana::symbolic::symbolic_bit_overlay, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, and ana::symbolic::zero_contents.
Referenced by contains_unknown_p().
| value_set ana::symbolic::bit_contents::get_maybe_live_values | ( | ) | const |
|
inline |
References m_node_mgr.
Referenced by ana::symbolic::bit_overlay::bit_overlay().
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
pure virtualinherited |
Implemented in ana::alloca_region, ana::asm_output_svalue, ana::binop_svalue, ana::bit_range_region, ana::cast_region, ana::code_region, ana::const_fn_result_svalue, ana::constant_svalue, ana::decl_region, ana::element_region, ana::errno_region, ana::field_region, ana::frame_region, ana::function_region, ana::globals_region, ana::heap_allocated_region, ana::heap_region, ana::initial_svalue, ana::label_region, ana::offset_region, ana::placeholder_svalue, ana::pointer_svalue, ana::poisoned_svalue, ana::private_region, ana::root_region, ana::setjmp_svalue, ana::sized_region, ana::stack_region, ana::string_region, ana::svalue_from_bit_vector, ana::symbolic::baseline_bit_contents, ana::symbolic::bit_vector_from_svalue, ana::symbolic::bit_vector_from_ubc, ana::symbolic::bits_from_bytes_scalar, ana::symbolic::concat_bit_vector, ana::symbolic::concrete_bit_overlay, ana::symbolic::concrete_scalar< ConcreteValueType >, ana::symbolic::conjured_bit_contents, ana::symbolic::conjured_bit_vector, ana::symbolic::cropped_bit_vector, ana::symbolic::empty_bit_vector, ana::symbolic::offset_bit_contents, ana::symbolic::poisoned_bit_vector, ana::symbolic::product< ConcreteValueType >, ana::symbolic::repeated_bit_vector, ana::symbolic::scalar_from_svalue< ConcreteValueType >, ana::symbolic::sum< ConcreteValueType >, ana::symbolic::symbolic_bit_overlay, ana::symbolic::tristate_bit_vector, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, ana::symbolic::zero_contents, ana::symbolic_region, ana::thread_local_region, ana::unaryop_svalue, ana::unknown_region, ana::unknown_svalue, ana::unmergeable_svalue, ana::var_arg_region, and ana::widening_svalue.
|
inlinevirtual |
Reimplemented in ana::symbolic::offset_bit_contents, and ana::symbolic::uniform_bit_contents.
|
pure virtual |
Implemented in ana::symbolic::baseline_bit_contents, ana::symbolic::concrete_bit_overlay, ana::symbolic::conjured_bit_contents, ana::symbolic::offset_bit_contents, ana::symbolic::symbolic_bit_overlay, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, and ana::symbolic::zero_contents.
References bit_contents().
|
privatepure virtualinherited |
Implemented in ana::region, ana::svalue, ana::symbolic::baseline_bit_contents, ana::symbolic::bit_vector, ana::symbolic::concrete_bit_overlay, ana::symbolic::conjured_bit_contents, ana::symbolic::offset_bit_contents, ana::symbolic::scalar< ConcreteValueType >, ana::symbolic::scalar< ana::integer >, ana::symbolic::scalar< integer >, ana::symbolic::scalar< integer_with_unit< units::bit > >, ana::symbolic::scalar< integer_with_unit< units::byte > >, ana::symbolic::symbolic_bit_overlay, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, and ana::symbolic::zero_contents.
|
pure virtual |
Implemented in ana::symbolic::baseline_bit_contents, ana::symbolic::concrete_bit_overlay, ana::symbolic::conjured_bit_contents, ana::symbolic::offset_bit_contents, ana::symbolic::symbolic_bit_overlay, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, and ana::symbolic::zero_contents.
|
pure virtual |
| const bit_contents & ana::symbolic::bit_contents::set_bits | ( | const concrete_bit_range & | bit_range, |
| const bit_vector & | bv, | ||
| uncertainty_t * | uncertainty ) const |
References bit_contents().
| const bit_contents & ana::symbolic::bit_contents::set_bits | ( | const symbolic_bit_range & | bit_range, |
| const bit_vector & | bv, | ||
| uncertainty_t * | uncertainty ) const |
References bit_contents().
| const bit_contents & ana::symbolic::bit_contents::set_byte | ( | integer_with_unit< units::byte > | byte_offset, |
| uint8_t | value, | ||
| uncertainty_t * | uncertainty ) const |
| const bit_contents & ana::symbolic::bit_contents::set_bytes | ( | const concrete_byte_range & | byte_range, |
| const bit_vector & | bv, | ||
| uncertainty_t * | uncertainty ) const |
References bit_contents().
| const bit_contents & ana::symbolic::bit_contents::set_bytes | ( | const symbolic_byte_range & | byte_range, |
| const bit_vector & | bv, | ||
| uncertainty_t * | uncertainty ) const |
References bit_contents().
|
inherited |
|
pure virtualinherited |
Implemented in ana::alloca_region, ana::asm_output_svalue, ana::binop_svalue, ana::bit_range_region, ana::cast_region, ana::code_region, ana::const_fn_result_svalue, ana::constant_svalue, ana::decl_region, ana::element_region, ana::errno_region, ana::field_region, ana::frame_region, ana::function_region, ana::globals_region, ana::heap_allocated_region, ana::heap_region, ana::initial_svalue, ana::label_region, ana::offset_region, ana::placeholder_svalue, ana::pointer_svalue, ana::poisoned_svalue, ana::private_region, ana::root_region, ana::setjmp_svalue, ana::sized_region, ana::stack_region, ana::string_region, ana::svalue_from_bit_vector, ana::symbolic::baseline_bit_contents, ana::symbolic::bit_vector_from_svalue, ana::symbolic::bit_vector_from_ubc, ana::symbolic::bits_from_bytes_scalar, ana::symbolic::concat_bit_vector, ana::symbolic::concrete_bit_overlay, ana::symbolic::concrete_scalar< ConcreteValueType >, ana::symbolic::conjured_bit_contents, ana::symbolic::conjured_bit_vector, ana::symbolic::cropped_bit_vector, ana::symbolic::empty_bit_vector, ana::symbolic::offset_bit_contents, ana::symbolic::poisoned_bit_vector, ana::symbolic::product< ConcreteValueType >, ana::symbolic::repeated_bit_vector, ana::symbolic::scalar_from_svalue< ConcreteValueType >, ana::symbolic::sum< ConcreteValueType >, ana::symbolic::symbolic_bit_overlay, ana::symbolic::tristate_bit_vector, ana::symbolic::uninit_contents, ana::symbolic::untracked_bit_contents, ana::symbolic::zero_contents, ana::symbolic_region, ana::thread_local_region, ana::unaryop_svalue, ana::unknown_region, ana::unknown_svalue, ana::unmergeable_svalue, ana::var_arg_region, and ana::widening_svalue.
|
privateinherited |
Referenced by get_complexity(), and node().
|
private |
Referenced by bit_contents(), get_bit_contents_manager(), get_bit_vector_manager(), and get_node_mgr().