Skip to content

Make \sameUpdateLevel the default#3899

Merged
Drodt merged 9 commits into
mainfrom
sameUpdateLevel-default
Jul 10, 2026
Merged

Make \sameUpdateLevel the default#3899
Drodt merged 9 commits into
mainfrom
sameUpdateLevel-default

Conversation

@Drodt

@Drodt Drodt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Intended Change

If a rule has an \assumes or \add part, the term in the \find and the other parts should have the same updates applied to them for soundness, at least in most cases. To ensure this, the rules need the \sameUpdateLevel annotation, it is not the default. Recently, we found a number of bugs due to missing \sameUpdateLevel, e.g. #3891 and #3490.

This PR changes the default as discussed in the KaKeY meeting on the 24th of April 2026: By default, any rule with \assumes or \add automatically has the SAME_UPDATE_LEVEL restriction, unless \ignoreUpdateLevel is added.

This makes a number of unsound rules sound (while going over the rules, I saw many where \sameUpdateLevel was missing. It also affects the one step simplifier: Some rule were not handles by OSS because the had the \sameUpdateLevel annotation but no \assumes or \add; that seemed incorrect.

Because this is a breaking syntax change, we should consider it for 3.0.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)
  • 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

Ensuring quality

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • I have tested the feature as follows: Ran the tests.
  • 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.

@unp1 unp1 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.

Thanks a lot! 👍

Two minor issues to discuss:

  • the logic printer nows prints for pure rewrite rules (w/o add and assumes) the \ignoreUpdateLevel flag. E.g. swicth on that taclets are shown for inner nodes, apply eqSymm on an equation
  • Should we keep the token SAMEUPDATELEVEL and the grammar rule so that existing proofs with included rules do not break

@unp1 unp1 added this to the v3.0.0 milestone Jul 9, 2026
@Drodt

Drodt commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

Both are fixed now. Now the application restrictions still print as \sameUpdateLevel, which was the easier path (and makes it easier to see which rules were missing them).

@unp1 unp1 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.

Thanks!

@Drodt Drodt added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 3e825b0 Jul 10, 2026
36 checks passed
@Drodt Drodt deleted the sameUpdateLevel-default branch July 10, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants