Skip to content

Fix for Mahjong's FieldPointsToGraph #162

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jjppp
Copy link
Member

@jjppp jjppp commented Jun 12, 2025

Inconsistency

The current implementation of Mahjong is inconsistent with its paper. According to [1], if the field f of an object oi may point to another object oj, then there is an edge from oi to oj with label f added to the FieldPointsToGraph. However, currently Mahjong builds edges only for those fields that are loaded in the analyzed program.

MockObjs

ConcurrentModificationException may be thrown when building the FieldPointsToGraph.
In #140 an optimization targeting zero length arrays is introduced by allocating non-functional MockObjs for 0 sized arrays, whose array indices should never point to any objects. Currently FieldPointsToGraph does not check for this situation.

[1] T. Tan, Y. Li, and J. Xue, “Efficient and precise points-to analysis: modeling the heap by merging equivalent automata,” in Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, in PLDI 2017. New York, NY, USA: Association for Computing Machinery, 2017, pp. 278–291. doi: 10.1145/3062341.3062360.

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2025

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

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.08%. Comparing base (0f4bcf4) to head (ce44bec).

Files with missing lines Patch % Lines
...alysis/pta/toolkit/mahjong/FieldPointsToGraph.java 88.23% 0 Missing and 2 partials ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #162      +/-   ##
============================================
+ Coverage     72.80%   75.08%   +2.28%     
- Complexity     4429     4567     +138     
============================================
  Files           480      480              
  Lines         15919    15917       -2     
  Branches       2182     2178       -4     
============================================
+ Hits          11590    11952     +362     
+ Misses         3477     3099     -378     
- Partials        852      866      +14     

☔ 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.

@jjppp jjppp requested a review from silverbullettt July 2, 2025 04:51
@jjppp jjppp self-assigned this Jul 2, 2025
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