Skip to content

Fix model fields resolution when multiple heaps present#3923

Open
unp1 wants to merge 1 commit into
mainfrom
fixModelFieldResolutionInMultipleHeaps
Open

Fix model fields resolution when multiple heaps present#3923
unp1 wants to merge 1 commit into
mainfrom
fixModelFieldResolutionInMultipleHeaps

Conversation

@unp1

@unp1 unp1 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Intended Change

Model fields without a represents or accessible clause could not be used in JavaRedux
as permissions could not build the term (wrong arity).

Found out when trying to specify addSuppressed in Throwable of PR #3918.

This PR should fix it.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)

Ensuring quality

  • I have tested the feature as follows: CI test suite, MErged on local branch with PR 3918 and activated model fields in Throwable

Additional information and contact(s)

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

@unp1
unp1 force-pushed the fixModelFieldResolutionInMultipleHeaps branch 4 times, most recently from cd4e9a4 to bae26a4 Compare July 14, 2026 07:26
@unp1 unp1 self-assigned this Jul 14, 2026
@unp1 unp1 added the 🐞 Bug label Jul 14, 2026
@unp1
unp1 force-pushed the fixModelFieldResolutionInMultipleHeaps branch from bae26a4 to 6f3e430 Compare July 14, 2026 07:29
Discovered when trying to specify Throwable using model fields.
Model fields (w/o represents or accessible clause) could not be used
as they were not resolvable.
@unp1
unp1 force-pushed the fixModelFieldResolutionInMultipleHeaps branch from 6f3e430 to de20391 Compare July 14, 2026 07:46
heapLDT.getFieldSymbolForPV((LocationVariable) attribute, services);
JTerm attributeTerm;
if (attribute.isStatic()) {
if (attribute.isModel()) {

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.

Does this not depend on no_state and two_state modifiers?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

do they exist for model fields too? I though just for model methods. Otherwise, I look into that and thanks for bringing it up

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.

mhm... On the other side, are we not modelling "model fields" using "model methods"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The fix is not 3.0 critical. I have a look into it and will not merge before that is setlled. I'll discuss it with Mattias (he knows model fields/methods best, I think) on Friday at the KeY meeting. In principle, the translation is at least similar and if not should be made identical. But I am not sure whether model fields should be allowed to use the modifiers (from a usage point of view).

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.

2 participants