Skip to content

Commit 931b09a

Browse files
committed
Regroup goto-instrument's options in help output
Some options were placed under a heading that wasn't applicable to them. Instead, this commit tries to come up with groups that may allow a user to find what they are looking for. No changes to the total set of documented options other than adding "--verbosity."
1 parent 24931b3 commit 931b09a

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,43 +1748,42 @@ void goto_instrument_parse_optionst::help()
17481748
"Usage: Purpose:\n"
17491749
"\n"
17501750
" goto-instrument [-?] [-h] [--help] show help\n"
1751-
" goto-instrument in out perform instrumentation\n"
1752-
"\n"
1753-
"Main options:\n"
1754-
HELP_DOCUMENT_PROPERTIES
1755-
" --dot generate CFG graph in DOT format\n"
1756-
" --interpreter do concrete execution\n"
1751+
" goto-instrument --version show version and exit\n"
1752+
" goto-instrument [options] in [out] perform analysis or instrumentation\n"
17571753
"\n"
17581754
"Dump Source:\n"
17591755
HELP_DUMP_C
17601756
"\n"
17611757
"Diagnosis:\n"
17621758
HELP_SHOW_PROPERTIES
1759+
HELP_DOCUMENT_PROPERTIES
17631760
" --show-symbol-table show loaded symbol table\n"
17641761
" --list-symbols list symbols with type information\n"
17651762
HELP_SHOW_GOTO_FUNCTIONS
17661763
HELP_GOTO_PROGRAM_STATS
1767-
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
1764+
" --dot generate CFG graph in DOT format\n"
17681765
" --print-internal-representation\n" // NOLINTNEXTLINE(*)
17691766
" show verbose internal representation of the program\n"
17701767
" --list-undefined-functions list functions without body\n"
1771-
" --show-struct-alignment show struct members that might be concurrently accessed\n" // NOLINT(*)
1772-
" --show-natural-loops show natural loop heads\n"
17731768
// NOLINTNEXTLINE(whitespace/line_length)
17741769
" --list-calls-args list all function calls with their arguments\n"
17751770
" --call-graph show graph of function calls\n"
17761771
// NOLINTNEXTLINE(whitespace/line_length)
17771772
" --reachable-call-graph show graph of function calls potentially reachable from main function\n"
17781773
HELP_SHOW_CLASS_HIERARCHY
1774+
HELP_VALIDATE
1775+
// NOLINTNEXTLINE(whitespace/line_length)
1776+
" --validate-goto-binary check the well-formedness of the passed in goto\n"
1777+
" binary and then exit\n"
1778+
" --interpreter do concrete execution\n"
1779+
"\n"
1780+
"Data-flow analyses:\n"
1781+
" --show-struct-alignment show struct members that might be concurrently accessed\n" // NOLINT(*)
17791782
// NOLINTNEXTLINE(whitespace/line_length)
17801783
" --show-threaded show instructions that may be executed by more than one thread\n"
17811784
" --show-local-safe-pointers show pointer expressions that are trivially dominated by a not-null check\n" // NOLINT(*)
17821785
" --show-safe-dereferences show pointer expressions that are trivially dominated by a not-null check\n" // NOLINT(*)
17831786
" *and* used as a dereference operand\n" // NOLINT(*)
1784-
HELP_VALIDATE
1785-
// NOLINTNEXTLINE(whitespace/line_length)
1786-
" --validate-goto-binary check the well-formedness of the passed in goto\n"
1787-
" binary and then exit\n"
17881787
"\n"
17891788
"Safety checks:\n"
17901789
" --no-assertions ignore user assertions\n"
@@ -1795,33 +1794,56 @@ void goto_instrument_parse_optionst::help()
17951794
"\n"
17961795
"Semantic transformations:\n"
17971796
<< HELP_NONDET_VOLATILE <<
1798-
HELP_UNWINDSET
1799-
" --unwindset-file <file> read unwindset from file\n"
1800-
" --partial-loops permit paths with partial loops\n"
1801-
" --unwinding-assertions generate unwinding assertions\n"
1802-
" --continue-as-loops add loop for remaining iterations after unwound part\n" // NOLINT(*)
18031797
" --isr <function> instruments an interrupt service routine\n"
18041798
" --mmio instruments memory-mapped I/O\n"
18051799
" --nondet-static add nondeterministic initialization of variables with static lifetime\n" // NOLINT(*)
18061800
" --nondet-static-exclude e same as nondet-static except for the variable e\n" //NOLINT(*)
18071801
" (use multiple times if required)\n"
18081802
" --check-invariant function instruments invariant checking function\n"
1809-
HELP_REMOVE_POINTERS
18101803
" --splice-call caller,callee prepends a call to callee in the body of caller\n" // NOLINT(*)
18111804
" --undefined-function-is-assume-false\n"
18121805
// NOLINTNEXTLINE(whitespace/line_length)
18131806
" convert each call to an undefined function to assume(false)\n"
18141807
HELP_INSERT_FINAL_ASSERT_FALSE
18151808
HELP_REPLACE_FUNCTION_BODY
1809+
HELP_RESTRICT_FUNCTION_POINTER
1810+
HELP_REMOVE_CALLS_NO_BODY
1811+
" --add-library add models of C library functions\n"
1812+
HELP_CONFIG_LIBRARY
1813+
" --model-argc-argv <n> model up to <n> command line arguments\n"
1814+
// NOLINTNEXTLINE(whitespace/line_length)
1815+
" --remove-function-body <f> remove the implementation of function <f> (may be repeated)\n"
1816+
HELP_REPLACE_CALLS
18161817
HELP_ANSI_C_LANGUAGE
18171818
"\n"
1818-
"Loop transformations:\n"
1819+
"Semantics-preserving transformations:\n"
1820+
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
1821+
HELP_REMOVE_POINTERS
1822+
" --constant-propagator propagate constants and simplify expressions\n" // NOLINT(*)
1823+
" --inline perform full inlining\n"
1824+
" --partial-inline perform partial inlining\n"
1825+
" --function-inline <function> transitively inline all calls <function> makes\n" // NOLINT(*)
1826+
" --no-caching disable caching of intermediate results during transitive function inlining\n" // NOLINT(*)
1827+
" --log <file> log in json format which code segments were inlined, use with --function-inline\n" // NOLINT(*)
1828+
" --remove-function-pointers replace function pointers by case statement over function calls\n" // NOLINT(*)
1829+
HELP_REMOVE_CONST_FUNCTION_POINTERS
1830+
" --value-set-fi-fp-removal build flow-insensitive value set and replace function pointers by a case statement\n" // NOLINT(*)
1831+
" over the possible assignments. If the set of possible assignments is empty the function pointer\n" // NOLINT(*)
1832+
" is removed using the standard remove-function-pointers pass. \n" // NOLINT(*)
1833+
"\n"
1834+
"Loop information and transformations:\n"
1835+
HELP_UNWINDSET
1836+
" --unwindset-file <file> read unwindset from file\n"
1837+
" --partial-loops permit paths with partial loops\n"
1838+
" --unwinding-assertions generate unwinding assertions\n"
1839+
" --continue-as-loops add loop for remaining iterations after unwound part\n" // NOLINT(*)
18191840
" --k-induction <k> check loops with k-induction\n"
18201841
" --step-case k-induction: do step-case\n"
18211842
" --base-case k-induction: do base-case\n"
18221843
" --havoc-loops over-approximate all loops\n"
18231844
" --accelerate add loop accelerators\n"
18241845
" --skip-loops <loop-ids> add gotos to skip selected loops during execution\n" // NOLINT(*)
1846+
" --show-natural-loops show natural loop heads\n"
18251847
"\n"
18261848
"Memory model instrumentations:\n"
18271849
HELP_WMM_FULL
@@ -1840,41 +1862,20 @@ void goto_instrument_parse_optionst::help()
18401862
" force the aggressive slicer to preserve function <f>\n" // NOLINT(*)
18411863
" --aggressive-slice-preserve-function containing <f>\n"
18421864
" force the aggressive slicer to preserve all functions with names containing <f>\n" // NOLINT(*)
1843-
"--aggressive-slice-preserve-all-direct-paths \n"
1865+
" --aggressive-slice-preserve-all-direct-paths \n"
18441866
" force aggressive slicer to preserve all direct paths\n" // NOLINT(*)
18451867
"\n"
1846-
"Further transformations:\n"
1847-
" --constant-propagator propagate constants and simplify expressions\n" // NOLINT(*)
1848-
" --inline perform full inlining\n"
1849-
" --partial-inline perform partial inlining\n"
1850-
" --function-inline <function> transitively inline all calls <function> makes\n" // NOLINT(*)
1851-
" --no-caching disable caching of intermediate results during transitive function inlining\n" // NOLINT(*)
1852-
" --log <file> log in json format which code segments were inlined, use with --function-inline\n" // NOLINT(*)
1853-
" --remove-function-pointers replace function pointers by case statement over function calls\n" // NOLINT(*)
1854-
" --value-set-fi-fp-removal build flow-insensitive value set and replace function pointers by a case statement\n" // NOLINT(*)
1855-
" over the possible assignments. If the set of possible assignments is empty the function pointer\n" // NOLINT(*)
1856-
" is removed using the standard remove-function-pointers pass. \n" // NOLINT(*)
1857-
HELP_RESTRICT_FUNCTION_POINTER
1858-
HELP_REMOVE_CALLS_NO_BODY
1859-
HELP_REMOVE_CONST_FUNCTION_POINTERS
1860-
" --add-library add models of C library functions\n"
1861-
HELP_CONFIG_LIBRARY
1862-
" --model-argc-argv <n> model up to <n> command line arguments\n"
1863-
// NOLINTNEXTLINE(whitespace/line_length)
1864-
" --remove-function-body <f> remove the implementation of function <f> (may be repeated)\n"
1865-
HELP_REPLACE_CALLS
1866-
"\n"
18671868
"Code contracts:\n"
18681869
HELP_LOOP_CONTRACTS
18691870
HELP_REPLACE_CALL
18701871
HELP_ENFORCE_CONTRACT
18711872
"\n"
1872-
"Other options:\n"
1873-
" --version show version and exit\n"
1873+
"User-interface options:\n"
18741874
HELP_FLUSH
18751875
" --xml output files in XML where supported\n"
18761876
" --xml-ui use XML-formatted output\n"
18771877
" --json-ui use JSON-formatted output\n"
1878+
" --verbosity # verbosity level\n"
18781879
HELP_TIMESTAMP
18791880
"\n";
18801881
// clang-format on

0 commit comments

Comments
 (0)