4949
5050from chc .linker .CLinker import CLinker
5151
52- from chc .proof .OutputParameterChecker import OutputParameterChecker
53-
5452import chc .reporting .ProofObligations as RP
5553
5654from chc .util .Config import Config
6159 from chc .app .CAttributes import CAttributes
6260 from chc .app .CFile import CFile
6361 from chc .app .CFunction import CFunction
64- from chc .app .CInstr import CInstr
62+ from chc .app .CInstr import CInstr , CCallInstr
6563 from chc .app .CStmt import CInstrsStmt , CStmt
6664 from chc .app .CTyp import (
6765 CTypComp , CTypFloat , CTypFun , CTypInt , CTypPtr )
@@ -533,14 +531,17 @@ def cproject_report(args: argparse.Namespace) -> NoReturn:
533531 # arguments
534532 tgtpath : str = args .tgtpath
535533 projectname : str = args .projectname
534+ canalysis : str = args .analysis
535+ verbose : bool = args .verbose
536536
537537 targetpath = os .path .abspath (tgtpath )
538538 projectpath = targetpath
539539
540- result = UF .read_project_summary_results (targetpath , projectname )
541- if result is not None :
542- print (RP .project_proofobligation_stats_dict_to_string (result ))
543- exit (0 )
540+ statsresult = UF .read_project_summary_results (targetpath , projectname )
541+ if statsresult is not None :
542+ print (RP .project_proofobligation_stats_dict_to_string (statsresult ))
543+ if canalysis == "undefinedbehavior" :
544+ exit (0 )
544545
545546 if not UF .has_analysisresults_path (targetpath , projectname ):
546547 print_error (
@@ -558,13 +559,21 @@ def cproject_report(args: argparse.Namespace) -> NoReturn:
558559 UF .save_project_summary_results (targetpath , projectname , fresult )
559560 UF .save_project_summary_results_as_xml (targetpath , projectname , fresult )
560561
561- result = UF .read_project_summary_results (targetpath , projectname )
562- if result is not None :
563- print (RP .project_proofobligation_stats_dict_to_string (result ))
562+ statsresult = UF .read_project_summary_results (targetpath , projectname )
563+ if statsresult is not None :
564+ print (RP .project_proofobligation_stats_dict_to_string (statsresult ))
564565 else :
565566 print_error ("Results were not readable" )
566567 exit (1 )
567568
569+ if canalysis == "outputparameters" :
570+
571+ for cfile in capp .files .values ():
572+ print ("\n File: " + cfile .name )
573+ for cfun in cfile .functions .values ():
574+ print ("\n Function: " + cfun .name )
575+ print (str (cfun .analysis_digests ))
576+
568577 exit (0 )
569578
570579
@@ -613,14 +622,17 @@ def pofilter(po: "CFunctionPO") -> bool:
613622
614623 print (RP .file_proofobligation_stats_tostring (cfile ))
615624
625+ def callsite_str (instr : "CCallInstr" ) -> str :
626+ return (
627+ instr .parent .cfile .name + ".c:"
628+ + instr .parent .cfun .name + ":"
629+ + str (instr .location .line )
630+ )
631+
616632 if canalysis == "outputparameters" :
617633 for cfun in cfile .functions .values ():
618- try :
619- op_checker = OutputParameterChecker (cfun )
620- print (str (op_checker ))
621- except UF .CHCError as e :
622- print ("Skipping function " + cfun .name )
623- continue
634+ print ("\n Function: " + cfun .name )
635+ print (str (cfun .analysis_digests ))
624636
625637 exit (0 )
626638
0 commit comments