Skip to content

Add reachable Java state properties to invariant for modified local variables (fixes #3728)#3747

Open
unp1 wants to merge 4 commits intomainfrom
fix3728
Open

Add reachable Java state properties to invariant for modified local variables (fixes #3728)#3747
unp1 wants to merge 4 commits intomainfrom
fix3728

Conversation

@unp1
Copy link
Member

@unp1 unp1 commented Feb 18, 2026

Adds reachable state properties for modified local variables to loop invariant

Related Issue

This pull request resolves #3728.

Intended Change

Information about a modified reference-typed variable to be null or created or to be within its integral range (for primitive values) are added to the invariant.

Type of pull request

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

Ensuring quality

  • I have tested the feature as follows: checked the example in the bug report and automated test runs

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

@unp1 unp1 self-assigned this Feb 18, 2026
@unp1 unp1 force-pushed the fix3728 branch 4 times, most recently from 3f2005a to 5bee329 Compare February 18, 2026 13:30
@unp1 unp1 marked this pull request as ready for review February 18, 2026 13:39
@unp1 unp1 added the 🐞 Bug label Feb 18, 2026
@unp1 unp1 added this to the v3.0.0 milestone Feb 18, 2026
@@ -72,8 +72,7 @@ public MatchResultInfo check(SchemaVariable var, SyntaxElement instCandidate,
.map(methodFrame -> MiscTools.getSelfTerm(methodFrame, services)).orElse(null);

// TODO: Handle exception?!
Copy link
Member

Choose a reason for hiding this comment

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

Can the TODO be resolved?

5138, 4127, true, true, true);
var iteration2 =
sliceProofFullFilename(iteration1.second, 4236, 4229, true, true, true);
sliceProofFullFilename(iteration1.second, 4127, 4125, true, true, true);
Copy link
Member

Choose a reason for hiding this comment

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

These are very overspecific assertions.

I also stumble often over them. @FliegendeWurst

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.

Loop scope rule doesn't include implicit conditions on local variables

2 participants

Comments