"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "projects/CodeThorn/src/CodeThornLib.C" between
rose-0.11.49.0.tar.gz and rose-0.11.50.0.tar.gz

About: ROSE is a compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C, C++, UPC, Fortran, OpenMP, Java, Python and PHP applications.

CodeThornLib.C  (rose-0.11.49.0):CodeThornLib.C  (rose-0.11.50.0)
skipping to change at line 95 skipping to change at line 95
#include "ltlthorn-lib/Solver10.h" #include "ltlthorn-lib/Solver10.h"
#include "ltlthorn-lib/Solver11.h" #include "ltlthorn-lib/Solver11.h"
#include "ltlthorn-lib/Solver12.h" #include "ltlthorn-lib/Solver12.h"
// handler // handler
#include <signal.h> #include <signal.h>
#include <execinfo.h> #include <execinfo.h>
using namespace Sawyer::Message; using namespace Sawyer::Message;
static std::string CodeThornLibraryVersion="1.13.18";
// handler for generating backtrace // handler for generating backtrace
void codethornBackTraceHandler(int sig) { void codethornBackTraceHandler(int sig) {
void *array[10]; void *array[10];
size_t size; size_t size;
size = backtrace (array, 10); size = backtrace (array, 10);
printf ("Obtained %zd stack frames.\n", size); printf ("Obtained %zd stack frames.\n", size);
// print out all the frames to stderr // print out all the frames to stderr
fprintf(stderr, "Error: signal %d:\n", sig); fprintf(stderr, "Error: signal %d:\n", sig);
skipping to change at line 709 skipping to change at line 711
} }
} }
void optionallyGenerateVerificationReports(CodeThornOptions& ctOpt,CTAnalysi s* analyzer) { void optionallyGenerateVerificationReports(CodeThornOptions& ctOpt,CTAnalysi s* analyzer) {
if(ctOpt.generateReports) { if(ctOpt.generateReports) {
if(ctOpt.analysisList().size()>0) { if(ctOpt.analysisList().size()>0) {
const bool reportDetectedErrorLines=true; const bool reportDetectedErrorLines=true;
AnalysisReporting::generateVerificationReports(ctOpt,analyzer,reportDe tectedErrorLines); // also generates verification call graph AnalysisReporting::generateVerificationReports(ctOpt,analyzer,reportDe tectedErrorLines); // also generates verification call graph
AnalysisReporting::generateAnalysisLocationReports(ctOpt,analyzer); AnalysisReporting::generateAnalysisLocationReports(ctOpt,analyzer);
AnalysisReporting::generateAnalyzedFunctionsAndFilesReports(ctOpt,anal yzer); AnalysisReporting::generateAnalyzedFunctionsAndFilesReports(ctOpt,anal yzer);
AnalysisReporting::generateInternalAnalysisReport(ctOpt,analyzer);
} else { } else {
if(ctOpt.status) cout<<"STATUS: no analysis reports generated (no anal ysis selected)."<<endl; if(ctOpt.status) cout<<"STATUS: no analysis reports generated (no anal ysis selected)."<<endl;
} }
} }
} }
void generateInternalAnalysisReport(CodeThornOptions& ctOpt,CTAnalysis* anal
yzer) {
if(ctOpt.generateReports) {
}
}
void optionallyGenerateCallGraphDotFile(CodeThornOptions& ctOpt,CTAnalysis* analyzer) { void optionallyGenerateCallGraphDotFile(CodeThornOptions& ctOpt,CTAnalysis* analyzer) {
std::string fileName=ctOpt.visualization.callGraphFileName; std::string fileName=ctOpt.visualization.callGraphFileName;
if(fileName.size()>0) { if(fileName.size()>0) {
InterFlow::LabelToFunctionMap map=analyzer->getCFAnalyzer()->labelToFunc tionMap(*analyzer->getFlow()); InterFlow::LabelToFunctionMap map=analyzer->getCFAnalyzer()->labelToFunc tionMap(*analyzer->getFlow());
//cout<<"DEBUG: labeltofunctionmap size:"<<map.size()<<endl; //cout<<"DEBUG: labeltofunctionmap size:"<<map.size()<<endl;
std::string dotFileString=analyzer->getInterFlow()->dotCallGraph(map); std::string dotFileString=analyzer->getInterFlow()->dotCallGraph(map);
//cout<<"DEBUG: interflow size:"<<analyzer->getInterFlow()->size()<<endl ; //cout<<"DEBUG: interflow size:"<<analyzer->getInterFlow()->size()<<endl ;
if(!CppStdUtilities::writeFile(fileName, dotFileString)) { if(!CppStdUtilities::writeFile(fileName, dotFileString)) {
cerr<<"Error: could not generate callgraph dot file "<<fileName<<endl; cerr<<"Error: could not generate callgraph dot file "<<fileName<<endl;
exit(1); exit(1);
skipping to change at line 762 skipping to change at line 771
normalization.options.printPhaseInfo=ctOpt.normalizePhaseInfo; normalization.options.printPhaseInfo=ctOpt.normalizePhaseInfo;
normalization.setInliningOption(ctOpt.inlineFunctions); normalization.setInliningOption(ctOpt.inlineFunctions);
normalization.options.normalizeCplusplus=ctOpt.extendedNormalizedCppFuncti onCalls; // PP(8/13/21) normalization.options.normalizeCplusplus=ctOpt.extendedNormalizedCppFuncti onCalls; // PP(8/13/21)
normalization.normalizeAst(project,ctOpt.normalizeLevel); normalization.normalizeAst(project,ctOpt.normalizeLevel);
} }
VariableIdMappingExtended* createVariableIdMapping(CodeThornOptions& ctOpt, SgProject* project) { VariableIdMappingExtended* createVariableIdMapping(CodeThornOptions& ctOpt, SgProject* project) {
VariableIdMappingExtended* variableIdMapping=new VariableIdMappingExtended (); // createvid VariableIdMappingExtended* variableIdMapping=new VariableIdMappingExtended (); // createvid
variableIdMapping->setAstSymbolCheckFlag(ctOpt.astSymbolCheckFlag); variableIdMapping->setAstSymbolCheckFlag(ctOpt.astSymbolCheckFlag);
variableIdMapping->setArrayAbstractionIndex(ctOpt.arrayAbstractionIndex); variableIdMapping->setArrayAbstractionIndex(ctOpt.arrayAbstractionIndex);
if(ctOpt.vimReportFileName.size()>0)
variableIdMapping->setErrorReportFileName(ctOpt.reportFilePath+"/"+ctOpt.
vimReportFileName);
variableIdMapping->setStatusFlag(ctOpt.status);
variableIdMapping->computeVariableSymbolMapping(project); variableIdMapping->computeVariableSymbolMapping(project);
return variableIdMapping; return variableIdMapping;
} }
namespace namespace
{ {
bool matchCxxCall(SgNode* n) bool matchCxxCall(SgNode* n)
{ {
return SgNodeHelper::matchExtendedNormalizedCall(n); return SgNodeHelper::matchExtendedNormalizedCall(n);
} }
skipping to change at line 875 skipping to change at line 887
} }
} }
lcList.unique(); // remove duplicates (e.g. 1,3,3,4,3,3,5 -> 1,3,4,3, 5) lcList.unique(); // remove duplicates (e.g. 1,3,3,4,3,3,5 -> 1,3,4,3, 5)
for(auto lc : lcList) for(auto lc : lcList)
lineColSeq<<lc<<endl; lineColSeq<<lc<<endl;
} }
write_file(fileName,lineColSeq.str()); write_file(fileName,lineColSeq.str());
if(ctOpt.status) cout<<"Generated line-column CSV file "<<fileName<<endl ; if(ctOpt.status) cout<<"Generated line-column CSV file "<<fileName<<endl ;
} }
} }
string getCodeThornLibraryVersionNumber() {
return CodeThornLibraryVersion;
}
} // end of namespace CodeThornLib } // end of namespace CodeThornLib
} // end of namespace CodeThorn } // end of namespace CodeThorn
 End of changes. 5 change blocks. 
0 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)