cprover
count_eloc.cpp File Reference

Count effective lines of code. More...

#include "count_eloc.h"
#include <iostream>
#include <unordered_set>
#include <util/prefix.h>
#include <util/file_util.h>
#include <goto-programs/cfg.h>
Include dependency graph for count_eloc.cpp:

Go to the source code of this file.

Typedefs

typedef std::unordered_set< irep_idt, irep_id_hashlinest
 
typedef std::unordered_map< irep_idt, linest, irep_id_hashfilest
 
typedef std::unordered_map< irep_idt, filest, irep_id_hashworking_dirst
 

Functions

static void collect_eloc (const goto_functionst &goto_functions, working_dirst &dest)
 
void count_eloc (const goto_functionst &goto_functions)
 
void list_eloc (const goto_functionst &goto_functions)
 
void print_path_lengths (const goto_functionst &goto_functions)
 

Detailed Description

Count effective lines of code.

Definition in file count_eloc.cpp.

Typedef Documentation

§ filest

typedef std::unordered_map<irep_idt, linest, irep_id_hash> filest

Definition at line 25 of file count_eloc.cpp.

§ linest

typedef std::unordered_set<irep_idt, irep_id_hash> linest

Definition at line 24 of file count_eloc.cpp.

§ working_dirst

typedef std::unordered_map<irep_idt, filest, irep_id_hash> working_dirst

Definition at line 26 of file count_eloc.cpp.

Function Documentation

§ collect_eloc()

static void collect_eloc ( const goto_functionst goto_functions,
working_dirst dest 
)
static

Definition at line 28 of file count_eloc.cpp.

References dstringt::empty(), forall_goto_functions, and forall_goto_program_instructions.

Referenced by count_eloc(), and list_eloc().

§ count_eloc()

void count_eloc ( const goto_functionst goto_functions)

Definition at line 46 of file count_eloc.cpp.

References collect_eloc().

Referenced by goto_instrument_parse_optionst::doit().

§ list_eloc()

void list_eloc ( const goto_functionst goto_functions)

Definition at line 60 of file count_eloc.cpp.

References collect_eloc(), concat_dir_file(), and id2string().

Referenced by goto_instrument_parse_optionst::doit().

§ print_path_lengths()