Skip to content

Conversation

@WolframPfeifer
Copy link
Member

Quick fix: Hiding package prefixes in sequent view now works as expected. In addition, highlighting for the SortDependingFunction instance is added as for exactInstance.

Explanation: I noticed that while the code for hiding the prefixes was (partially) implemented, the view setting was never queried in the printer. I made the printer respect the setting, and added a missing case.

Known issues/missing features:

  • Inside modalities, the prefixes are still kept as is, even with the setting switched on. While this would not be difficult to implement, I am not sure if we should hide the prefixes there.
  • There might be clashes now, for example when two class names pkg1.A and pkg2.A both appear on the sequent, they are not visually distinguishable. This would probably be difficult to implement ...

Related Issue

This pull request resolves #3683.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)
  • There are changes to the (Java) code

Ensuring quality

  • I made sure that introduced/changed code is well documented (inline comments).
  • I have tested the feature manually on a small example

Additional information and contact(s)

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

@WolframPfeifer
Copy link
Member Author

@FliegendeWurst: Can you try to use that "in production" and see if there are missing cases where the prefix is still shown? I only tried on a very small example.

@WolframPfeifer WolframPfeifer marked this pull request as draft November 12, 2025 17:28
@FliegendeWurst
Copy link
Member

I tried this PR on a bigger example (proof of an accessible clause) and it works well.

@WolframPfeifer WolframPfeifer marked this pull request as ready for review November 14, 2025 10:59
@WolframPfeifer WolframPfeifer added the Review Request Waiting for review label Nov 14, 2025
@FliegendeWurst
Copy link
Member

Actually, there is one case where this change still shows the full package prefix: typed seqGet expressions. When using the pretty syntax, you still see the full package name in the cast.

@FliegendeWurst
Copy link
Member

Actually, this change causes a rather serious regression in proof saving: #3691

@WolframPfeifer
Copy link
Member Author

Actually, there is one case where this change still shows the full package prefix: typed seqGet expressions. When using the pretty syntax, you still see the full package name in the cast.

From the meeting just now: This seems to happen for the sort when printing SortDependingFunctions.

@WolframPfeifer
Copy link
Member Author

I think, #3691 is a bug/problem that was already present before, but became visible with the changes here.
In my opinion, the save functionality should not use the pretty printer, since not everything printed with that is parsable again.

@Drodt Drodt self-requested a review December 5, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View option 'hide package prefix' doesn't work

4 participants