Skip to content

Allow realizing multiple cached branches at once#3440

Merged
WolframPfeifer merged 10 commits into
KeYProject:mainfrom
FliegendeWurst:copy-referenced-action
Jun 19, 2026
Merged

Allow realizing multiple cached branches at once#3440
WolframPfeifer merged 10 commits into
KeYProject:mainfrom
FliegendeWurst:copy-referenced-action

Conversation

@FliegendeWurst

Copy link
Copy Markdown
Member

Intended Change

This PR changes the "Copy referenced proof steps here" action to allow applying it on any node that has leaf children with caching info.
It will then copy the referenced proof steps for all cached branches.

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: manual test (UI code)
  • I have checked that runtime performance has not deteriorated.

Additional information and contact(s)

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

@FliegendeWurst FliegendeWurst added the keyext.caching Module: keyext.caching label Mar 8, 2024
@codecov

codecov Bot commented Mar 8, 2024

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 37.85%. Comparing base (7254776) to head (d88c575).
Report is 114 commits behind head on main.

❗ Current head d88c575 differs from pull request most recent head 523a172. Consider uploading reports for the commit 523a172 to get more accurate results

Files Patch % Lines
...i/plugins/caching/actions/CopyReferencedProof.java 0.00% 19 Missing ⚠️
...ka/ilkd/key/proof/reference/ReferenceSearcher.java 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3440      +/-   ##
============================================
- Coverage     37.86%   37.85%   -0.02%     
+ Complexity    17079    17043      -36     
============================================
  Files          2092     2082      -10     
  Lines        127596   127299     -297     
  Branches      21478    21442      -36     
============================================
- Hits          48316    48184     -132     
+ Misses        73355    73202     -153     
+ Partials       5925     5913      -12     

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

@WolframPfeifer WolframPfeifer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feature worked for me during review. Thanks! However, the user feedback should be improved a bit in my opinion: I nearly always get a dialog listing (only) the nodes where the caching failed (in the screenshot, actually two of the three goals are closed via cache):
image

A bit unrelated, I have another small feature request: "Prune Proof" should work with goals that are closed by cache. At the moment, I have to click on "Proof caching" -> "Re-open cached goal", which is a bit cumbersome. From a user point of view, both are the same operation (cutting away proof nodes).

@WolframPfeifer WolframPfeifer added the Reviewer Feedback Feedback from the review needs to be addressed label Mar 15, 2024
@FliegendeWurst

Copy link
Copy Markdown
Member Author

I nearly always get a dialog listing (only) the nodes where the caching failed (in the screenshot, actually two of the three goals are closed via cache):

I changed this dialog to list both successful matches and mismatches.

A bit unrelated, I have another small feature request: "Prune Proof" should work with goals that are closed by cache.

Done

@FliegendeWurst FliegendeWurst added Review Request Waiting for review and removed Reviewer Feedback Feedback from the review needs to be addressed labels Mar 21, 2024
@WolframPfeifer WolframPfeifer self-assigned this Jan 7, 2026
@WolframPfeifer

Copy link
Copy Markdown
Member

I just updated this to the new main branch. The changes in ProofPruner don't work (they seem to add an entry null to the list of open goals, which then later results in a NPE). This is also the cause for the test failure. Since the interaction between proof pruning and caching is a separate case (and seems to need a bigger fix), we should try to fix that in a separate PR.

I tested the rest of the functionality and it seems to work, with one small exception: The button in the status bar, which shows the number of cached goals, displays the wrong number after closing multiple cached goals via Context menu --> Proof Caching --> Copy referenced proof steps here (looks like the last number before closing - 1).

@WolframPfeifer

Copy link
Copy Markdown
Member

I removed the ProofPruner changes as they were broken, and made sure the UI (taskbar button) is updated.

@WolframPfeifer WolframPfeifer self-requested a review June 19, 2026 09:52
@WolframPfeifer WolframPfeifer enabled auto-merge June 19, 2026 09:56
@WolframPfeifer WolframPfeifer added GUI Feature New feature or request and removed Review Request Waiting for review labels Jun 19, 2026
@WolframPfeifer WolframPfeifer added this pull request to the merge queue Jun 19, 2026
Merged via the queue into KeYProject:main with commit fa1e882 Jun 19, 2026
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature or request GUI keyext.caching Module: keyext.caching

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants