Skip to content

Adapt traps validator from old soot with a test case#872

Merged
JonasKlauke merged 3 commits intosoot-oss:developfrom
Momo-Not-Emo:traps-validator
Mar 8, 2024
Merged

Adapt traps validator from old soot with a test case#872
JonasKlauke merged 3 commits intosoot-oss:developfrom
Momo-Not-Emo:traps-validator

Conversation

@Momo-Not-Emo
Copy link
Copy Markdown
Contributor

It appears challenging to construct a failure test case for the trap validator when striving to ensure the successful loading of Jimple code.

@swissiety
Copy link
Copy Markdown
Collaborator

Hi, In the current implementation of getTraps() it should be impossible to create such a case as getTraps builds the information from the blocks. Therefore, unfortunately this validator is not needed in SootUp anymore - but lets add it for completeness sake and if someone creates another StmtGraph implementation that works differently/e.g. like Soot.
We should add a comment then, that implementations based on the MutableBlockStmtGraph should not need this validator.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 35.71429% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 69.87%. Comparing base (e63dc81) to head (a15ce99).

Files Patch % Lines
...in/java/sootup/core/validation/TrapsValidator.java 35.71% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #872      +/-   ##
=============================================
- Coverage      69.88%   69.87%   -0.01%     
- Complexity      4039     4044       +5     
=============================================
  Files            310      310              
  Lines          15248    15261      +13     
  Branches        2605     2609       +4     
=============================================
+ Hits           10656    10664       +8     
- Misses          3735     3738       +3     
- Partials         857      859       +2     

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

Copy link
Copy Markdown
Collaborator

@JonasKlauke JonasKlauke left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@JonasKlauke JonasKlauke merged commit cde422e into soot-oss:develop Mar 8, 2024
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.

3 participants