Skip to content

Conversation

@JasonZhongZexin
Copy link
Contributor

No description provided.

- add ICFG edges & nodes to graoh db [tested]

add options

update callgraph & icfg insert method

addSVFTypeNode2db[tested]

add struInfo2db [tested]

fix ICFGNode err [tested]

update SVFFunctionType (add params_types_vec to the node)

- add PAGNode & PAGEdge to db [tested]
- fixed cross join gql [tested]

update bbGraph Insertion [tested]
update  bb insertion [tested]
update bbEdge insertion [tested]
- read SVFType from db
- init PAGNode from db
- read SVFBBGraph from db
- read ICFG from db

read ICFG edge from db [tested & checked]

- read & write pag edge [tested]
- fixed stat err
- rename graphdb related function name

refactoring node/edge db insertStmt

update ICFGNodes attrubuites
"update allICFGNode of BB from DB result"

add node location info to db

fix rebase err
update

update

update

test ci

update ci

update ci

update ci

update ci

updtae ci

update

update graphDBClient and cmake configuration

update

clean db client

clean code

update
reslove confilt
@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

❌ Patch coverage is 76.92308% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.03%. Comparing base (c711dc3) to head (a94e541).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
svf/lib/SVFIR/SVFStatements.cpp 0.00% 13 Missing ⚠️
svf/lib/SABER/DoubleFreeChecker.cpp 9.09% 10 Missing ⚠️
svf/lib/SABER/LeakChecker.cpp 23.07% 10 Missing ⚠️
svf/lib/SVFIR/SVFIR.cpp 93.15% 5 Missing ⚠️
svf/include/SVFIR/SVFIR.h 78.94% 4 Missing ⚠️
svf/lib/SVFIR/SVFValue.cpp 0.00% 2 Missing ⚠️
svf/include/SVFIR/SVFStatements.h 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1764      +/-   ##
==========================================
+ Coverage   64.00%   64.03%   +0.02%     
==========================================
  Files         244      243       -1     
  Lines       24454    24544      +90     
  Branches     4611     4617       +6     
==========================================
+ Hits        15653    15716      +63     
- Misses       8801     8828      +27     
Files with missing lines Coverage Δ
svf-llvm/include/SVF-LLVM/ICFGBuilder.h 100.00% <100.00%> (ø)
svf-llvm/include/SVF-LLVM/SVFIRBuilder.h 89.81% <ø> (ø)
svf-llvm/lib/LLVMUtil.cpp 75.09% <100.00%> (+0.18%) ⬆️
svf-llvm/lib/SVFIRBuilder.cpp 87.29% <100.00%> (+0.31%) ⬆️
svf-llvm/tools/SABER/saber.cpp 85.71% <ø> (ø)
svf-llvm/tools/WPA/wpa.cpp 100.00% <100.00%> (+12.50%) ⬆️
svf/include/Graphs/BasicBlockG.h 96.55% <100.00%> (+0.06%) ⬆️
svf/include/Graphs/CHG.h 94.73% <ø> (ø)
svf/include/Graphs/CallGraph.h 94.23% <100.00%> (ø)
svf/include/Graphs/ICFG.h 98.03% <100.00%> (+0.16%) ⬆️
... and 22 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

/**
* set the call edge lanbel counter for the new statements, this is used when loading statements from DB
*/
inline void setCallEdgeLabelCounter(u64_t counter)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the below counter methods? I thought this is done during each edge adding?

Comment on lines +274 to +297
static inline const Inst2LabelMap* getInst2LabelMap()
{
return &inst2LabelMap;
}

static inline const Var2LabelMap* getVar2LabelMap()
{
return &var2LabelMap;
}

static inline const u64_t* getCallEdgeLabelCounter()
{
return &callEdgeLabelCounter;
}

static inline const u64_t* getStoreEdgeLabelCounter()
{
return &storeEdgeLabelCounter;
}

static inline const u64_t* getMultiOpndLabelCounter()
{
return &multiOpndLabelCounter;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we return references rather than pointers? Also the counter methods look very odd to me.

}
}

SVFStmt::SVFStmt(SVFVar* s, SVFVar* d, GEdgeFlag k, EdgeID eid, SVFVar* value, ICFGNode* icfgNode, bool real) :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only for GraphDB, put it under protected if it is not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this protected constructor.

friend class IRGraph;

protected:
StInfo (u32_t id, std::vector<u32_t> fldIdxVec, std::vector<u32_t> elemIdxVec, Map<u32_t, const SVFType*> fldIdx2TypeMap,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this constructor?

Copy link
Contributor Author

@JasonZhongZexin JasonZhongZexin Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it’s better to introduce this new constructor. The original constructor is too minimal. It only accepts the size as a parameter. However, these vectors are updated dynamically during processing, and they currently only provide add/update functions for inserting data into the set.
explicit StInfo(u32_t s) : stride(s), numOfFlattenElements(s), numOfFlattenFields(s) { }
If we reuse the original constructor, we would need to add many setter functions, and those new setters would only be used by the database code.

assert(opnds.size() == 2 && "CmpStmt can only have two operands!");
}

CmpStmt::CmpStmt(SVFVar* s, SVFVar* d, GEdgeFlag k, EdgeID eid, SVFVar* value, u32_t predicate, ICFGNode* icfgNode, const OPVars& opnds)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try to remove the additional SVFStmt constructors you added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants