20 if(instruction->incoming_edges.size() != 1)
25 in_t->is_goto() && !
in_t->is_backwards_goto() &&
26 in_t->condition().is_true())
65 !it->source_location().is_nil() &&
66 !it->source_location().get_file().empty() &&
67 !it->source_location().get_line().empty() &&
68 !it->source_location().is_built_in() &&
72 block_info.source_location = it->source_location();
78 it->is_goto() || it->is_function_call() || it->is_assume();
80 it->is_goto() || it->is_function_call();
131 <<
" (bytecode-index already instrumented)"
139 << it->location_number <<
" " << function_id
159 const irep_idt &line = location.get_line();
166 instruction.
code().visit_pre([&](
const exprt &expr) {
168 if(!location.get_function().empty())
169 add_location(location);
178 const auto &location = it->source_location();
197 const auto &
bytecode_index = t->source_location().get_java_bytecode_index();
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
cover_basic_blocks_javat(const goto_programt &_goto_program)
std::vector< goto_programt::const_targett > block_infos
const source_locationt & source_location_of(std::size_t block_number) const override
std::vector< source_locationt > block_locations
void output(std::ostream &out) const override
Outputs the list of blocks.
std::size_t block_of(goto_programt::const_targett t) const override
const source_linest & source_lines_of(std::size_t block_number) const override
std::vector< source_linest > block_source_lines
optionalt< goto_programt::const_targett > instruction_of(std::size_t block_number) const override
std::unordered_map< irep_idt, std::size_t > index_to_block
void output(std::ostream &out) const override
Outputs the list of blocks.
cover_basic_blockst(const goto_programt &goto_program)
static optionalt< std::size_t > continuation_of_block(const goto_programt::const_targett &instruction, block_mapt &block_map)
If this block is a continuation of a previous block through unconditional forward gotos,...
optionalt< goto_programt::const_targett > instruction_of(std::size_t block_nr) const override
std::map< goto_programt::const_targett, std::size_t, goto_programt::target_less_than > block_mapt
std::vector< block_infot > block_infos
map block numbers to block information
void report_block_anomalies(const irep_idt &function_id, const goto_programt &goto_program, message_handlert &message_handler) override
Output warnings about ignored blocks.
const source_linest & source_lines_of(std::size_t block_nr) const override
std::size_t block_of(goto_programt::const_targett t) const override
static void add_block_lines(cover_basic_blockst::block_infot &block, const goto_programt::instructiont &instruction)
Adds the lines which instruction spans to block.
const source_locationt & source_location_of(std::size_t block_nr) const override
block_mapt block_map
map program locations to block numbers
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
const source_locationt & source_location() const
This class represents an instruction in the GOTO intermediate representation.
const goto_instruction_codet & code() const
Get the code represented by this instruction.
const source_locationt & source_location() const
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
instructionst::iterator targett
instructionst::const_iterator const_targett
source_locationt source_location
Class that provides messages with a built-in verbosity 'level'.
mstreamt & warning() const
void insert(const source_locationt &loc)
Insert a line (a source location) into the set of lines.
static const source_locationt & nil()
Basic blocks detection for Coverage Instrumentation.
#define forall_goto_program_instructions(it, program)
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
source_linest source_lines
the set of source code lines belonging to this block