23 : old_goto_functions(
model_old.goto_functions),
25 new_goto_functions(
model_new.goto_functions),
37 goto_functionst::function_mapt::const_iterator
old_fit =
39 goto_functionst::function_mapt::const_iterator
new_fit =
59 goto_programt::instructionst::const_iterator
old_it =
61 goto_programt::instructionst::const_iterator
new_it =
66 for(differencest::const_reverse_iterator
rit =
differences.rbegin();
76 "old iterator reached the final goto instruction");
80 "new iterator reached the final goto instruction");
87 "old iterator reached the final goto instruction");
94 "new iterator reached the final goto instruction");
108 std::ostream &os)
const
114 for(
const auto &d :
diff)
125 os <<
"/** " << identifier <<
" **/\n";
127 for(
const auto &d :
diff)
158 goto_programt::instructionst::const_iterator
old_it =
160 goto_programt::instructionst::const_iterator
new_it =
177 goto_programt::instructionst::const_iterator
old_rit =
179 goto_programt::instructionst::const_iterator
new_rit =
205 typedef std::vector<std::vector<std::size_t>>
lcss_matrixt;
210 std::size_t i = 1, j = 1;
211 for(goto_programt::instructionst::const_iterator
old_it2 =
old_it;
216 for(goto_programt::instructionst::const_iterator
new_it2 =
new_it;
232 std::cerr <<
"old_count=" <<
old_count <<
'\n';
233 std::cerr <<
"new_count=" <<
new_count <<
'\n';
256 while(i > 0 || j > 0)
330 typedef std::map<irep_idt, goto_functionst::function_mapt::const_iterator>
339 old_funcs.insert(std::make_pair(it->first, it));
345 new_funcs.insert(std::make_pair(it->first, it));
351 for(function_mapt::const_iterator
itn =
new_funcs.begin();
363 ito->first ==
itn->first,
"old and new function names do not match");
365 itn->first,
ito->second->second.body,
itn->second->second.body);
383 goto_functionst::function_mapt::const_iterator
old_fit =
385 goto_functionst::function_mapt::const_iterator
new_fit =
404 (
ins1.targets.empty() ||
virtual void clear()
Reset the abstract state.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
This class represents an instruction in the GOTO intermediate representation.
A generic container class for the GOTO intermediate representation of one function.
static bool instructions_equal(const goto_programt::instructiont &ins1, const goto_programt::instructiont &ins2)
std::map< irep_idt, differencest > differences_mapt
std::vector< differencet > differencest
const goto_functionst & old_goto_functions
std::list< std::pair< goto_programt::const_targett, differencet > > goto_program_difft
const goto_functionst & new_goto_functions
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)
unified_difft(const goto_modelt &model_old, const goto_modelt &model_new)
const differences_mapt & differences_map() const
static differencest lcss(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
differences_mapt differences_map_
void output(std::ostream &os) const
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
Unified diff (using LCSS) of goto functions.