Skip to content

Conversation

@jjppp
Copy link
Member

@jjppp jjppp commented Aug 21, 2025

This PR is intended to resolve #195

Progress

  • Use CSCallGraph instead of CallGraph in SideEffectAnalysis
  • Introduce UnmodifiableGraph CachedCallGraph for better performance
  • Optimize SCC for better performance
  • Optimize TopologicalSorter for better performance
  • Comprehensively test the implementation

@jjppp jjppp self-assigned this Aug 21, 2025
@jjppp jjppp added the type: enhancement A general enhancement label Aug 21, 2025
@codecov
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 84.24658% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.74%. Comparing base (523aec2) to head (65c68a4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...scal/taie/analysis/sideeffect/CachedCallGraph.java 40.00% 21 Missing ⚠️
...c/main/java/pascal/taie/util/graph/MergedNode.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #196      +/-   ##
============================================
+ Coverage     75.67%   75.74%   +0.07%     
- Complexity     4626     4647      +21     
============================================
  Files           480      481       +1     
  Lines         15928    16019      +91     
  Branches       2183     2195      +12     
============================================
+ Hits          12053    12134      +81     
- Misses         3008     3015       +7     
- Partials        867      870       +3     
Files with missing lines Coverage Δ
...va/pascal/taie/analysis/sideeffect/SideEffect.java 95.23% <100.00%> (+0.50%) ⬆️
...l/taie/analysis/sideeffect/SideEffectAnalysis.java 100.00% <100.00%> (ø)
...al/taie/analysis/sideeffect/TopologicalSolver.java 100.00% <100.00%> (ø)
src/main/java/pascal/taie/util/graph/SCC.java 98.50% <100.00%> (+0.14%) ⬆️
...c/main/java/pascal/taie/util/graph/MergedNode.java 75.00% <50.00%> (-6.82%) ⬇️
...scal/taie/analysis/sideeffect/CachedCallGraph.java 40.00% <40.00%> (ø)

... and 7 files with indirect coverage changes

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

@jjppp
Copy link
Member Author

jjppp commented Aug 21, 2025

The only-app option for SideEffectAnalysis seems not well-defined for merged objects. Currently an object is said to be app if it is allocated in an application method.

However, when two objects allocated in lib and app are merged, the representative element of the merged object is chosen non-deterministically. This makes MergedObj.getContainerMethod() also non-deterministic, and affects the results when only-app is set to true.

@jjppp jjppp marked this pull request as ready for review August 22, 2025 07:40
@jjppp jjppp changed the title Enhance SideEffectAnalysis by leveraging context-sensitive results and more efficient algorithms Improve SideEffectAnalysis precision by leveraging context-sensitive results and more efficient algorithms Sep 3, 2025
@jjppp jjppp changed the title Improve SideEffectAnalysis precision by leveraging context-sensitive results and more efficient algorithms Improve SideEffectAnalysis precision using context-sensitive information and more efficient algorithms Sep 3, 2025
@jjppp jjppp merged commit 5378767 into pascal-lab:master Sep 3, 2025
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2025
@jjppp jjppp deleted the side-effect branch September 23, 2025 06:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance SideEffectAnalysis by leveraging context-sensitive results and more efficient algorithms

2 participants