Skip to content

Add client to count may-alias variable pairs #149

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

Merged
merged 3 commits into from
Apr 22, 2025

Conversation

jjppp
Copy link
Member

@jjppp jjppp commented Apr 21, 2025

This PR proposes a client for counting the number of variable pairs that are may-aliases.

Formally, a pair of variables u and v are considered may-aliases if the points-to-set of u and v (i.e., pts(u) and pts(v)) are not disjoint.
The number of may-alias variables is often used as a metric to evaluate the precision of a pointer analysis algorithm.

In this PR, a pointer analysis client MayAliasPair is implemented to compute the number of may-alias variable pairs. The proposed implementation is parallel and should be faster than the naive implementation used in the unit test MayAliasPairTest, who simply iterates all variable pairs and test if their points-to-sets are disjoint.

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.80%. Comparing base (e3eadc9) to head (4fb151e).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #149      +/-   ##
============================================
+ Coverage     71.90%   72.80%   +0.89%     
- Complexity     4362     4430      +68     
============================================
  Files           479      480       +1     
  Lines         15869    15917      +48     
  Branches       2179     2181       +2     
============================================
+ Hits          11411    11588     +177     
+ Misses         3575     3480      -95     
+ Partials        883      849      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Member

@zhangt2333 zhangt2333 left a comment

Choose a reason for hiding this comment

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

Minor Suggestion(s):

  • Consider renaming numberOfAliasPairs to aliasPairs for brevity. Similar situations apply to other cases.

@jjppp jjppp requested a review from zhangt2333 April 22, 2025 00:00
@zhangt2333 zhangt2333 changed the title Implement a client for counting the number of variable pairs that are may-aliases Add client to count may-alias variable pairs Apr 22, 2025
@zhangt2333 zhangt2333 merged commit 23e3d36 into pascal-lab:master Apr 22, 2025
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants