Skip to content

Commit 0532e66

Browse files
authored
Merge pull request #6925 from tautschnig/bugfixes/goto-instrument-help
Complete --help output of goto-instrument
2 parents 2dce80c + 40097ed commit 0532e66

File tree

4 files changed

+96
-46
lines changed

4 files changed

+96
-46
lines changed

src/goto-instrument/goto_instrument_parse_options.cpp

+76-45
Original file line numberDiff line numberDiff line change
@@ -1748,43 +1748,62 @@ 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
1756+
" --horn print program as constrained horn clauses\n"
17601757
"\n"
17611758
"Diagnosis:\n"
17621759
HELP_SHOW_PROPERTIES
1760+
HELP_DOCUMENT_PROPERTIES
17631761
" --show-symbol-table show loaded symbol table\n"
17641762
" --list-symbols list symbols with type information\n"
17651763
HELP_SHOW_GOTO_FUNCTIONS
17661764
HELP_GOTO_PROGRAM_STATS
1767-
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
1765+
" --show-locations show all source locations\n"
1766+
" --dot generate CFG graph in DOT format\n"
17681767
" --print-internal-representation\n" // NOLINTNEXTLINE(*)
17691768
" show verbose internal representation of the program\n"
17701769
" --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"
17731770
// NOLINTNEXTLINE(whitespace/line_length)
17741771
" --list-calls-args list all function calls with their arguments\n"
17751772
" --call-graph show graph of function calls\n"
17761773
// NOLINTNEXTLINE(whitespace/line_length)
17771774
" --reachable-call-graph show graph of function calls potentially reachable from main function\n"
17781775
HELP_SHOW_CLASS_HIERARCHY
1776+
HELP_VALIDATE
1777+
// NOLINTNEXTLINE(whitespace/line_length)
1778+
" --validate-goto-binary check the well-formedness of the passed in goto\n"
1779+
" binary and then exit\n"
1780+
" --interpreter do concrete execution\n"
1781+
"\n"
1782+
"Data-flow analyses:\n"
1783+
" --show-struct-alignment show struct members that might be concurrently accessed\n" // NOLINT(*)
17791784
// NOLINTNEXTLINE(whitespace/line_length)
17801785
" --show-threaded show instructions that may be executed by more than one thread\n"
17811786
" --show-local-safe-pointers show pointer expressions that are trivially dominated by a not-null check\n" // NOLINT(*)
17821787
" --show-safe-dereferences show pointer expressions that are trivially dominated by a not-null check\n" // NOLINT(*)
17831788
" *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"
1789+
" --show-value-sets show points-to information (using value sets)\n" // NOLINT(*)
1790+
" --show-global-may-alias show may-alias information over globals\n"
1791+
" --show-local-bitvector-analysis\n"
1792+
" show procedure-local pointer analysis\n"
1793+
" --escape-analysis perform escape analysis\n"
1794+
" --show-escape-analysis show results of escape analysis\n"
1795+
" --custom-bitvector-analysis perform configurable bitvector analysis\n"
1796+
" --show-custom-bitvector-analysis\n"
1797+
" show results of configurable bitvector analysis\n" // NOLINT(*)
1798+
" --interval-analysis perform interval analysis\n"
1799+
" --show-intervals show results of interval analysis\n"
1800+
" --show-uninitialized show maybe-uninitialized variables\n"
1801+
" --show-points-to show points-to information\n"
1802+
" --show-rw-set show read-write sets\n"
1803+
" --show-call-sequences show function call sequences\n"
1804+
" --show-reaching-definitions show reaching definitions\n"
1805+
" --show-dependence-graph show program-dependence graph\n"
1806+
" --show-sese-regions show single-entry-single-exit regions\n"
17881807
"\n"
17891808
"Safety checks:\n"
17901809
" --no-assertions ignore user assertions\n"
@@ -1795,33 +1814,66 @@ void goto_instrument_parse_optionst::help()
17951814
"\n"
17961815
"Semantic transformations:\n"
17971816
<< 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(*)
18031817
" --isr <function> instruments an interrupt service routine\n"
18041818
" --mmio instruments memory-mapped I/O\n"
18051819
" --nondet-static add nondeterministic initialization of variables with static lifetime\n" // NOLINT(*)
18061820
" --nondet-static-exclude e same as nondet-static except for the variable e\n" //NOLINT(*)
18071821
" (use multiple times if required)\n"
18081822
" --check-invariant function instruments invariant checking function\n"
1809-
HELP_REMOVE_POINTERS
1823+
" --function-enter <f>, --function-exit <f>, --branch <f>\n"
1824+
" instruments a call to <f> at the beginning,\n" // NOLINT(*)
1825+
" the exit, or a branch point, respectively\n"
18101826
" --splice-call caller,callee prepends a call to callee in the body of caller\n" // NOLINT(*)
1827+
" --check-call-sequence <seq> instruments checks to assert that all call\n"
1828+
" sequences match <seq>\n"
18111829
" --undefined-function-is-assume-false\n"
18121830
// NOLINTNEXTLINE(whitespace/line_length)
18131831
" convert each call to an undefined function to assume(false)\n"
18141832
HELP_INSERT_FINAL_ASSERT_FALSE
18151833
HELP_REPLACE_FUNCTION_BODY
1834+
HELP_RESTRICT_FUNCTION_POINTER
1835+
HELP_REMOVE_CALLS_NO_BODY
1836+
" --add-library add models of C library functions\n"
1837+
HELP_CONFIG_LIBRARY
1838+
" --model-argc-argv <n> model up to <n> command line arguments\n"
1839+
// NOLINTNEXTLINE(whitespace/line_length)
1840+
" --remove-function-body <f> remove the implementation of function <f> (may be repeated)\n"
1841+
HELP_REPLACE_CALLS
18161842
HELP_ANSI_C_LANGUAGE
18171843
"\n"
1818-
"Loop transformations:\n"
1844+
"Semantics-preserving transformations:\n"
1845+
" --ensure-one-backedge-per-target\n"
1846+
" transform loop bodies such that there is a\n"
1847+
" single edge back to the loop head\n"
1848+
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
1849+
HELP_REMOVE_POINTERS
1850+
" --constant-propagator propagate constants and simplify expressions\n" // NOLINT(*)
1851+
" --inline perform full inlining\n"
1852+
" --partial-inline perform partial inlining\n"
1853+
" --function-inline <function> transitively inline all calls <function> makes\n" // NOLINT(*)
1854+
" --no-caching disable caching of intermediate results during transitive function inlining\n" // NOLINT(*)
1855+
" --log <file> log in json format which code segments were inlined, use with --function-inline\n" // NOLINT(*)
1856+
" --remove-function-pointers replace function pointers by case statement over function calls\n" // NOLINT(*)
1857+
HELP_REMOVE_CONST_FUNCTION_POINTERS
1858+
" --value-set-fi-fp-removal build flow-insensitive value set and replace function pointers by a case statement\n" // NOLINT(*)
1859+
" over the possible assignments. If the set of possible assignments is empty the function pointer\n" // NOLINT(*)
1860+
" is removed using the standard remove-function-pointers pass. \n" // NOLINT(*)
1861+
"\n"
1862+
"Loop information and transformations:\n"
1863+
HELP_UNWINDSET
1864+
" --unwindset-file <file> read unwindset from file\n"
1865+
" --partial-loops permit paths with partial loops\n"
1866+
" --unwinding-assertions generate unwinding assertions\n"
1867+
" --continue-as-loops add loop for remaining iterations after unwound part\n" // NOLINT(*)
18191868
" --k-induction <k> check loops with k-induction\n"
18201869
" --step-case k-induction: do step-case\n"
18211870
" --base-case k-induction: do base-case\n"
18221871
" --havoc-loops over-approximate all loops\n"
18231872
" --accelerate add loop accelerators\n"
1873+
" --z3 use Z3 when computing loop accelerators\n"
18241874
" --skip-loops <loop-ids> add gotos to skip selected loops during execution\n" // NOLINT(*)
1875+
" --show-lexical-loops show single-entry-single-back-edge loops\n"
1876+
" --show-natural-loops show natural loop heads\n"
18251877
"\n"
18261878
"Memory model instrumentations:\n"
18271879
HELP_WMM_FULL
@@ -1838,43 +1890,22 @@ void goto_instrument_parse_optionst::help()
18381890
" of the functions on the shortest path\n"
18391891
" --aggressive-slice-preserve-function <f>\n"
18401892
" force the aggressive slicer to preserve function <f>\n" // NOLINT(*)
1841-
" --aggressive-slice-preserve-function containing <f>\n"
1893+
" --aggressive-slice-preserve-functions-containing <f>\n"
18421894
" force the aggressive slicer to preserve all functions with names containing <f>\n" // NOLINT(*)
1843-
"--aggressive-slice-preserve-all-direct-paths \n"
1895+
" --aggressive-slice-preserve-all-direct-paths \n"
18441896
" force aggressive slicer to preserve all direct paths\n" // NOLINT(*)
18451897
"\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"
18671898
"Code contracts:\n"
18681899
HELP_LOOP_CONTRACTS
18691900
HELP_REPLACE_CALL
18701901
HELP_ENFORCE_CONTRACT
18711902
"\n"
1872-
"Other options:\n"
1873-
" --version show version and exit\n"
1903+
"User-interface options:\n"
18741904
HELP_FLUSH
18751905
" --xml output files in XML where supported\n"
18761906
" --xml-ui use XML-formatted output\n"
18771907
" --json-ui use JSON-formatted output\n"
1908+
" --verbosity # verbosity level\n"
18781909
HELP_TIMESTAMP
18791910
"\n";
18801911
// clang-format on

src/goto-instrument/wmm/weak_memory.h

+12
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,21 @@ void introduce_temporaries(
9797
" --one-event-per-cycle only instruments one event per cycle\n" \
9898
" --minimum-interference instruments an optimal number of events\n" \
9999
" --my-events only instruments events whose ids appear in inst.evt\n" /* NOLINT(whitespace/line_length) */ \
100+
" --read-first|--write-first only instrument cycles where a read or \n" \
101+
" write occurs as first event, respectively\n" \
102+
" --max-var N limit cycles to N variables read/written\n" \
103+
" --max-po-trans N limit cycles to N program-order edges\n" \
104+
" --ignore-arrays instrument arrays as a single object\n" \
105+
" --cav11 always instrument shared variables, even\n" \
106+
" when they are not part of any cycle\n" \
107+
" --force-loop-duplication|--no-loop-duplication\n" \
108+
" optional program transformation to\n" \
109+
" construct cycles in program loops\n" \
100110
" --cfg-kill enables symbolic execution used to reduce spurious cycles\n" /* NOLINT(whitespace/line_length) */ \
101111
" --no-dependencies no dependency analysis\n" \
102112
" --no-po-rendering no representation of the threads in the dot\n"\
113+
" --hide-internals do not include thread-internal (Rfi)\n" \
114+
" events in dot output\n" \
103115
" --render-cluster-file clusterises the dot by files\n" \
104116
" --render-cluster-function clusterises the dot by functions\n"
105117

src/goto-programs/restrict_function_pointers.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ class optionst;
5858
" --" RESTRICT_FUNCTION_POINTER_FROM_FILE_OPT \
5959
" <file_name>\n" \
6060
" add function pointer restrictions from " \
61-
"file\n"
61+
"file\n" \
62+
" --" RESTRICT_FUNCTION_POINTER_BY_NAME_OPT \
63+
" <symbol_name>/target[targets]*>\n" \
64+
" restrict a function pointer where " \
65+
" <symbol_name>\n" \
66+
" is the unmangled name, before labelling " \
67+
"function pointers\n"
6268

6369
void parse_function_pointer_restriction_options_from_cmdline(
6470
const cmdlinet &cmdline,

src/util/config.h

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class symbol_tablet;
6565
" --malloc-may-fail allow malloc calls to return a null pointer\n" \
6666
" --malloc-fail-assert set malloc failure mode to assert-then-assume\n"\
6767
" --malloc-fail-null set malloc failure mode to return null\n" \
68+
" --string-abstraction track C string lengths and zero-termination\n" \
6869

6970

7071
#define OPT_CONFIG_JAVA \

0 commit comments

Comments
 (0)