12 #ifndef CPROVER_GOTO_INSTRUMENT_COVER_BASIC_BLOCKS_H 13 #define CPROVER_GOTO_INSTRUMENT_COVER_BASIC_BLOCKS_H 15 #include <unordered_set> 43 virtual void output(std::ostream &out)
const = 0;
54 (void)message_handler;
88 void output(std::ostream &out)
const override;
91 typedef std::map<goto_programt::const_targett, std::size_t>
block_mapt;
104 std::unordered_set<std::size_t>
lines;
151 void output(std::ostream &out)
const override;
154 #endif // CPROVER_GOTO_INSTRUMENT_COVER_BASIC_BLOCKS_H const source_locationt & source_location_of(std::size_t block_number) const override
std::unordered_set< std::size_t > lines
the set of lines belonging to this block
optionalt< goto_programt::const_targett > instruction_of(std::size_t block_nr) const override
virtual ~cover_blocks_baset()=default
cover_basic_blockst(const goto_programt &_goto_program)
optionalt< goto_programt::const_targett > representative_inst
the program location to instrument for this block
const source_locationt & source_location_of(std::size_t block_nr) const override
std::vector< goto_programt::const_targett > block_infos
virtual optionalt< goto_programt::const_targett > instruction_of(std::size_t block_nr) const =0
virtual void report_block_anomalies(const goto_programt &goto_program, message_handlert &message_handler)
Output warnings about ignored blocks.
nonstd::optional< T > optionalt
instructionst::const_iterator const_targett
std::unordered_map< irep_idt, std::size_t > index_to_block
source_locationt source_location
the source location representative for this block (we need a separate copy of source locations becaus...
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,...
virtual std::size_t block_of(goto_programt::const_targett t) const =0
optionalt< goto_programt::const_targett > instruction_of(std::size_t block_number) const override
A generic container class for the GOTO intermediate representation of one function.
std::vector< source_locationt > block_locations
virtual void output(std::ostream &out) const =0
Outputs the list of blocks.
void output(std::ostream &out) const override
Outputs the list of blocks.
void report_block_anomalies(const goto_programt &goto_program, message_handlert &message_handler) override
Output warnings about ignored blocks.
cover_basic_blocks_javat(const goto_programt &_goto_program)
void output(std::ostream &out) const override
Outputs the list of blocks.
block_mapt block_map
map program locations to block numbers
std::size_t block_of(goto_programt::const_targett t) const override
static void update_covered_lines(block_infot &block_info)
create list of covered lines as CSV string and set as property of source location of basic block,...
std::map< goto_programt::const_targett, std::size_t > block_mapt
std::size_t block_of(goto_programt::const_targett t) const override
std::vector< block_infot > block_infos
map block numbers to block information
virtual const source_locationt & source_location_of(std::size_t block_nr) const =0