Skip to content

Clarify roles of @Deterministic, @Pure, and @SideEffectFree annotations#1698

Open
aosen-xiong wants to merge 3 commits into
eisop:masterfrom
aosen-xiong:javadoc-determinstic
Open

Clarify roles of @Deterministic, @Pure, and @SideEffectFree annotations#1698
aosen-xiong wants to merge 3 commits into
eisop:masterfrom
aosen-xiong:javadoc-determinstic

Conversation

@aosen-xiong
Copy link
Copy Markdown
Collaborator

No description provided.

…annotations to clarify their roles in pluggable type-checking and the implications of method determinism.
Copilot AI review requested due to automatic review settings May 4, 2026 17:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 @SideEffectFree preserves heap-related facts across a call, and relates that to @Pure.
  • Expands @Pure documentation to explain how @SideEffectFree and @Deterministic complement each other.
  • Refines @Deterministic documentation (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.

Comment thread checker-qual/src/main/java/org/checkerframework/dataflow/qual/SideEffectFree.java Outdated
Comment thread checker-qual/src/main/java/org/checkerframework/dataflow/qual/Pure.java Outdated
aosen-xiong and others added 2 commits May 4, 2026 14:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@aosen-xiong
Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants