Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some bugs and remove some unused data #1429

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix some bugs and remove some unused data
  • Loading branch information
bjjwwang committed Apr 9, 2024
commit 2fed45aff3101a5e8bbe9931ff2b6f045aebfb53
9 changes: 2 additions & 7 deletions svf/include/AE/Svfexe/AbstractInterpretation.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class AbstractInterpretation
*
* @param block basic block that has a series of instructions
*/
void handleWTONode(const ICFGNode* node);
virtual void handleWTONode(const ICFGNode* node);

/**
* handle one instruction in ICFGNode
Expand Down Expand Up @@ -368,10 +368,7 @@ class AbstractInterpretation
virtual bool isIndirectCall(const CallICFGNode* callNode);
virtual void indirectCallFunPass(const CallICFGNode* callNode);

// helper functions in hasInEdgesES
bool isFunEntry(const ICFGNode* node);
bool isGlobalEntry(const ICFGNode* node);

protected:
// helper functions in handleCycle
bool widenFixpointPass(const ICFGNode* cycle_head,
AbstractState& pre_es);
Expand All @@ -383,8 +380,6 @@ class AbstractInterpretation
Map<std::string, std::function<void(const CallSite &)>> _func_map;
Set<const CallICFGNode*> _checkpoints;
Set<std::string> _checkpoint_names;

private:
Map<const ICFGNode*, AbstractState> _preAbstractTrace;
Map<const ICFGNode*, AbstractState> _postAbstractTrace;
std::string _moduleName;
Expand Down
3 changes: 0 additions & 3 deletions svf/include/AE/Svfexe/SVFIR2AbsState.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ class SVFIR2AbsState
SVFIR *_svfir;
AbstractState _es;
RelExeState _relEs;

Map<NodeID, AbstractState*> _br_cond;
AbstractValue getZExtValue(const SVFVar* var, const SVFType*);
};
}

Expand Down
24 changes: 0 additions & 24 deletions svf/lib/AE/Svfexe/AbstractInterpretation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,29 +224,6 @@ bool AbstractInterpretation::propogateAbsStateToCurNode(const ICFGNode *block)
assert(false && "implement this part");
}

bool AbstractInterpretation::isFunEntry(const SVF::ICFGNode *block)
{
if (SVFUtil::isa<FunEntryICFGNode>(block))
{
if (_preAbstractTrace.find(block) != _preAbstractTrace.end())
{
return true;
}
}
return false;
}

bool AbstractInterpretation::isGlobalEntry(const SVF::ICFGNode *block)
{
for (auto *edge : _icfg->getGlobalICFGNode()->getOutEdges())
{
if (edge->getDstNode() == block)
{
return true;
}
}
return false;
}

bool AbstractInterpretation::hasCmpBranchES(const CmpStmt* cmpStmt, s64_t succ,
AbstractState& es)
Expand Down Expand Up @@ -851,7 +828,6 @@ void AbstractInterpretation::handleFunc(const SVFFunction *func)

void AbstractInterpretation::handleSVFStatement(const SVFStmt *stmt)
{
std::cout << stmt->toString() << std::endl;
if (const AddrStmt *addr = SVFUtil::dyn_cast<AddrStmt>(stmt))
{
_svfir2ExeState->handleAddr(addr);
Expand Down
Loading