Skip to content

Derive each program point's type from its name - #871

Closed
mernst wants to merge 1 commit into
masterfrom
ppt-type-from-name
Closed

mernst wants to merge 1 commit into
masterfrom
ppt-type-from-name

Conversation

@mernst

@mernst mernst commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

This is one of three PRs split from #858. It is independent of #875; #873 depends on both. It makes the program point type predicates (is_enter, is_exit, is_combined_exit, is_subexit, is_object, is_class) consistent.

Previously, each predicate used the declared program point type when there was one, and otherwise the name. Declared types are not always consistent with the name: some front ends declare a numbered exit such as foo:::EXIT22 with ppt-type exit, which made it a combined exit. Now PptTopLevel.normalize_type derives the type from the name when the declaration gives no type, or gives exit or the default point, and the predicates use only the type. A PptConditional takes its parent's type.

Consequences:

  • In the KnownValues, KnownValuesNewDecls, and NonZeroLargeRange tests, the numbered exits are declared with ppt-type exit. They are now subexits, so Daikon creates their combined exit, and the goal files report invariants at :::EXIT rather than :::EXIT1.
  • Daikon.create_combined_exits does not replace a combined exit that the declarations already contain.
  • AnnotateNullable handles an .inv file that has numbered exits but no combined exit, as an .inv file written before this change may: it combines the annotations of all the numbered exits.

New method PptName.isExitWithLineNumber() distinguishes foo:::EXIT22 from names such as foo:::EXIT_CONDITION, for which isNumberedExitPoint() is also true.

PptTopLevel.normalize_type derives the type from the name when the
declaration gives no type, or gives the type exit or point, so the
is_enter, is_exit, is_combined_exit, is_subexit, is_object, and is_class
predicates no longer need name-based fallbacks.  A numbered exit declared
with type exit is a subexit.

* Daikon.create_combined_exits does not replace a declared combined exit.
* AnnotateNullable handles an .inv file that lacks a combined exit.
* PptConditional takes its parent's type.

Split from #858.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 8 billable files and costs up to $2.00.

Or wait 8 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: codespecs/daikon/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7507fbe9-7dd2-475a-b471-aaaf35fed7b8
📥 Commits

Reviewing files that changed from the base of the PR and between b7136ac and c7200d8.

📒 Files selected for processing (8)
  • java/daikon/AnnotateNullable.java
  • java/daikon/Daikon.java
  • java/daikon/PptConditional.java
  • java/daikon/PptName.java
  • java/daikon/PptTopLevel.java
  • tests/daikon-tests/KnownValues/KnownValues.txt-daikon.goal
  • tests/daikon-tests/KnownValuesNewDecls/KnownValuesNewDecls.txt-daikon.goal
  • tests/daikon-tests/NonZeroLargeRange/NonZeroLargeRange.txt-daikon.goal
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mernst

mernst commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Replaced by #876, whose branch is in the mernst fork like the other PRs.

@mernst mernst closed this Oct 6, 2026
@mernst
mernst deleted the ppt-type-from-name branch October 6, 2026 15:56
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.

1 participant