CBMC
source_linest Class Reference

#include <source_lines.h>

+ Collaboration diagram for source_linest:

Public Member Functions

 source_linest ()=default
 Constructors. More...
 
 source_linest (const source_locationt &loc)
 
void insert (const source_locationt &loc)
 Insert a line (a source location) into the set of lines. More...
 
std::string to_string () const
 Construct a string representing the set of lines. More...
 
irept to_irep () const
 Construct an irept representing the set of lines. More...
 

Private Types

using linest = std::set< mp_integer >
 A set of lines from a single function. More...
 
using function_linest = std::map< std::string, linest >
 A set of lines from multiple function. More...
 
using block_linest = std::map< std::string, function_linest >
 A set of lines from multiple files. More...
 

Private Attributes

block_linest block_lines
 

Detailed Description

Definition at line 32 of file source_lines.h.

Member Typedef Documentation

◆ block_linest

using source_linest::block_linest = std::map<std::string, function_linest>
private

A set of lines from multiple files.

Definition at line 68 of file source_lines.h.

◆ function_linest

using source_linest::function_linest = std::map<std::string, linest>
private

A set of lines from multiple function.

Definition at line 66 of file source_lines.h.

◆ linest

using source_linest::linest = std::set<mp_integer>
private

A set of lines from a single function.

Definition at line 64 of file source_lines.h.

Constructor & Destructor Documentation

◆ source_linest() [1/2]

source_linest::source_linest ( )
default

Constructors.

◆ source_linest() [2/2]

source_linest::source_linest ( const source_locationt loc)
inlineexplicit

Definition at line 37 of file source_lines.h.

Member Function Documentation

◆ insert()

void source_linest::insert ( const source_locationt loc)

Insert a line (a source location) into the set of lines.

Parameters
locA source location

Definition at line 21 of file source_lines.cpp.

◆ to_irep()

irept source_linest::to_irep ( ) const

Construct an irept representing the set of lines.

Returns
The set of lines represented as an irept where each file is a is a named_sub, each function is a named_sub therein, and line numbers (or ranges thereof) are the string value.

Definition at line 58 of file source_lines.cpp.

◆ to_string()

std::string source_linest::to_string ( ) const

Construct a string representing the set of lines.

Returns
The set of lines represented as string of the form set1;set2;set3 where each set is a string of the form file:function:n1,n2,n3,n4 where n1, n2, n3, n4 are line numbers (or ranges thereof) from the given function in the given file listed in ascending order.

Definition at line 37 of file source_lines.cpp.

Member Data Documentation

◆ block_lines

block_linest source_linest::block_lines
private

Definition at line 70 of file source_lines.h.


The documentation for this class was generated from the following files: