Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--no-standard-checks is included in goto-instrument help, but can only be parsed by cbmc and goto-analyzer #8557

Open
polgreen opened this issue Jan 5, 2025 · 0 comments

Comments

@polgreen
Copy link
Contributor

polgreen commented Jan 5, 2025

CBMC version: 6.4.1 (cbmc-6.4.1-66-g1e99418017)
Operating system: MacOS Sonoma

Exact command line resulting in the issue:

goto-instrument --no-standard-checks gotobinary1.gb gotobinary2.gb

What behaviour did you expect:

goto instrument should accept the command line argument and not instrument the binary with standard checks. Or the goto-instrument help should not include this option.

What happened instead:

goto-instrument prints a helpfile that includes "--no-standard-checks" as a valid option and then says Unknown option: --no-standard-checks

The problem is that this command line option is included in HELP_GOTO_CHECK, which is being imported to the help functions for cbmc, goto-analyzer, goto-diff and goto-instrument.

% git grep HELP_GOTO_CHECK
ansi-c/goto-conversion/goto_check_c.h:#define HELP_GOTO_CHECK \
cbmc/cbmc_parse_options.cpp:    HELP_GOTO_CHECK
goto-analyzer/goto_analyzer_parse_options.cpp:    HELP_GOTO_CHECK
goto-diff/goto_diff_parse_options.cpp:    HELP_GOTO_CHECK
goto-instrument/goto_instrument_parse_options.cpp:    HELP_GOTO_CHECK

But this is only handled by two of the option parsers:

% git grep '"no-standard-checks"'
cbmc/cbmc_parse_options.cpp:    options, !cmdline.isset("no-standard-checks"));
cbmc/cbmc_parse_options.cpp:    cmdline.isset("cover") && !cmdline.isset("no-standard-checks") &&
goto-analyzer/goto_analyzer_parse_options.cpp:    options, !cmdline.isset("no-standard-checks"));
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

No branches or pull requests

1 participant