cprover
unified_difft Class Reference

#include <unified_diff.h>

Collaboration diagram for unified_difft:
[legend]

Public Types

enum  differencet { differencet::SAME, differencet::DELETED, differencet::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
 
void get_diff (const irep_idt &function, goto_program_difft &dest) const
 

Protected Types

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

Protected Member Functions

void unified_diff (const irep_idt &identifier, const goto_programt &old_goto_program, const goto_programt &new_goto_program)
 
void lcss (const irep_idt &identifier, const goto_programt &old_goto_program, const goto_programt &new_goto_program, differencest &differences) const
 
void get_diff (const irep_idt &identifier, const goto_programt &old_goto_program, const goto_programt &new_goto_program, const differencest &differences, goto_program_difft &dest) const
 
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
 
bool instructions_equal (const goto_programt::instructiont &ins1, const goto_programt::instructiont &ins2, bool recurse=true) const
 

Protected 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 30 of file unified_diff.h.

Member Typedef Documentation

§ differences_mapt

Definition at line 63 of file unified_diff.h.

§ differencest

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

Definition at line 62 of file unified_diff.h.

§ goto_program_difft

Definition at line 50 of file unified_diff.h.

Member Enumeration Documentation

§ differencet

Enumerator
SAME 
DELETED 
NEW 

Definition at line 41 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

§ get_diff() [1/2]

void unified_difft::get_diff ( const irep_idt function,
goto_program_difft dest 
) const

§ get_diff() [2/2]

void unified_difft::get_diff ( const irep_idt identifier,
const goto_programt old_goto_program,
const goto_programt new_goto_program,
const differencest differences,
goto_program_difft dest 
) const
protected

§ instructions_equal()

bool unified_difft::instructions_equal ( const goto_programt::instructiont &  ins1,
const goto_programt::instructiont &  ins2,
bool  recurse = true 
) const
inlineprotected

Definition at line 92 of file unified_diff.h.

Referenced by lcss().

§ lcss()

void unified_difft::lcss ( const irep_idt identifier,
const goto_programt old_goto_program,
const goto_programt new_goto_program,
differencest differences 
) const
protected

§ operator()()

bool unified_difft::operator() ( void  )

§ output()

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

§ 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
protected

Definition at line 103 of file unified_diff.cpp.

References DELETED, get_diff(), NEW, ns_new, ns_old, goto_programt::output_instruction(), and SAME.

Referenced by output().

§ unified_diff()

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

Member Data Documentation

§ differences_map

differences_mapt unified_difft::differences_map
protected

Definition at line 65 of file unified_diff.h.

Referenced by get_diff(), operator()(), output(), and unified_diff().

§ new_goto_functions

const goto_functionst& unified_difft::new_goto_functions
protected

Definition at line 59 of file unified_diff.h.

Referenced by get_diff(), operator()(), and output().

§ ns_new

const namespacet unified_difft::ns_new
protected

Definition at line 60 of file unified_diff.h.

Referenced by output_diff().

§ ns_old

const namespacet unified_difft::ns_old
protected

Definition at line 58 of file unified_diff.h.

Referenced by output_diff().

§ old_goto_functions

const goto_functionst& unified_difft::old_goto_functions
protected

Definition at line 57 of file unified_diff.h.

Referenced by get_diff(), operator()(), and output().


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