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 50
50
# produces intermingled XML on the command line
51
51
['coverage_report1' , 'test.desc' ],
52
52
['coverage_report1' , 'paths.desc' ],
53
+ ['coverage_report2' , 'test.desc' ],
53
54
['graphml_witness1' , 'test.desc' ],
54
55
['switch8' , 'program-only.desc' ],
55
56
['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(
236
236
symex_coveraget::coveraget::const_iterator c_entry = coverage.find (it);
237
237
if (c_entry != coverage.end ())
238
238
{
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 ));
248
245
249
246
for (const auto &cov : c_entry->second )
250
247
{
You can’t perform that action at this time.
0 commit comments