-
Notifications
You must be signed in to change notification settings - Fork 25
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
More general equalsModProperty #3459
More general equalsModProperty #3459
Conversation
… Property and use a type parameter
…into more-general-equalsModProperty
…erty # Conflicts: # key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/util/SymbolicExecutionUtil.java # key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartAuxiliaryBlockComputationMacro.java # key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartAuxiliaryLoopComputationMacro.java # key.core/src/main/java/de/uka/ilkd/key/informationflow/macros/StartAuxiliaryMethodComputationMacro.java # key.core/src/main/java/de/uka/ilkd/key/logic/BoundVariableTools.java # key.core/src/main/java/de/uka/ilkd/key/logic/LabeledTermImpl.java # key.core/src/main/java/de/uka/ilkd/key/logic/Semisequent.java # key.core/src/main/java/de/uka/ilkd/key/logic/Term.java # key.core/src/main/java/de/uka/ilkd/key/logic/equality/RenamingTermProperty.java # key.core/src/main/java/de/uka/ilkd/key/logic/label/TermLabelManager.java # key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java # key.core/src/main/java/de/uka/ilkd/key/macros/scripts/InstantiateCommand.java # key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java # key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RuleCommand.java # key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SelectCommand.java # key.core/src/main/java/de/uka/ilkd/key/proof/join/JoinIsApplicable.java # key.core/src/main/java/de/uka/ilkd/key/rule/OneStepSimplifier.java # key.core/src/main/java/de/uka/ilkd/key/rule/conditions/ApplyUpdateOnRigidCondition.java # key.core/src/main/java/de/uka/ilkd/key/rule/match/legacy/ElementMatcher.java # key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/VMTacletMatcher.java # key.core/src/main/java/de/uka/ilkd/key/rule/match/vm/instructions/MatchSchemaVariableInstruction.java # key.core/src/main/java/de/uka/ilkd/key/rule/merge/MergeRule.java # key.core/src/main/java/de/uka/ilkd/key/smt/AbstractSMTTranslator.java # key.core/src/main/java/de/uka/ilkd/key/smt/newsmt2/SeqDefHandler.java # key.core/src/main/java/de/uka/ilkd/key/smt/newsmt2/SumProdHandler.java # key.core/src/main/java/de/uka/ilkd/key/speclang/FunctionalOperationContractImpl.java # key.core/src/main/java/de/uka/ilkd/key/speclang/jml/translation/JMLSpecFactory.java # key.core/src/main/java/de/uka/ilkd/key/strategy/feature/ContainsTermFeature.java # key.core/src/main/java/de/uka/ilkd/key/strategy/feature/DependencyContractFeature.java # key.core/src/main/java/de/uka/ilkd/key/strategy/feature/FocusIsSubFormulaOfInfFlowContractAppFeature.java # key.core/src/main/java/de/uka/ilkd/key/strategy/quantifierHeuristics/PredictCostProver.java # key.core/src/main/java/de/uka/ilkd/key/strategy/termfeature/EqTermFeature.java # key.core/src/main/java/de/uka/ilkd/key/util/mergerule/MergeRuleUtils.java # key.core/src/test/java/de/uka/ilkd/key/logic/TestTerm.java # key.core/src/test/java/de/uka/ilkd/key/logic/equality/TestEqualsModProperty.java # key.core/src/test/java/de/uka/ilkd/key/parser/TestTermParser.java # key.core/src/test/java/de/uka/ilkd/key/rule/TestApplyTaclet.java # key.core/src/test/java/de/uka/ilkd/key/rule/conditions/TestApplyUpdateOnRigidCondition.java # key.core/src/test/java/de/uka/ilkd/key/smt/newsmt2/ProveSMTLemmasTest.java # key.core/src/test/java/de/uka/ilkd/key/speclang/jml/TestJMLTranslator.java
This time the unit tests for windows fail but they run on my machine. |
3 things to do before merge:
|
# Conflicts: # key.core/src/main/java/de/uka/ilkd/key/rule/match/legacy/ElementMatcher.java
Done.
Most of the time, this was a false alert. The hashCode() method is not directly overridden, but the method computeHashCode() that does the actual computation in hashCode() is overridden. For some classes, however, I have added implementations of computeHashCode().
As discussed, we do not add default methods. Most of the properties like TermLabelsProperty are only defined for terms, and there are no comparable properties defined for other instances of the generic type T. |
# Conflicts: # key.core/src/main/java/de/uka/ilkd/key/java/SourceElement.java # key.core/src/main/java/de/uka/ilkd/key/logic/Term.java
…rceElementProperty
I have changed equalsModThisProperty in RenamingSourceElementProperty to use the general navigation structure instead of the TreeWalker. Because of this, I have removed the TreeWalker entirely. |
Intended Change
Building on top of #3386, the interface
EqualsModProperty
has now been changed so that it can be used not just withTerm
s but theoretically any class if a properProperty
is implemented. The signature of the method has also been slightly modified so that it is able to handle equality checks that utilize additional parameters (like was the case withequalsModRenaming
defined onSourceElement
s that is also refactored with this PR).To refactorequalsModRenaming
ofSourceElement
, a new InterfaceTreeWalker
and implementing classJavaASTTreeWalker
have been introduced that make it possible to move through the tree of SourceElements step by step.The new general navigation structure is used to move through the tree of SourceElements.
Plan
Direct tests for JavaASTTreeWalker (currently only indirectly tested through tests for equalsModProperty)Even more doc commentsType of pull request
Ensuring quality
Additional information and contact(s)
EqualsModProperty
The old
TermEqualsModProperty
has now been parameterized with a type
T
so that it can accommodate other classes than justTerm
:equalsModProperty
is furthermore parameterized with a typeV
that can account for additional parameters needed for the equality check.Properties
is now parameterized with a type
T
so that it can accommodate other classes than justTerm
:equalsModThisProperty
is furthermore parameterized with a typeV
that can account for additional parameters needed for the equality check.Refactoring of equalsModRenaming
As
equals
andequalsModRenaming
for SourceElements were basically doing the same thing except for a few classes (equals
mostly calledequalsModRenaming
), the idea was that the content ofequalsModRenaming
is moved toequals
entirely. The special cases that did not callequalsModRenaming
inequals
or made use of theNameAbstractionTable
are now handled by aJavaASTTreeWalker
.The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.