Skip to content
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

Removal of Triple, and Quadruple #3399

Closed
wants to merge 6 commits into from

Conversation

wadoon
Copy link
Member

@wadoon wadoon commented Feb 11, 2024

Refactoring

This PR starts the removal of generic data classes in favor of Java records (aka. named tuples). In this PR, only Triple and Quadruple are removed.

In general, generic parametric data classes (Tuple, Union, ...) lead to unreadable, incomprehensible code, e.g., what does the entity Triple<StatementBlock, URI, Integer> express? Answer: It is the key in a map to find block contracts. Using the record BlockContractKey expresses this better than triple of something.

Therefore, records give you the chance of defining useful variable names, and documentation, and also avoid auto-boxing (hence NPE).

Intended Change

No use of Triple<…> and Quadruple<…>.

Type of pull request

  • X Refactoring (behaviour should not change or only minimally change)
  • X There are changes to the (Java) code

Ensuring quality

  • X by TEST CASES!!! and compiler

@wadoon wadoon self-assigned this Feb 16, 2024
jml_classlevel.txt Outdated Show resolved Hide resolved
@wadoon wadoon force-pushed the weigl/recordsftw branch from 65fd13c to 06e30f8 Compare March 16, 2024 22:47
@wadoon wadoon force-pushed the weigl/recordsftw branch from 06e30f8 to 423c10b Compare April 23, 2024 10:29
@wadoon wadoon changed the title Removal of Pair, Triple, and Quadruple Removal of Triple, and Quadruple Apr 23, 2024
@wadoon wadoon requested a review from mattulbrich April 23, 2024 20:16
@wadoon wadoon force-pushed the weigl/recordsftw branch from 423c10b to c691c0b Compare April 23, 2024 20:32
@wadoon wadoon marked this pull request as ready for review April 23, 2024 20:32
@wadoon wadoon added the 🛠 Maintenance Code quality and related things w/o functional changes label Apr 23, 2024
@wadoon wadoon added this to the v2.14.0 milestone Apr 23, 2024
@wadoon wadoon force-pushed the weigl/recordsftw branch from c691c0b to 4545251 Compare April 23, 2024 20:36
@wadoon wadoon enabled auto-merge April 23, 2024 20:36
@wadoon wadoon force-pushed the weigl/recordsftw branch from 8ac637b to c4676d3 Compare May 2, 2024 09:31
@WolframPfeifer WolframPfeifer self-requested a review May 24, 2024 12:15
@WolframPfeifer WolframPfeifer self-requested a review May 24, 2024 12:15
@KeYProject KeYProject deleted a comment from codecov bot Nov 23, 2024
@wadoon wadoon closed this Nov 23, 2024
auto-merge was automatically disabled November 23, 2024 16:15

Pull request was closed

@wadoon
Copy link
Member Author

wadoon commented Nov 23, 2024

Moved to #3529 (from external branch to internal branch), due to write permission issues on sonarqube workflow.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 44.55959% with 107 lines in your changes missing coverage. Please review.

Project coverage is 38.17%. Comparing base (3c41ebb) to head (cc91a9c).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
.../java/de/uka/ilkd/key/rule/WhileInvariantRule.java 17.14% 29 Missing ⚠️
...g/key_project/slicing/ui/RuleStatisticsDialog.java 0.00% 23 Missing ⚠️
...org/key_project/slicing/ui/ShowNodeInfoAction.java 0.00% 9 Missing ⚠️
...d/key/speclang/jml/translation/JMLSpecFactory.java 12.50% 5 Missing and 2 partials ⚠️
...ka/ilkd/key/proof/mgt/SpecificationRepository.java 66.66% 6 Missing ⚠️
...org/key_project/slicing/graph/DependencyGraph.java 60.00% 6 Missing ⚠️
...n/java/org/key_project/slicing/RuleStatistics.java 68.75% 5 Missing ⚠️
...java/de/uka/ilkd/key/speclang/ContractFactory.java 0.00% 4 Missing ⚠️
...trategy/definition/StrategySettingsDefinition.java 0.00% 4 Missing ⚠️
...l/mergerule/SymbolicExecutionStateWithProgCnt.java 33.33% 4 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3399      +/-   ##
============================================
+ Coverage     38.15%   38.17%   +0.02%     
- Complexity    17221    17224       +3     
============================================
  Files          2110     2110              
  Lines        127630   127610      -20     
  Branches      21461    21459       -2     
============================================
+ Hits          48703    48721      +18     
+ Misses        72935    72902      -33     
+ Partials       5992     5987       -5     

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


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Maintenance Code quality and related things w/o functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants