@@ -235,21 +235,19 @@ std::string dump_function_body_in_html(
235
235
" <th>Index</th>\n "
236
236
" <th>Name</th>\n "
237
237
" <th>Type</th>\n "
238
- " </tr>\n "
239
- ;
238
+ " </tr>\n " ;
240
239
assert (ns.get_symbol_table ().has_symbol (raw_fn_name));
241
240
const symbolt &fn_symbol=ns.lookup (raw_fn_name);
242
241
const code_typet &fn_type=to_code_type (fn_symbol.type );
243
- for (std::size_t i=0UL , n=fn_type.parameters ().size (); i!=n; ++i)
242
+ for (std::size_t i=0UL , n=fn_type.parameters ().size (); i!=n; ++i)
244
243
{
245
244
const code_typet::parametert ¶m=fn_type.parameters ().at (i);
246
245
ostr << " <tr>\n "
247
246
" <td>" << i << " </td>\n "
248
247
" <td>" << param.get_base_name () << " </td>\n "
249
248
" <td>" << to_html_text (from_type (ns," " ,param.type ()))
250
249
<< " </td>\n "
251
- " </tr>\n "
252
- ;
250
+ " </tr>\n " ;
253
251
}
254
252
ostr << " </table>\n " ;
255
253
@@ -290,7 +288,7 @@ std::string dump_function_body_in_html(
290
288
291
289
// Dumping instruction
292
290
ostr << " <td>\n " ;
293
- dump_instruction_code_in_html (*it,ns,ostr);
291
+ dump_instruction_code_in_html (*it, ns, ostr);
294
292
ostr << " </td>\n " ;
295
293
296
294
// Dumping labels
@@ -439,7 +437,7 @@ std::string dump_symbol_table_symbols_in_html(
439
437
{
440
438
fileutl_create_directory (fileutl_parse_path_in_pathname (pathname));
441
439
std::fstream ostr (pathname, std::ios_base::out);
442
- if (!ostr.is_open ())
440
+ if (!ostr.is_open ())
443
441
return msgstream () << " ERROR: dump_symbol_table_symbols_in_html() : "
444
442
" Cannot open the symbol-table-symbols log file '"
445
443
<< pathname << " '." ;
@@ -451,11 +449,11 @@ std::string dump_symbol_table_symbols_in_html(
451
449
" <th>Symbol name</th>\n "
452
450
" <th>Properties</th>\n "
453
451
" </tr>\n " ;
454
- std::map<std::string,irep_idt> sorted_keys;
455
- for (const auto &name_props : symbol_table.symbols )
452
+ std::map<std::string, irep_idt> sorted_keys;
453
+ for (const auto &name_props : symbol_table.symbols )
456
454
sorted_keys.insert ({to_html_text (as_string (name_props.first )),
457
455
name_props.first });
458
- for (const auto &name_key : sorted_keys)
456
+ for (const auto &name_key : sorted_keys)
459
457
{
460
458
const symbolt &symbol=symbol_table.symbols .at (name_key.second );
461
459
ostr << " <tr>\n " ;
@@ -496,7 +494,7 @@ std::string dump_symbol_table_symbols_in_html(
496
494
ostr << " <tr>\n " ;
497
495
ostr << " <td>Type of symbol</td>\n " ;
498
496
ostr << " <td>"
499
- << to_html_text (from_type (namespacet (symbol_table)," " ,symbol.type ))
497
+ << to_html_text (from_type (namespacet (symbol_table), " " , symbol.type ))
500
498
<< " </td>\n " ;
501
499
ostr << " </tr>\n " ;
502
500
ostr << " <tr>\n " ;
@@ -505,7 +503,8 @@ std::string dump_symbol_table_symbols_in_html(
505
503
if (symbol.value .id ()==ID_code)
506
504
ostr << " <function-body>" ;
507
505
else
508
- ostr << to_html_text (from_expr (namespacet (symbol_table)," " ,symbol.value ));
506
+ ostr << to_html_text (from_expr (namespacet (symbol_table), " " ,
507
+ symbol.value ));
509
508
ostr << " </td>\n " ;
510
509
ostr << " </tr>\n " ;
511
510
ostr << " </table>\n " ;
@@ -524,19 +523,19 @@ std::string dump_symbol_table_base_map_in_html(
524
523
{
525
524
fileutl_create_directory (fileutl_parse_path_in_pathname (pathname));
526
525
std::fstream ostr (pathname, std::ios_base::out);
527
- if (!ostr.is_open ())
526
+ if (!ostr.is_open ())
528
527
return msgstream () << " ERROR: dump_symbol_table_base_map_in_html() : "
529
528
" Cannot open the symbol-table-base-map log file '"
530
529
<< pathname << " '." ;
531
530
532
- dump_html_prefix (ostr," Symbol table base" );
531
+ dump_html_prefix (ostr, " Symbol table base" );
533
532
ostr << " <h2>Content of multimap 'symbol_tablet::symbol_base_map'.</h2>\n " ;
534
533
ostr << " <table>\n "
535
534
" <tr>\n "
536
535
" <th>Key</th>\n "
537
536
" <th>Value</th>\n "
538
537
" </tr>\n " ;
539
- for (const auto &name_base : base_map)
538
+ for (const auto &name_base : base_map)
540
539
{
541
540
ostr << " <tr>\n " ;
542
541
ostr << " <td>" << name_base.first << " </td>\n "
@@ -555,20 +554,20 @@ std::string dump_symbol_table_module_map_in_html(
555
554
{
556
555
fileutl_create_directory (fileutl_parse_path_in_pathname (pathname));
557
556
std::fstream ostr (pathname, std::ios_base::out);
558
- if (!ostr.is_open ())
557
+ if (!ostr.is_open ())
559
558
return msgstream () << " ERROR: dump_symbol_table_module_map_in_html() : "
560
559
" Cannot open the symbol-table-module-map log "
561
560
" file '"
562
561
<< pathname << " '." ;
563
- dump_html_prefix (ostr," Symbol table module" );
562
+ dump_html_prefix (ostr, " Symbol table module" );
564
563
ostr << " <h2>Content of multimap 'symbol_tablet::symbol_module_map'."
565
564
" </h2>\n " ;
566
565
ostr << " <table>\n "
567
566
" <tr>\n "
568
567
" <th>Key</th>\n "
569
568
" <th>Value</th>\n "
570
569
" </tr>\n " ;
571
- for (const auto &name_module : module_map)
570
+ for (const auto &name_module : module_map)
572
571
{
573
572
ostr << " <tr>\n " ;
574
573
ostr << " <td>" << name_module.first << " </td>\n "
@@ -631,16 +630,16 @@ std::string dump_symbol_table_in_html(
631
630
{
632
631
fileutl_create_directory (dump_root_directory);
633
632
const std::string pathname=
634
- fileutl_concatenate_file_paths (dump_root_directory," symbol_table.html" );
635
- std::fstream ostr (pathname,std::ios_base::out);
636
- if (!ostr.is_open ())
633
+ fileutl_concatenate_file_paths (dump_root_directory, " symbol_table.html" );
634
+ std::fstream ostr (pathname, std::ios_base::out);
635
+ if (!ostr.is_open ())
637
636
return msgstream () << " ERROR: dump_symbol_table_in_html() : "
638
637
" Cannot open the symbol-table log file '"
639
638
<< pathname << " '." ;
640
- dump_html_prefix (ostr," Symbol table module" );
639
+ dump_html_prefix (ostr, " Symbol table module" );
641
640
ostr << " <h3>Symbol table</h3>\n " ;
642
641
std::string error=
643
- dump_symbol_table_as_html_table (symbol_table,dump_root_directory,ostr);
642
+ dump_symbol_table_as_html_table (symbol_table, dump_root_directory, ostr);
644
643
if (!error.empty ())
645
644
return error;
646
645
dump_html_suffix (ostr);
@@ -708,7 +707,7 @@ std::string dump_goto_program_in_html(
708
707
ostr << " <h3>Symbol table</h3>\n " ;
709
708
710
709
std::string error=
711
- dump_symbol_table_as_html_table (symbol_table,dump_root_directory,ostr);
710
+ dump_symbol_table_as_html_table (symbol_table, dump_root_directory, ostr);
712
711
if (!error.empty ())
713
712
return error;
714
713
@@ -721,11 +720,11 @@ std::string dump_goto_program_in_html(
721
720
std::string const cg_file =
722
721
msgstream () << dump_root_directory << " /call_graph.html" ;
723
722
std::fstream cg_ostr (cg_file, std::ios_base::out);
724
- if (!cg_ostr.is_open ())
723
+ if (!cg_ostr.is_open ())
725
724
return msgstream () << " ERROR: sumfn::dump_goto_program_in_html() : "
726
725
" Cannot open the call-graph log file '"
727
726
<< cg_file << " '." ;
728
- dump_html_prefix (cg_ostr," Call Graph" );
727
+ dump_html_prefix (cg_ostr, " Call Graph" );
729
728
cg_ostr << " <img style=\" max-width: 1920px;\" "
730
729
" src=\" ./call_graph.svg\" alt=\" call graph SVG file\" >\n " ;
731
730
dump_html_suffix (cg_ostr);
@@ -745,16 +744,16 @@ std::string dump_goto_program_in_html(
745
744
{
746
745
std::string const class_hierarchy_svg_file =
747
746
msgstream () << dump_root_directory << " /class_hierarchy.svg" ;
748
- dump_classhierarchy_in_svg (class_hierarchy,class_hierarchy_svg_file);
747
+ dump_classhierarchy_in_svg (class_hierarchy, class_hierarchy_svg_file);
749
748
750
749
std::string const ch_file =
751
750
msgstream () << dump_root_directory << " /class_hierarchy.html" ;
752
751
std::fstream ch_ostr (ch_file, std::ios_base::out);
753
- if (!ch_ostr.is_open ())
752
+ if (!ch_ostr.is_open ())
754
753
return msgstream () << " ERROR: sumfn::dump_goto_program_in_html() : "
755
754
" Cannot open the class-hierarchy log file '"
756
755
<< ch_file << " '." ;
757
- dump_html_prefix (ch_ostr," Class Hierarchy" );
756
+ dump_html_prefix (ch_ostr, " Class Hierarchy" );
758
757
ch_ostr << " <img style=\" max-width: 1920px;\" "
759
758
" src=\" ./class_hierarchy.svg\" "
760
759
" alt=\" class hierarchy SVG file\" >\n " ;
@@ -774,7 +773,7 @@ std::string dump_goto_program_in_html(
774
773
ostr << " <h3>Inverted (partial) topological order of functions (i.e. "
775
774
" from callees to callers):</h3>\n " ;
776
775
ostr << " <ul>\n " ;
777
- for (irep_idt const & fn_name : inverted_functions_topological_order)
776
+ for (irep_idt const & fn_name : inverted_functions_topological_order)
778
777
ostr << " <li>" << to_html_text (as_string (fn_name)) << " </li>\n " ;
779
778
ostr << " </ul>\n " ;
780
779
@@ -794,43 +793,40 @@ std::string dump_goto_functions_in_html(
794
793
if (it->second .body_available ())
795
794
{
796
795
std::string err_message =
797
- dump_function_body_in_html (
798
- it->first ,
799
- it->second .body ,
800
- ns,
801
- fileutl_concatenate_file_paths (
802
- dump_root_directory,to_file_name (as_string (it->first )))
803
- );
804
- if (!err_message.empty ())
796
+ dump_function_body_in_html (
797
+ it->first ,
798
+ it->second .body ,
799
+ ns,
800
+ fileutl_concatenate_file_paths (
801
+ dump_root_directory, to_file_name (as_string (it->first ))));
802
+ if (!err_message.empty ())
805
803
return err_message;
806
804
}
807
805
808
806
const std::string log_filename =
809
807
msgstream () << dump_root_directory << " /index.html" ;
810
808
std::fstream ostr (log_filename, std::ios_base::out);
811
- if (!ostr.is_open ())
809
+ if (!ostr.is_open ())
812
810
return msgstream () << " ERROR: sumfn::dump_goto_functions_in_html() : "
813
- " Cannot open the log file '" << log_filename << " '. "
814
- ;
815
- dump_html_prefix (ostr," Functions" );
811
+ " Cannot open the log file '" << log_filename
812
+ << " '. " ;
813
+ dump_html_prefix (ostr, " Functions" );
816
814
ostr << " <h3>Listing of functions</h3>\n " ;
817
815
ostr << " <table>\n "
818
816
" <tr>\n "
819
817
" <th>Function name</th>\n "
820
818
" <th>Code</th>\n "
821
- " </tr>\n "
822
- ;
823
- std::set<std::string> ordered;
819
+ " </tr>\n " ;
820
+ std::set<std::string> ordered;
824
821
for (auto it=functions.cbegin (); it!=functions.cend (); ++it)
825
822
if (it->second .body_available ())
826
823
ordered.insert (as_string (it->first ));
827
- for (const auto &fn_name : ordered)
824
+ for (const auto &fn_name : ordered)
828
825
ostr << " <tr>\n "
829
826
" <td>" << to_html_text (fn_name) << " </td>\n "
830
827
" <td><a href=\" ./" << to_file_name (fn_name)
831
828
<< " /index.html\" >here</a></td>\n "
832
- " </tr>\n "
833
- ;
829
+ " </tr>\n " ;
834
830
ostr << " </table>\n " ;
835
831
dump_html_suffix (ostr);
836
832
return " " ; // no error.
0 commit comments