Skip to content

Remove undefined-function-is-assume-false from goto-instrument#8783

Open
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-2070-undefined-function
Open

Remove undefined-function-is-assume-false from goto-instrument#8783
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-2070-undefined-function

Conversation

@tautschnig
Copy link
Collaborator

Users can like-for-like replace such use with
--generate-function-body '.*' --generate-function-body-options assume-false.

Fixes: #2070

  • 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.02%. Comparing base (5719027) to head (fd0dc19).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8783   +/-   ##
========================================
  Coverage    80.02%   80.02%           
========================================
  Files         1700     1700           
  Lines       188345   188323   -22     
  Branches        73       73           
========================================
- Hits        150716   150704   -12     
+ Misses       37629    37619   -10     

☔ 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.

Users can like-for-like replace such use with
`--generate-function-body '.*' --generate-function-body-options assume-false`.

Fixes: diffblue#2070
Copilot AI review requested due to automatic review settings March 10, 2026 13:38
@tautschnig tautschnig force-pushed the fix-2070-undefined-function branch from 1f663d2 to fd0dc19 Compare March 10, 2026 13:38
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

Removes the --undefined-function-is-assume-false command-line option and its implementation from goto-instrument, directing users to replace it with --generate-function-body '.*' --generate-function-body-options assume-false.

Changes:

  • Deleted undefined_function_abort_path API and implementation.
  • Removed CLI option parsing and help/manpage documentation for --undefined-function-is-assume-false.
  • Updated goto-instrument option list to no longer advertise the removed flag.

Reviewed changes

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

Show a summary per file
File Description
src/goto-instrument/undefined_functions.h Removes the declaration for the deleted undefined-function instrumentation helper.
src/goto-instrument/undefined_functions.cpp Removes the implementation that rewrote undefined calls to assume(false).
src/goto-instrument/goto_instrument_parse_options.h Drops the CLI option from the recognized options list.
src/goto-instrument/goto_instrument_parse_options.cpp Removes runtime handling and --help text for the option.
doc/man/goto-instrument.1 Removes the manpage entry for the deleted option.

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

Comment on lines 109 to 114
"(" FLAG_ENFORCE_CONTRACT "):" \
OPT_ENFORCE_CONTRACT_REC \
"(show-threaded)(list-calls-args)" \
"(undefined-function-is-assume-false)" \
"(remove-function-body):" \
"(remove-function-body-regex):" \
OPT_AGGRESSIVE_SLICER \
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Removing --undefined-function-is-assume-false from the accepted option set is a breaking CLI change that will likely surface as a generic 'unknown option' error with no migration guidance. Consider keeping the option as a hidden/compatibility alias (not listed in --help/manpage), emitting a clear deprecation/removal diagnostic that points users to --generate-function-body '.*' --generate-function-body-options assume-false, and then exiting with a non-zero status (or optionally auto-translating it).

Copilot uses AI. Check for mistakes.
" {y--undefined-function-is-assume-false} \t convert each call to an"
" undefined function to assume(false)\n"
HELP_INSERT_FINAL_ASSERT_FALSE
HELP_REPLACE_FUNCTION_BODY
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The PR description introduces a specific like-for-like replacement for --undefined-function-is-assume-false, but after removing the help entry there is no remaining discoverable hint in --help. Consider adding a short migration note near the relevant HELP_REPLACE_FUNCTION_BODY/function-body generation help text so users can find the recommended replacement without consulting the PR/issue.

Suggested change
HELP_REPLACE_FUNCTION_BODY
HELP_REPLACE_FUNCTION_BODY
" Note: the option --undefined-function-is-assume-false has been removed; an"
" equivalent effect can be achieved using --replace-function-body with a body"
" that calls __CPROVER_assume(false).\n"

Copilot uses AI. Check for mistakes.
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.

Cleanup 'undefined-function' options to use 'generate-function-body'

4 participants