-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae934c2
commit 0f02c20
Showing
9 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
add_executable(graph Graph.cpp) | ||
set_target_properties( graph PROPERTIES | ||
add_executable(assign-1 Assignment-1.cpp) | ||
set_target_properties( assign-1 PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "SVF-FE/LLVMUtil.h" | ||
#include "SVF-FE/PAGBuilder.h" | ||
|
||
using namespace SVF; | ||
using namespace llvm; | ||
using namespace std; | ||
|
||
/* | ||
// SVF-Teaching Assignment 2 : Source Sink ICFG DFS Traversal | ||
*/ | ||
//start your code here | ||
int main(int argc, char ** argv) { | ||
|
||
int arg_num = 0; | ||
char **arg_value = new char*[argc]; | ||
std::vector<std::string> moduleNameVec; | ||
SVFUtil::processArguments(argc, argv, arg_num, arg_value, moduleNameVec); | ||
cl::ParseCommandLineOptions(arg_num, arg_value, | ||
"Whole Program Points-to Analysis\n"); | ||
|
||
SVFModule* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec); | ||
|
||
/// Build Program Assignment Graph (PAG) | ||
PAGBuilder builder; | ||
PAG* pag = builder.build (svfModule); | ||
ICFG *icfg = pag->getICFG(); | ||
|
||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
llvm_map_components_to_libnames(llvm_libs bitwriter core ipo irreader instcombine instrumentation target linker analysis scalaropts support ) | ||
file (GLOB SOURCES | ||
*.cpp | ||
) | ||
add_executable(assign-2 ${SOURCES}) | ||
|
||
target_link_libraries(assign-2 ${SVF_LIB} ${LLVMCudd} ${llvm_libs}) | ||
|
||
set_target_properties(assign-2 PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
// Assignment 3 : Andersen's pointer analysis | ||
// | ||
// | ||
*/ | ||
|
||
#include "SVF-FE/LLVMUtil.h" | ||
#include "SVF-FE/PAGBuilder.h" | ||
#include "WPA/Andersen.h" | ||
|
||
using namespace SVF; | ||
using namespace llvm; | ||
using namespace std; | ||
|
||
int main(int argc, char ** argv) { | ||
|
||
int arg_num = 0; | ||
char **arg_value = new char*[argc]; | ||
std::vector<std::string> moduleNameVec; | ||
SVFUtil::processArguments(argc, argv, arg_num, arg_value, moduleNameVec); | ||
cl::ParseCommandLineOptions(arg_num, arg_value, | ||
"Whole Program Points-to Analysis\n"); | ||
|
||
SVFModule* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec); | ||
/// Build Program Assignment Graph (PAG) | ||
PAGBuilder builder; | ||
PAG* pag = builder.build (svfModule); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
llvm_map_components_to_libnames(llvm_libs bitwriter core ipo irreader instcombine instrumentation target linker analysis scalaropts support ) | ||
file (GLOB SOURCES | ||
*.cpp | ||
) | ||
add_executable(assign-3 ${SOURCES}) | ||
|
||
target_link_libraries(assign-3 ${SVF_LIB} ${LLVMCudd} ${llvm_libs}) | ||
|
||
set_target_properties( assign-3 PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
/* | ||
// SVF-Teaching Assignment 4: Taint Analysis | ||
// | ||
// | ||
*/ | ||
|
||
#include "SVF-FE/LLVMUtil.h" | ||
#include "SVF-FE/PAGBuilder.h" | ||
#include "Graphs/PTACallGraph.h" | ||
#include "Assignment-4.h" | ||
|
||
using namespace SVF; | ||
using namespace llvm; | ||
using namespace std; | ||
|
||
|
||
int main(int argc, char ** argv) { | ||
|
||
int arg_num = 0; | ||
char **arg_value = new char*[argc]; | ||
std::vector<std::string> moduleNameVec; | ||
SVFUtil::processArguments(argc, argv, arg_num, arg_value, moduleNameVec); | ||
cl::ParseCommandLineOptions(arg_num, arg_value, | ||
"Whole Program Points-to Analysis\n"); | ||
|
||
SVFModule* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec); | ||
|
||
/// Build Program Assignment Graph (PAG) | ||
PAGBuilder builder; | ||
PAG* pag = builder.build (svfModule); | ||
/// ICFG | ||
ICFG *icfg = pag->getICFG(); | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
llvm_map_components_to_libnames(llvm_libs bitwriter core ipo irreader instcombine instrumentation target linker analysis scalaropts support ) | ||
file (GLOB SOURCES | ||
*.cpp | ||
) | ||
add_executable(assign-4 ${SOURCES}) | ||
|
||
target_link_libraries(assign-4 ${SVF_LIB} ${LLVMCudd} ${llvm_libs}) | ||
|
||
set_target_properties(assign-4 PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) |