Skip to content

Split at leaf program points other than numbered exits - #873

Closed
mernst wants to merge 12 commits into
masterfrom
dataflow-leaf
Closed

mernst wants to merge 12 commits into
masterfrom
dataflow-leaf

Conversation

@mernst

@mernst mernst commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

This is one of three PRs split from #858, which it replaces. Merge #871 and #875 first; this PR includes their changes.

PptRelation assumed that numbered exits are the only leaves of the dataflow hierarchy. At any other leaf with splitters (such as a :::POINT program point, as produced by convertcsv.pl), the samples went only to the conditional program points, so the program point had no samples and no implications.

The new PptTopLevel.is_dataflow_leaf() is the single definition of a leaf: the numbered exits and the general program points, except :::THROWS and :::GLOBAL. PptRelation, FileIO.process_sample, Daikon.setupEquality, and MergeInvariants all use it.

Other changes:

  • :::GLOBAL is no longer a leaf, so when it has no children it gets its equality view from setup_childless_nonleaves.
  • MergeInvariants builds the hierarchy from a decls file the same way Daikon does, and at the end removes only the merge relations it added.

The new SplitPoint test splits a :::POINT program point. runcluster.pl (#856) depends on this change; its tests are in tests/script-tests/runcluster/.

mernst added 11 commits October 5, 2026 20:51
Daikon treats arbitrarily named program points such as :::POINT (used by
convertcsv.pl) as leaves of the dataflow hierarchy, but the splitter
hierarchy code treated only numbered exit points as leaves.  As a result,
splitting at such a program point produced no samples and no implications.

Add PptTopLevel.is_dataflow_leaf() and use it consistently.
FileIO.process_sample and MergeInvariants now use is_dataflow_leaf() rather
than their own leaf tests.  is_dataflow_leaf() follows the declared ppt type
when there is one, treats :::GLOBAL as a non-leaf, and is the basis of the
final assertion in init_hierarchy_new.

The new SplitPoint test splits a :::POINT program point.
… SplitPoint test

* FileIO reads a "ppt-type exit" declaration of a numbered exit (such as
  foo:::EXIT22) as SUBEXIT, so is_subexit, is_combined_exit, and
  is_dataflow_leaf agree about it.  is_dataflow_leaf no longer special-cases it.
* process_sample again rejects samples at any combined-exit name.
* init_hierarchy (old decls) also creates equality views for childless
  non-leaves such as :::GLOBAL; the assertion there excludes combined exits.
* MergeInvariants builds the hierarchy from a decls file the same way Daikon does.
* SplitPoint test data now yields implications relating x and y.
…e hierarchy dispatch

Normalize a numbered exit typed EXIT or POINT to SUBEXIT, and a non-combined-exit
name typed EXIT to POINT, in the PptTopLevel constructor and readObject, so that
deserialized ppts also get consistent predicates.  Remove MergeInvariants's
assertion that non-leaves have children, allow childless combined exits, and drop
splitters of childless non-leaves.  Add PptRelation.init_hierarchy_for_decl_format.
…e normalization, merge-link cleanup, AnnotateNullable, shared helpers

- MergeInvariants: set up equality views on childless non-leaves when the
  merge template comes from .inv files; remove only MERGE_CHILD relations
  in the final cleanup.
- PptTopLevel.normalize_type: require EXIT followed by digits for SUBEXIT;
  a POINT- or EXIT-typed foo:::EXIT is a combined exit.
- Daikon.create_combined_exits: do not replace a declared combined exit.
- AnnotateNullable: accept a numbered exit with no combined-exit parent as
  a method's exit.
- Share conditional-connection and hierarchy-finishing code between
  init_hierarchy and init_hierarchy_new; share equality-view creation.
… combined exits

* PptTopLevel.normalize_type also derives ENTER, OBJECT, and CLASS from the
  name, and applies to ppts with no declared type, so the is_* predicates no
  longer need name-based fallbacks.  PptConditional takes its parent's type.
* Move the numbered-exit name test to PptName.isExitWithLineNumber.
* AnnotateNullable processes a method once even when an .inv file lacks its
  combined exit, combining the annotations of all its numbered exits.
* Reword the FileIO comment about samples at combined exit points.
* init_hierarchy_new again includes conditional relations in its debug output.
# Conflicts:
#	tests/daikon-tests/Makefile
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.
PptRelation.init_hierarchy (old declaration format) and init_hierarchy_new
now share connect_conditionals and finish_hierarchy, so the old format also
creates equality views for childless non-leaves.  A non-leaf with no
children has its splitters removed.  New methods
PptRelation.init_hierarchy_for_decl_format and
PptTopLevel.create_equality_view replace duplicated code.

Split from #858.
…ow-leaf

# Conflicts:
#	java/daikon/PptRelation.java
#	java/daikon/PptTopLevel.java
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 16 billable files and costs up to $4.00.

Or wait 1 minute 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: 08ca8404-f9b5-4fdc-9e03-2fbf8a92eb93
📥 Commits

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

⛔ Files ignored due to path filters (1)
  • tests/daikon-tests/SplitPoint/SplitPoint.dtrace.gz is excluded by !**/*.gz
📒 Files selected for processing (16)
  • java/daikon/AnnotateNullable.java
  • java/daikon/Daikon.java
  • java/daikon/FileIO.java
  • java/daikon/MergeInvariants.java
  • java/daikon/PptConditional.java
  • java/daikon/PptName.java
  • java/daikon/PptRelation.java
  • java/daikon/PptTopLevel.java
  • tests/daikon-tests/KnownValues/KnownValues.txt-daikon.goal
  • tests/daikon-tests/KnownValuesNewDecls/KnownValuesNewDecls.txt-daikon.goal
  • tests/daikon-tests/Makefile
  • tests/daikon-tests/NonZeroLargeRange/NonZeroLargeRange.txt-daikon.goal
  • tests/daikon-tests/SplitPoint/Makefile
  • tests/daikon-tests/SplitPoint/SplitPoint.decls
  • tests/daikon-tests/SplitPoint/SplitPoint.spinfo
  • tests/daikon-tests/SplitPoint/SplitPoint.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 added this pull request to stack #874 October 6, 2026 15:32
@mernst mernst mentioned this pull request Oct 6, 2026
* AnnotateNullable no longer handles .inv files that lack combined exits;
  it processes only combined exits and skips all other children.
* PptTopLevel.readObject does not re-derive the type, which was wrong for
  a PptConditional.
* MergeInvariants cleans the merge template on the decls path too, so
  leaves that get merge children have no equality view.
* PptRelation.setup_childless_nonleaves skips leaves instead of asserting
  that there are none.
* Suppress a purity warning in PptName.isExitWithLineNumber.
@mernst

mernst commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

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

@mernst mernst closed this Oct 6, 2026
@mernst
mernst deleted the dataflow-leaf 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