Static Value-Flow Analysis
Loading...
Searching...
No Matches
Classes | Functions | Variables
ae.cpp File Reference
#include "SVF-LLVM/SVFIRBuilder.h"
#include "WPA/WPAPass.h"
#include "Util/CommandLine.h"
#include "Util/Options.h"
#include "WPA/Andersen.h"
#include "AE/Core/RelExeState.h"
#include "AE/Core/RelationSolver.h"
#include "AE/Svfexe/AbstractInterpretation.h"

Go to the source code of this file.

Classes

class  SymblicAbstractionTest
 
class  AETest
 

Functions

int main (int argc, char **argv)
 

Variables

static Option< boolSYMABS ("symabs", "symbolic abstraction test", false)
 
static Option< boolAETEST ("aetest", "abstract execution basic function test", false)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 843 of file ae.cpp.

844{
845 int arg_num = 0;
846 int extraArgc = 3;
847 char **arg_value = new char *[argc + extraArgc];
848 for (; arg_num < argc; ++arg_num)
849 {
851 }
852 // add extra options
853 arg_value[arg_num++] = (char*) "-model-consts=true";
854 arg_value[arg_num++] = (char*) "-model-arrays=true";
855 arg_value[arg_num++] = (char*) "-pre-field-sensitive=false";
856 assert(arg_num == (argc + extraArgc) && "more extra arguments? Change the value of extraArgc");
857
858 std::vector<std::string> moduleNameVec;
860 arg_num, arg_value, "Static Symbolic Execution", "[options] <input-bitcode...>"
861 );
862 delete[] arg_value;
863 if (SYMABS())
864 {
867 return 0;
868 }
869
870 if (AETEST())
871 {
874 aeTest.testAbsState();
875 return 0;
876 }
877
879 SVFIRBuilder builder(svfModule);
880 SVFIR* pag = builder.build();
882 PTACallGraph* callgraph = ander->getCallGraph();
883 builder.updateCallGraph(callgraph);
884 pag->getICFG()->updateCallGraph(callgraph);
887 ae.addDetector(std::make_unique<BufOverflowDetector>());
888 ae.runOnModule(pag->getICFG());
889
891
892 return 0;
893}
static Option< bool > SYMABS("symabs", "symbolic abstraction test", false)
static Option< bool > AETEST("aetest", "abstract execution basic function test", false)
Definition ae.cpp:626
void testBinaryOpStmt()
Definition ae.cpp:632
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
Definition CommandLine.h:75
AbstractInterpretation is same as Abstract Execution.
static AbstractInterpretation & getAEInstance()
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
Definition Andersen.h:408
void updateCallGraph(PTACallGraph *callgraph)
update ICFG for indirect calls
Definition ICFG.cpp:419
static LLVMModuleSet * getLLVMModuleSet()
Definition LLVMModule.h:122
static void releaseLLVMModuleSet()
Definition LLVMModule.h:129
static SVFModule * buildSVFModule(Module &mod)
static const Option< bool > BufferOverflowCheck
buffer overflow checker, Default: false
Definition Options.h:252
PTACallGraph * getCallGraph() const
Return call graph.
ICFG * getICFG() const
Definition SVFIR.h:172
void testsValidation()
Definition ae.cpp:603
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Variable Documentation

◆ AETEST

Option< bool > AETEST("aetest", "abstract execution basic function test", false) ( "aetest"  ,
"abstract execution basic function test"  ,
false   
)
static

◆ SYMABS

Option< bool > SYMABS("symabs", "symbolic abstraction test", false) ( "symabs"  ,
"symbolic abstraction test"  ,
false   
)
static