Skip to content

graph db support#1756

Open
JasonZhongZexin wants to merge 19 commits intoSVF-tools:masterfrom
JasonZhongZexin:graph-db-final-v4
Open

graph db support#1756
JasonZhongZexin wants to merge 19 commits intoSVF-tools:masterfrom
JasonZhongZexin:graph-db-final-v4

Conversation

@JasonZhongZexin
Copy link
Copy Markdown
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
Copy Markdown

codecov Bot commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 68.94977% with 68 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.83%. Comparing base (2fd92c6) to head (bb1652a).
⚠️ Report is 120 commits behind head on master.

Files with missing lines Patch % Lines
svf/lib/SVFIR/SVFStatements.cpp 0.00% 19 Missing ⚠️
svf/lib/SVFIR/SVFIR.cpp 83.72% 14 Missing ⚠️
svf/lib/SABER/LeakChecker.cpp 23.07% 10 Missing ⚠️
svf/lib/Graphs/CallGraph.cpp 75.86% 7 Missing ⚠️
svf/include/SVFIR/SVFIR.h 78.94% 4 Missing ⚠️
svf/include/SVFIR/SVFVariables.h 20.00% 4 Missing ⚠️
svf-llvm/tools/SABER/saber.cpp 57.14% 3 Missing ⚠️
svf-llvm/tools/WPA/wpa.cpp 33.33% 2 Missing ⚠️
svf/include/SVFIR/SVFStatements.h 0.00% 2 Missing ⚠️
svf/lib/Graphs/ICFG.cpp 75.00% 2 Missing ⚠️
... and 1 more

❌ Your project check has failed because the head coverage (61.83%) is below the target coverage (63.50%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1756      +/-   ##
==========================================
- Coverage   63.79%   61.83%   -1.96%     
==========================================
  Files         244      243       -1     
  Lines       25980    24527    -1453     
  Branches     4581     4598      +17     
==========================================
- Hits        16573    15166    -1407     
+ Misses       9407     9361      -46     
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% <ø> (-0.51%) ⬇️
svf-llvm/lib/SVFIRBuilder.cpp 87.02% <100.00%> (+0.24%) ⬆️
svf/include/Graphs/BasicBlockG.h 96.55% <100.00%> (+2.80%) ⬆️
svf/include/Graphs/CHG.h 94.73% <ø> (-1.56%) ⬇️
svf/include/Graphs/CallGraph.h 94.23% <100.00%> (-0.60%) ⬇️
svf/include/Graphs/ICFG.h 97.95% <100.00%> (-0.09%) ⬇️
svf/include/Graphs/ICFGEdge.h 93.75% <ø> (-0.70%) ⬇️
svf/include/Graphs/ICFGNode.h 91.80% <100.00%> (-3.44%) ⬇️
svf/include/Graphs/IRGraph.h 92.00% <100.00%> (-0.31%) ⬇️
... and 18 more

... and 177 files with indirect coverage changes

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

Comment thread svf/include/Graphs/ICFGNode.h Outdated
Comment thread svf/include/Graphs/ICFGNode.h Outdated
Comment thread svf/include/SVFIR/SVFIR.h Outdated
Comment thread svf/include/SVFIR/SVFStatements.h

public:
SVFIntegerType(u32_t i, u32_t byteSize = 1) : SVFType(true, SVFIntegerTy, i, byteSize) {}
SVFIntegerType(u32_t i, u32_t byteSize, bool isSingleValTy,short signAndWidth)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could you make sure all the constructors you added are all made to protected or private?

Comment thread svf/include/SVFIR/SVFType.h Outdated
Comment thread svf/include/SVFIR/SVFVariables.h Outdated
Comment thread svf/include/Graphs/ICFGNode.h Outdated
Comment thread svf/include/SVFIR/SVFVariables.h Outdated
Comment thread svf/include/SVFIR/SVFVariables.h
Comment thread svf/include/SVFIR/SVFVariables.h Outdated
Comment thread svf/include/SVFIR/SVFVariables.h Outdated
Comment thread svf/include/SVFIR/SVFVariables.h Outdated
Copy link
Copy Markdown
Collaborator

@yuleisui yuleisui left a comment

Choose a reason for hiding this comment

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

  1. remove getVarType in BaseObject and handle functionobject var in SymbolTableBuilder.cpp:657
  2. remove Options::ReadFromDB()

Comment thread svf/include/Graphs/ICFGNode.h
static const Option<bool> DiffPts;
static Option<bool> DetectPWC;
static const Option<bool> VtableInSVFIR;
static const Option<bool> Write2DB;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove these two options.

{
return it->second;
}
totalCallSiteNum++;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this can be static and updated in GraphDB project.

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