Question: #include Assignment - 4 . h #include SVF - LLVM / LLVMUtil . h #include SVF - LLVM / SVFIRBuilder .
#include "Assignmenth
#include SVFLLVMLLVMUtilh
#include SVFLLVMSVFIRBuilderh
#include "GraphsCallGraphh
#include "UtilOptionsh
#include "UtilCommandLineh
using namespace std;
void Test
cout
running test: endl;
SVFModule svfModule LLVMModuleSet::getLLVMModuleSetbuildSVFModuleAssignmenttestcasebctestll;
Build Program Assignment Graph SVFIR
SVF::SVFIRBuilder buildersvfModule;
SVF::SVFIR pag builder.build;
TaintGraphTraversal taint new TaintGraphTraversalpag;
tainttaintChecking;
set expected STARTEND";
asserttaintgetPaths expected &&
wrong paths generated test failed ;
cout
test passed endl;
SVF::LLVMModuleSet::releaseLLVMModuleSet;
SVF::SVFIR::releaseSVFIR;
void Test
cout
running test : endl;
SVFModule svfModule LLVMModuleSet::getLLVMModuleSetbuildSVFModuleAssignmenttestcasebctestll;
Build Program Assignment Graph SVFIR
SVF::SVFIRBuilder buildersvfModule;
SVF::SVFIR pag builder.build;
TaintGraphTraversal taint new TaintGraphTraversalpag;
tainttaintChecking;
asserttaintgetPathssize &&
should not exist tainted path test failed ;
cout
test passed endl;
SVF::LLVMModuleSet::releaseLLVMModuleSet;
SVF::SVFIR::releaseSVFIR;
void Test
cout
running test : endl;
SVFModule svfModule LLVMModuleSet::getLLVMModuleSetbuildSVFModuleAssignmenttestcasebctestll;
Build Program Assignment Graph SVFIR
SVF::SVFIRBuilder buildersvfModule;
SVF::SVFIR pag builder.build;
TaintGraphTraversal taint new TaintGraphTraversalpag;
tainttaintChecking;
asserttaintgetPathssize &&
should not exist tainted path test failed ;
cout
test passed endl;
SVF::SVFIR::releaseSVFIR;
SVF::LLVMModuleSet::releaseLLVMModuleSet;
void Test
cout
running test : endl;
SVFModule svfModule LLVMModuleSet::getLLVMModuleSetbuildSVFModuleAssignmenttestcasebctestll;
Build Program Assignment Graph SVFIR
SVF::SVFIRBuilder buildersvfModule;
SVF::SVFIR pag builder.build;
TaintGraphTraversal taint new TaintGraphTraversalpag;
tainttaintChecking;
set expected STARTEND";
asserttaintgetPaths expected &&
wrong paths generated test failed ;
cout
test passed endl;
SVF::LLVMModuleSet::releaseLLVMModuleSet;
SVF::SVFIR::releaseSVFIR;
int mainint argc, char argv
int argnum ;
int extraArgc ;
char argvalue new char argc extraArgc;
for ; argnum argc; argnum
argvalueargnum argvargnum;
You may comment it to see the details of the analysis
argvalueargnumchar statfalse";
std::vector moduleNameVec;
moduleNameVec OptionBase::parseOptions
argnum, argvalue, "TeachingSoftwareAnalysis Assignment options;
Test;
Test;
Test;
Test;
return ;
These are the test files
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
