CBMC
unified_difft Class Reference

#include <unified_diff.h>

+ Collaboration diagram for unified_difft:

Public Types

enum class  differencet { SAME , DELETED , NEW }
 
typedef std::list< std::pair< goto_programt::const_targett, differencet > > goto_program_difft
 

Public Member Functions

 unified_difft (const goto_modelt &model_old, const goto_modelt &model_new)
 
bool operator() ()
 
void output (std::ostream &os) const
 
goto_program_difft get_diff (const irep_idt &function) const
 

Private Types

typedef std::vector< differencetdifferencest
 
typedef std::map< irep_idt, differencestdifferences_mapt
 

Private Member Functions

void unified_diff (const irep_idt &identifier, const goto_programt &old_goto_program, const goto_programt &new_goto_program)
 
void output_diff (const irep_idt &identifier, const goto_programt &old_goto_program, const goto_programt &new_goto_program, const differencest &differences, std::ostream &os) const
 
const differences_maptdifferences_map () const
 

Static Private Member Functions

static differencest lcss (const goto_programt &old_goto_program, const goto_programt &new_goto_program)
 
static goto_program_difft get_diff (const goto_programt &old_goto_program, const goto_programt &new_goto_program, const differencest &differences)
 
static bool instructions_equal (const goto_programt::instructiont &ins1, const goto_programt::instructiont &ins2)
 

Private Attributes

const goto_functionstold_goto_functions
 
const namespacet ns_old
 
const goto_functionstnew_goto_functions
 
const namespacet ns_new
 
differences_mapt differences_map_
 

Detailed Description

Definition at line 29 of file unified_diff.h.

Member Typedef Documentation

◆ differences_mapt

Definition at line 57 of file unified_diff.h.

◆ differencest

typedef std::vector<differencet> unified_difft::differencest
private

Definition at line 56 of file unified_diff.h.

◆ goto_program_difft

Definition at line 46 of file unified_diff.h.

Member Enumeration Documentation

◆ differencet

Enumerator
SAME 
DELETED 
NEW 

Definition at line 38 of file unified_diff.h.

Constructor & Destructor Documentation

◆ unified_difft()

unified_difft::unified_difft ( const goto_modelt model_old,
const goto_modelt model_new 
)

Definition at line 20 of file unified_diff.cpp.

Member Function Documentation

◆ differences_map()

const unified_difft::differences_mapt & unified_difft::differences_map ( ) const
private

Definition at line 408 of file unified_diff.cpp.

◆ get_diff() [1/2]

unified_difft::goto_program_difft unified_difft::get_diff ( const goto_programt old_goto_program,
const goto_programt new_goto_program,
const differencest differences 
)
staticprivate

Definition at line 54 of file unified_diff.cpp.

◆ get_diff() [2/2]

unified_difft::goto_program_difft unified_difft::get_diff ( const irep_idt function) const

Definition at line 31 of file unified_diff.cpp.

◆ instructions_equal()

bool unified_difft::instructions_equal ( const goto_programt::instructiont ins1,
const goto_programt::instructiont ins2 
)
staticprivate

Definition at line 399 of file unified_diff.cpp.

◆ lcss()

unified_difft::differencest unified_difft::lcss ( const goto_programt old_goto_program,
const goto_programt new_goto_program 
)
staticprivate

Definition at line 147 of file unified_diff.cpp.

◆ operator()()

bool unified_difft::operator() ( void  )

Definition at line 328 of file unified_diff.cpp.

◆ output()

void unified_difft::output ( std::ostream &  os) const

Definition at line 375 of file unified_diff.cpp.

◆ output_diff()

void unified_difft::output_diff ( const irep_idt identifier,
const goto_programt old_goto_program,
const goto_programt new_goto_program,
const differencest differences,
std::ostream &  os 
) const
private

Definition at line 103 of file unified_diff.cpp.

◆ unified_diff()

void unified_difft::unified_diff ( const irep_idt identifier,
const goto_programt old_goto_program,
const goto_programt new_goto_program 
)
private

Definition at line 305 of file unified_diff.cpp.

Member Data Documentation

◆ differences_map_

differences_mapt unified_difft::differences_map_
private

Definition at line 86 of file unified_diff.h.

◆ new_goto_functions

const goto_functionst& unified_difft::new_goto_functions
private

Definition at line 53 of file unified_diff.h.

◆ ns_new

const namespacet unified_difft::ns_new
private

Definition at line 54 of file unified_diff.h.

◆ ns_old

const namespacet unified_difft::ns_old
private

Definition at line 52 of file unified_diff.h.

◆ old_goto_functions

const goto_functionst& unified_difft::old_goto_functions
private

Definition at line 51 of file unified_diff.h.


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