File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
validate-trace-xml-schema Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1+ int factorial (int n )
2+ {
3+ if (n == 0 )
4+ {
5+ return 1 ;
6+ }
7+ return n * factorial (n - 1 );
8+ }
9+
10+ int main (void )
11+ {
12+ int result = factorial (5 );
13+ return 0 ;
14+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --symex-coverage-report - --unwind 1
4+ <line branch="true" condition-coverage="50% \(1/2\)" hits="2" number="3">
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ ^VERIFICATION SUCCESSFUL$
8+ --
9+ ^warning: ignoring
10+ ^Invariant check failed
Original file line number Diff line number Diff line change 5050 # produces intermingled XML on the command line
5151 ['coverage_report1' , 'test.desc' ],
5252 ['coverage_report1' , 'paths.desc' ],
53+ ['coverage_report2' , 'test.desc' ],
5354 ['graphml_witness1' , 'test.desc' ],
5455 ['switch8' , 'program-only.desc' ],
5556 ['Failing_Assert1' , 'dimacs.desc' ],
Original file line number Diff line number Diff line change @@ -236,15 +236,12 @@ void goto_program_coverage_recordt::compute_coverage_lines(
236236 symex_coveraget::coveraget::const_iterator c_entry = coverage.find (it);
237237 if (c_entry != coverage.end ())
238238 {
239- if (!(c_entry->second .size () == 1 || is_branch))
240- {
241- std::cerr << it->location_number << ' \n ' ;
242- for (const auto &cov : c_entry->second )
243- std::cerr << cov.second .succ ->location_number << ' \n ' ;
244- }
245- DATA_INVARIANT (
246- c_entry->second .size () == 1 || is_branch,
247- " instructions other than branch instructions have exactly 1 successor" );
239+ DATA_INVARIANT_WITH_DIAGNOSTICS (
240+ c_entry->second .size () == 1 || is_branch || it->is_function_call (),
241+ " instructions other than branch instructions or function calls have "
242+ " exactly 1 successor" ,
243+ " found at goto program instruction number " +
244+ std::to_string (it->location_number ));
248245
249246 for (const auto &cov : c_entry->second )
250247 {
You can’t perform that action at this time.
0 commit comments