-
Notifications
You must be signed in to change notification settings - Fork 475
Graph db final v5 #1764
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
base: master
Are you sure you want to change the base?
Graph db final v5 #1764
Conversation
- 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
update
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 Report❌ Patch coverage is Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
| /** | ||
| * set the call edge lanbel counter for the new statements, this is used when loading statements from DB | ||
| */ | ||
| inline void setCallEdgeLabelCounter(u64_t counter) |
There was a problem hiding this comment.
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?
| 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; | ||
| } |
There was a problem hiding this comment.
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) : |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
No description provided.