Skip to content

Fix slicing bug related to Evaluate Query#3393

Closed
FliegendeWurst wants to merge 7 commits intoKeYProject:mainfrom
FliegendeWurst:slicing-fix
Closed

Fix slicing bug related to Evaluate Query#3393
FliegendeWurst wants to merge 7 commits intoKeYProject:mainfrom
FliegendeWurst:slicing-fix

Conversation

@FliegendeWurst
Copy link
Copy Markdown
Member

@FliegendeWurst FliegendeWurst commented Jan 31, 2024

Intended Change

This PR fixes a slicing failure with a specific proof. In that particular case, the dynamically added taclet was slightly too different for the previous code to pick it up.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (behaviour should not change or only minimally change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • There are changes to the (Java) code
  • There are changes to the taclet rule base
  • There are changes to the deployment/CI infrastructure (gradle, github, ...)
  • Other:

Ensuring quality

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • I made sure that new/changed end-user features are well documented (https://github.com/KeYProject/key-docs).
  • I added new test case(s) for new functionality.
  • I have tested the feature as follows: slicing now works for the (confidential) proof file
  • I have checked that runtime performance has not deteriorated.

Additional information and contact(s)

cc @WolframPfeifer who reported the bug

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

@FliegendeWurst FliegendeWurst added 🐞 Bug keyext.slicing Module: keyext.slicing labels Feb 1, 2024
@WolframPfeifer WolframPfeifer removed 🐞 Bug keyext.slicing Module: keyext.slicing labels Feb 1, 2024
@FliegendeWurst FliegendeWurst added the keyext.slicing Module: keyext.slicing label Mar 8, 2024
@WolframPfeifer
Copy link
Copy Markdown
Member

This PR fixes one of the original bug (file belongs to a student exercise, thus I do not want to attach it for the moment). However, there is a follow-up bug with the same file. Could you also look into the second bug, please?

@FliegendeWurst
Copy link
Copy Markdown
Member Author

I think the other bug you are referring to is fixed by #3438

@WolframPfeifer
Copy link
Copy Markdown
Member

I think the other bug you are referring to is fixed by #3438

Yes, thanks. I did not notice the other fix.

Copy link
Copy Markdown
Member

@WolframPfeifer WolframPfeifer left a comment

Choose a reason for hiding this comment

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

The original bug seems to be fixed now, thanks!

Can you please take a look at my comments in the code (not sure about them, though)?

Comment thread key.core/src/main/java/de/uka/ilkd/key/rule/tacletbuilder/TacletGoalTemplate.java Outdated
@FliegendeWurst
Copy link
Copy Markdown
Member Author

I really don't understand the test failure. None of the changes in this PR change anything relevant to normal proof search. I'll do a no-op commit and push again.

@tobias-rnh
Copy link
Copy Markdown
Contributor

I really don't understand the test failure. None of the changes in this PR change anything relevant to normal proof search. I'll do a no-op commit and push again.

I was having trouble with tests failing for no reason at all in the last few weeks too. First it was the unit tests only on Ubuntu and then the integration test testRunAllFunProofs. The caches in the repository were completely filled and after making some space, we got the tests to pass. I don't know if this could also be the problem here, but it might be worth a try.

@wadoon wadoon added this to the v2.13.0 milestone Nov 21, 2025
@WolframPfeifer WolframPfeifer self-assigned this Jan 7, 2026
@WolframPfeifer WolframPfeifer modified the milestones: v2.13.0, v3.0.0 Jan 7, 2026
@KeYProject KeYProject deleted a comment from codecov bot Mar 27, 2026
WolframPfeifer added a commit that referenced this pull request Mar 27, 2026
@WolframPfeifer
Copy link
Copy Markdown
Member

@FliegendeWurst I created a new PR (#3794), which aims to bring the fixes from here to the current main (quite tricky, because equality modulo proof is implemented completely differently now). Can you have a look at it? For my example (which I also uploaded now in my PR), it seems to work. However, I am not sure about the following: The equality comparison methods modulo proof for AntecSuccTacletGoalTemplate and RewriteTacletGoalTemplate are never called, since Java uses static binding on method parameters (in contrast to the dynamic binding that happens on this PR). However, apparently they are not needed?!

Furthermore, it seems that I had to revert a change you made here in AbstractProofReplayer (line 241):
You replaced currGoal.indexOfTaclets().getPartialInstantiatedApps() with currGoal.indexOfTaclets().allNoPosTacletApps(). I do not really understand this change, but the original variant (before this PR) seems to work in my example (otherwise, the dynamically created rule replaceKnownSelect_... was not found). What was the intention behind your change, or did you do it experimentally like I did 😉?

If you do not object, I would see if the tests succeed and merge #3794, and close this PR here.

wadoon added a commit that referenced this pull request Mar 28, 2026
# By Alexander Weigl (7) and others
# Via GitHub (10) and Wolfram Pfeifer (2)
* origin/main:
  manually transferred and adapted from #3393 (due to changes in EqualityModuloProofIrrelevancy)
  formatting
  Make the context menu more flexibel and type safe.
  fix regression between File -> Path
  Fix and extend the broad release tests
  update optional test.
  Allow KeY to start even in case of unreadable recent files
  give similar taclet names if taclet not found
  move Taclet options of WD from key.core to key.core.wd
  put CachingExtension into the correct service file.
  Use Dependency Contract: ignore all term labels
  iterative version of NodeIntermediateWalker to avoid stack overflows

# Conflicts:
#	key.core/src/main/java/de/uka/ilkd/key/proof/TacletIndex.java
@FliegendeWurst
Copy link
Copy Markdown
Member Author

Furthermore, it seems that I had to revert a change you made here in AbstractProofReplayer (line 241): You replaced currGoal.indexOfTaclets().getPartialInstantiatedApps() with currGoal.indexOfTaclets().allNoPosTacletApps()

I'm not sure why I did that. Seems good to revert it.

However, apparently they are not needed?!

I think some implementations I added without really considering the need. So they can probably be omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keyext.slicing Module: keyext.slicing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants