[WIP]Add sparse abstract execution with def-use driven state propagation#1796
[WIP]Add sparse abstract execution with def-use driven state propagation#1796bjjwwang wants to merge 1 commit intoSVF-tools:masterfrom
Conversation
676d919 to
1fdfa44
Compare
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (63.47%) is below the target coverage (63.50%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #1796 +/- ##
==========================================
- Coverage 64.08% 63.47% -0.62%
==========================================
Files 245 247 +2
Lines 24637 24885 +248
Branches 4657 4727 +70
==========================================
+ Hits 15789 15795 +6
- Misses 8848 9090 +242
🚀 New features to boost your workflow:
|
| #define SSE_FUNC_PROCESS(LLVM_NAME ,FUNC_NAME) \ | ||
| auto sse_##FUNC_NAME = [this](const CallICFGNode *callNode) { \ | ||
| /* run real ext function */ \ | ||
| AbstractState& as = getAbsStateFromTrace(callNode); \ |
There was a problem hiding this comment.
We can keep the name "getAbsStateFromTrace"?
There was a problem hiding this comment.
Please change getAbsStateFromTrace to getAbsState and also update wiki page of AE here:
https://github.com/SVF-tools/Software-Security-Analysis/wiki/AE-CPP-APIs#assignment-3
https://github.com/SVF-tools/Software-Security-Analysis/wiki/AE-Python-APIs#assignment-3
Introduces sparse mode (-sparse flag) for Abstract Interpretation that propagates only needed variable states at each ICFG node, instead of copying full abstract states from predecessors. Key components: - SparseDefUse: maps address-taken ObjVars to their StoreStmt def sites - getValVars/getObjVars/getSVFVars: collect variables needed at each node - getAbstractValue(ValVar/ObjVar/SVFVar): fetch values from SSA def sites - getAbstractState(vector<ValVar*/ObjVar*/SVFVar*>): build sparse states - sparseStatePropagate: orchestrates sparse fetch before node handling - Widen set: PreAnalysis computes variables defined in each loop body, ensuring all loop-modified variables participate in widening/narrowing - Fix IntervalValue operator<< signed overflow (1<<31 in 32-bit int) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…def-use Replace SVFG-based sparse propagation with a simpler flow-insensitive SparseDefUse approach (per PR SVF-tools#1796 pattern). In sparse mode (-sparse-ae), each ICFG node pulls only the variables it needs from their definition sites instead of propagating full states along all edges. Key changes: - PreAnalysis: remove SVFG dependency, add buildObjDefTable() that scans all StoreStmts to build objId→[defNodes] map - AbstractInterpretation: add buildSparseState() (pull from def-sites) and collectNeededVars() (gather RHS variables per statement type) - AbstractState: const accessors use find() instead of at() for safety - Remove propagateObjVarAbsVal (dead code after SVFG removal) Results: 198/342 tests pass (58%), 98.1% state var size reduction. Remaining failures are due to flow-insensitive ObjVar joins and missing branch refinement — expected limitations of this approach. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement sparse mode (-sparse flag) for Abstract Interpretation that propagates only needed variables instead of full abstract states:
CI Result
including ae-sparse, ae-overflow-sparse and ae-null-deref sparse
Wait a second, I'll attach.