cprover
|
#include <unified_diff.h>
Public Types | |
enum | differencet { differencet::SAME, differencet::DELETED, differencet::NEW } |
typedef std::list< std::pair< goto_programt::const_targett, differencet > > | goto_program_difft |
typedef std::vector< differencet > | differencest |
typedef std::map< irep_idt, differencest > | differences_mapt |
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 |
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_mapt & | differences_map () const |
Static Public 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) |
Public Attributes | |
const goto_functionst & | old_goto_functions |
const namespacet | ns_old |
const goto_functionst & | new_goto_functions |
const namespacet | ns_new |
Private Attributes | |
differences_mapt | differences_map_ |
Definition at line 30 of file unified_diff.h.
typedef std::map<irep_idt, differencest> unified_difft::differences_mapt |
Definition at line 57 of file unified_diff.h.
typedef std::vector<differencet> unified_difft::differencest |
Definition at line 56 of file unified_diff.h.
typedef std::list<std::pair<goto_programt::const_targett, differencet> > unified_difft::goto_program_difft |
Definition at line 47 of file unified_diff.h.
|
strong |
Enumerator | |
---|---|
SAME | |
DELETED | |
NEW |
Definition at line 39 of file unified_diff.h.
unified_difft::unified_difft | ( | const goto_modelt & | model_old, |
const goto_modelt & | model_new | ||
) |
Definition at line 20 of file unified_diff.cpp.
const unified_difft::differences_mapt & unified_difft::differences_map | ( | ) | const |
Definition at line 402 of file unified_diff.cpp.
References differences_map_.
unified_difft::goto_program_difft unified_difft::get_diff | ( | const irep_idt & | function | ) | const |
Definition at line 31 of file unified_diff.cpp.
References differences_map_, goto_functionst::function_map, new_goto_functions, and old_goto_functions.
Referenced by change_impactt::change_impact(), and output_diff().
|
static |
Definition at line 54 of file unified_diff.cpp.
References DELETED, goto_programt::instructions, INVARIANT, NEW, and SAME.
|
static |
Definition at line 391 of file unified_diff.cpp.
References goto_programt::instructiont::code, goto_programt::instructiont::function, goto_programt::instructiont::get_target(), goto_programt::instructiont::guard, goto_programt::instructiont::targets, and goto_programt::instructiont::type.
Referenced by lcss().
|
static |
Definition at line 147 of file unified_diff.cpp.
References DELETED, goto_programt::instructions, instructions_equal(), NEW, and SAME.
Referenced by unified_diff().
bool unified_difft::operator() | ( | void | ) |
Definition at line 328 of file unified_diff.cpp.
References differences_map_, forall_goto_functions, INVARIANT, new_goto_functions, old_goto_functions, and unified_diff().
void unified_difft::output | ( | std::ostream & | os | ) | const |
Definition at line 367 of file unified_diff.cpp.
References differences_map_, goto_functionst::function_map, new_goto_functions, old_goto_functions, and output_diff().
Referenced by jdiff_parse_optionst::doit(), and goto_diff_parse_optionst::doit().
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 |
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().
void unified_difft::unified_diff | ( | const irep_idt & | identifier, |
const goto_programt & | old_goto_program, | ||
const goto_programt & | new_goto_program | ||
) |
Definition at line 305 of file unified_diff.cpp.
References DELETED, differences_map_, goto_programt::instructions, lcss(), and NEW.
Referenced by operator()().
|
private |
Definition at line 87 of file unified_diff.h.
Referenced by differences_map(), get_diff(), operator()(), output(), and unified_diff().
const goto_functionst& unified_difft::new_goto_functions |
Definition at line 53 of file unified_diff.h.
Referenced by get_diff(), operator()(), and output().
const namespacet unified_difft::ns_new |
Definition at line 54 of file unified_diff.h.
Referenced by output_diff().
const namespacet unified_difft::ns_old |
Definition at line 52 of file unified_diff.h.
Referenced by output_diff().
const goto_functionst& unified_difft::old_goto_functions |
Definition at line 51 of file unified_diff.h.
Referenced by get_diff(), operator()(), and output().