Question: / / / TODO: Implement handling of function calls bool SSE::handleCall ( const CallCFGEdge * calledge ) { return true; } / / / TODO:
TODO: Implement handling of function calls
bool SSE::handleCallconst CallCFGEdge calledge
return true;
TODO: Implement handling of function returns
bool SSE::handleRetconst RetCFGEdge retEdge
return true;
TODO: Implement handling of branch statement inside a function
bool SSE::handleBranchconst IntraCFGEdge edge
return true;
TODO: Implement handling of nonbranch statement inside a function
including handling of AddrStmt, CopyStmt, LoadStmt, StoreStmt and GepStmt
bool SSE::handleNonBranchconst IntraCFGEdge edge
const ICFGNode dstNode edgegetDstNode;
const ICFGNode srcNode edgegetSrcNode;
DBOPifSVFUtil::isadstNode && SVFUtil::isadstNode std::cout
## Analyzing dstNodetoString
;
for const SVFStmt stmt : dstNodegetSVFStmts
if const AddrStmt addr SVFUtil::dyncaststmt
TODO: Implement handling AddrStmt
else if const CopyStmt copy SVFUtil::dyncaststmt
TODO: Implement handling CopyStmt
else if const LoadStmt load SVFUtil::dyncaststmt
TODO: Implement handling LoadStmt
else if const StoreStmt store SVFUtil::dyncaststmt
TODO: Implement handling StoreStmt
else if const GepStmt gep SVFUtil::dyncaststmt
TODO: Implement handling GepStmt
else if const BinaryOPStmt binary SVFUtil::dyncaststmt
expr op getZExprbinarygetOpVarID;
expr op getZExprbinarygetOpVarID;
expr res getZExprbinarygetResID;
switch binarygetOpcode
case BinaryOperator::Add:
addToSolverres op op;
break;
case BinaryOperator::Sub:
addToSolverres op op;
break;
case BinaryOperator::Mul:
addToSolverres op op;
break;
case BinaryOperator::SDiv:
addToSolverres op op;
break;
case BinaryOperator::SRem:
addToSolverres op op;
break;
case BinaryOperator::Xor:
addToSolverintbv resintbv op intbv op;
break;
case BinaryOperator::And:
addToSolverintbv resintbv op & intbv op;
break;
case BinaryOperator::Or:
addToSolverintbv resintbv op intbv op;
break;
case BinaryOperator::AShr:
addToSolverintbv res ashrintbv op intbv op;
break;
case BinaryOperator::Shl:
addToSolverintbv res shlintbv op intbv op;
break;
default:
assertfalse && "implement this part";
else if const CmpStmt cmp SVFUtil::dyncaststmt
expr op getZExprcmpgetOpVarID;
expr op getZExprcmpgetOpVarID;
expr res getZExprcmpgetResID;
auto predicate cmpgetPredicate;
switch predicate
case CmpInst::ICMPEQ:
addToSolverres iteop op getCtxintval getCtxintval;
break;
case CmpInst::ICMPNE:
addToSolverres iteop op getCtxintval getCtxintval;
break;
case CmpInst::ICMPUGT:
case CmpInst::ICMPSGT:
addToSolverres iteop op getCtxintval getCtxintval;
break;
case CmpInst::ICMPUGE:
case CmpInst::ICMPSGE:
addToSolverres iteop op getCtxintval getCtxintval;
break;
case CmpInst::ICMPULT:
case CmpInst::ICMPSLT:
addToSolverres iteop op getCtxintval getCtxintval;
break;
case CmpInst::ICMPULE:
case CmpInst::ICMPSLE:
addToSolverres iteop op getCtxintval getCtxintval;
break;
default:
assertfalse && "implement this part";
else if const UnaryOPStmt unary SVFUtil::dyncaststmt
assertfalse && "implement this part";
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
