Conversation
325d25b to
0eec2d4
Compare
130c4c3 to
f658d4f
Compare
WolframPfeifer
requested changes
Dec 2, 2024
Member
WolframPfeifer
left a comment
There was a problem hiding this comment.
Thanks! In my opinion, it is a very good idea to remove these two classes, and use records with good names instead.
I only have some minor remarks:
- In some comments, "first" and "second" have been replaced too aggressively ...
- Some uses of var should be removed in my opinion.
- Some record parameters could use better names instead of "first", "second", ...
key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java
Outdated
Show resolved
Hide resolved
...c_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/AbstractSideProofRule.java
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediateProofReplayer.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/rule/WhileInvariantRule.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/rule/merge/procedures/MergeByIfThenElse.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/speclang/jml/translation/JMLSpecFactory.java
Outdated
Show resolved
Hide resolved
WolframPfeifer
approved these changes
Dec 5, 2024
Member
WolframPfeifer
left a comment
There was a problem hiding this comment.
Thanks! Apart from the spotless formatting, I think it is fine now.
4713b8e to
7c41529
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Refactoring
This PR starts the removal of generic data classes in favor of Java records (aka. named tuples). In this PR, only
TripleandQuadrupleare removed.In general, generic parametric data classes (
Tuple,Union, ...) lead to unreadable, incomprehensible code, e.g., what does the entityTriple<StatementBlock, URI, Integer>express? Answer: It is the key in a map to find block contracts. Using the recordBlockContractKeyexpresses 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<…>andQuadruple<…>.Type of pull request
Ensuring quality