Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Library calls previously lost local ownership and refinement facts when their mutation effects or returned aliases were unknown. Add
@Modifiesfootprints and@ReturnsViewrelationships shared through Spoon's AST, and use them in Latte and LiquidTypeChecking. Local array copies, borrowed constructor inputs and ArrayList views retain the information needed by later checks.Target Java 21 in the build and CI. Add an opt-in, package-selectable Java SE 21 catalog covering all 178 packages, 4,055 API types and 47,030 member entries: 501 stronger declarations across 190 types, including 443 mutation footprints, with explicit conservative policies elsewhere. Generated inventories and audit reports are marked for GitHub's generated-file handling.
Also fix the array-constructor metadata null dereference and deep solver-translation stack overflow. Include checked examples, catalog generation/validation tools, runtime witnesses, documentation and a replay of the original 1,481 OpenJDK test sources.
The follow-up in docs/jdk21-effects-followup.md records specific improvements and remaining limitations. Branch-dependent aliases and repeated allocation summaries remain imprecise. Read-only calls still reject overlapping borrowed arguments such as
Arrays.equals(values, values); this PR documents that gap rather than claiming it is fixed.Example
With
--jdk all, this now verifies because the local view captures its backing list without making it shared:The backing-list mutation invalidates the view for subsequent checked operations. Footprints do not imply freshness; ownership and return-view guarantees remain separate annotations.
Related Issue
Stacked on #35, targeting
feat/external-library-refinements. The diff contains the Java 21 catalog, effect/view support and follow-up fixes and audits. CI is enabled for this PR base.Type of change
How Has This Been Tested?
Arrays/FloatDoubleOrder.javabecomes diagnostic-free; 14 previous diagnostics disappear from now-clear lines. The report does not claim an overall reduction.