Clarify roles of @Deterministic, @Pure, and @SideEffectFree annotations#1698
Open
aosen-xiong wants to merge 3 commits into
Open
Clarify roles of @Deterministic, @Pure, and @SideEffectFree annotations#1698aosen-xiong wants to merge 3 commits into
aosen-xiong wants to merge 3 commits into
Conversation
…annotations to clarify their roles in pluggable type-checking and the implications of method determinism.
There was a problem hiding this comment.
Pull request overview
This PR updates the Javadoc of the purity-related annotations in checker-qual to more clearly distinguish the roles of @SideEffectFree, @Deterministic, and @Pure in flow-sensitive reasoning within the Checker Framework.
Changes:
- Clarifies that
@SideEffectFreepreserves heap-related facts across a call, and relates that to@Pure. - Expands
@Puredocumentation to explain how@SideEffectFreeand@Deterministiccomplement each other. - Refines
@Deterministicdocumentation (including examples) to explain why determinism alone doesn’t support repeated-call refinements.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| checker-qual/src/main/java/org/checkerframework/dataflow/qual/SideEffectFree.java | Adds an explanatory paragraph about heap preservation vs repeated-call result stability and links to @Deterministic/@Pure. |
| checker-qual/src/main/java/org/checkerframework/dataflow/qual/Pure.java | Adds a structured explanation (bullets) of the complementary roles of @SideEffectFree and @Deterministic. |
| checker-qual/src/main/java/org/checkerframework/dataflow/qual/Deterministic.java | Updates the definition and adds examples explaining limitations of determinism for repeated-call refinements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
Author
|
The misc test failed due to the Javadoc inconsistency between this and the JDK. Will open a PR once the text is finalized. |
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.
No description provided.