Skip to content

Add remove_java_new pass to jdiff and janalyzer tools#8787

Open
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-3094-remove_java_new
Open

Add remove_java_new pass to jdiff and janalyzer tools#8787
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-3094-remove_java_new

Conversation

@tautschnig
Copy link
Collaborator

Add the remove_java_new pass after convert_java_nondet to both jdiff and janalyzer. This ensures that any new statements introduced by convert_java_nondet are properly processed.

Fixes: #3094

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.43%. Comparing base (85c204f) to head (b951207).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8787      +/-   ##
===========================================
+ Coverage    80.41%   80.43%   +0.01%     
===========================================
  Files         1703     1703              
  Lines       188398   188406       +8     
  Branches        73       73              
===========================================
+ Hits        151498   151537      +39     
+ Misses       36900    36869      -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tautschnig tautschnig self-assigned this Feb 24, 2026
Add the `remove_java_new` pass after `convert_java_nondet` to both
`jdiff` and `janalyzer`. This ensures that any new statements introduced
by `convert_java_nondet` are properly processed.

Fixes: diffblue#3094
@tautschnig tautschnig force-pushed the fix-3094-remove_java_new branch from 0e55409 to b951207 Compare March 18, 2026 16:16
@tautschnig tautschnig marked this pull request as ready for review March 18, 2026 16:16
Copilot AI review requested due to automatic review settings March 18, 2026 16:16
Copy link

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 JBMC Java tooling pipelines so that Java nondet conversion is followed by remove_java_new, ensuring any new side effects introduced during nondet expansion are lowered before subsequent processing.

Changes:

  • Add convert_nondet + remove_java_new into jdiff’s process_goto_program pass sequence.
  • Add convert_nondet + remove_java_new into janalyzer’s per-function process_goto_function pass sequence.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
jbmc/src/jdiff/jdiff_parse_options.cpp Runs Java nondet conversion and then lowers any introduced java_new side effects in the whole-model processing pipeline.
jbmc/src/janalyzer/janalyzer_parse_options.cpp Runs Java nondet conversion and then lowers java_new side effects in the per-function processing pipeline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +701 to +706
// convert Java nondet expressions
java_object_factory_parameterst object_factory_parameters;
object_factory_parameters.set(options);
convert_nondet(
function, ui_message_handler, object_factory_parameters, ID_java);

Comment on lines +701 to +712
// convert Java nondet expressions
java_object_factory_parameterst object_factory_parameters;
object_factory_parameters.set(options);
convert_nondet(
function, ui_message_handler, object_factory_parameters, ID_java);

// remove Java new expressions (must be after convert_nondet)
remove_java_new(
function.get_function_id(),
function.get_goto_function(),
symbol_table,
ui_message_handler);
Comment on lines +204 to +208
// convert Java nondet expressions
java_object_factory_parameterst object_factory_parameters;
object_factory_parameters.set(options);
convert_nondet(goto_model, ui_message_handler, object_factory_parameters);

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.

Use remove_java_new in jdiff and janalyzer

2 participants