MCPcopy Create free account
hub / github.com/csmith-project/csmith / print_help

Function print_help

src/RandomProgramGenerator.cpp:143–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static void print_help()
144{
145 cout << "Command line options: " << endl << endl;
146 // most common options
147 cout << " --help or -h: print this information." << endl << endl;
148 cout << " -hh: describe extra options probably useful only for Csmith developers." << endl << endl;
149 cout << " --version or -v: print the version of Csmith." << endl << endl;
150 cout << " --seed <seed> or -s <seed>: use <seed> instead of a random seed generated by Csmith." << endl << endl;
151 cout << " --output <filename> or -o <filename>: specify the output file name." << endl << endl;
152
153 // enabling/disabling options
154 cout << " --argc | --no-argc: genereate main function with/without argv and argc being passed (enabled by default)." << endl << endl;
155 cout << " --arrays | --no-arrays: enable | disable arrays (enabled by default)." << endl << endl;
156 cout << " --bitfields | --no-bitfields: enable | disable full-bitfields structs (enabled by default)." << endl << endl;
157 cout << " --checksum | --no-checksum: enable | disable checksum calculation (enabled by default)." << endl << endl;
158 cout << " --comma-operators | --no-comma-operators: enable | disable comma operators (enabled by default)." << endl << endl;
159 cout << " --compound-assignment | --no-compound-assignment: enable | disable compound assignments (enabled by default)." << endl << endl;
160 cout << " --concise: generated programs with minimal comments (disabled by default)." << endl << endl;
161 cout << " --consts | --no-consts: enable | disable const qualifier (enabled by default)." << endl << endl;
162 cout << " --divs | --no-divs: enable | disable divisions (enabled by default)." << endl << endl;
163 cout << " --embedded-assigns | --no-embedded-assigns: enable | disable embedded assignments as sub-expressions (enabled by default)." << endl << endl;
164 cout << " --pre-incr-operator | --no-pre-incr-operator: enable | disable pre ++ operator (enabled by default)." << endl << endl;
165 cout << " --pre-decr-operator | --no-pre-decr-operator: enable | disable pre -- operator (enabled by default)." << endl << endl;
166 cout << " --post-incr-operator | --no-post-incr-operator: enable | disable post ++ operator (enabled by default)." << endl << endl;
167 cout << " --post-decr-operator | --no-post-decr-operator: enable | disable post -- operator (enabled by default)." << endl << endl;
168 cout << " --unary-plus-operator | --no-unary-plus-operator: enable | disable + operator (enabled by default)." << endl << endl;
169 cout << " --jumps | --no-jumps: enable | disable jumps (enabled by default)." << endl << endl;
170 cout << " --longlong| --no-longlong: enable | disable long long (enabled by default)." << endl << endl;
171 cout << " --int8 | --no-int8: enable | disable int8_t (enabled by default)." << endl << endl;
172 cout << " --uint8 | --no-uint8: enable | disable uint8_t (enabled by default)." << endl << endl;
173 cout << " --float | --no-float: enable | disable float (disabled by default)." << endl << endl;
174 cout << " --main | --nomain: enable | disable to generate main function (enabled by default)." << endl << endl;
175 cout << " --math64 | --no-math64: enable | disable 64-bit math ops (enabled by default)." << endl << endl;
176 cout << " --inline-function | --no-inline-function: enable | disable inline attributes on generated functions." << endl << endl;
177 cout << " --inline-function-prob <num>: set the probability of each function being marked as inline (default is 50)." << endl << endl;
178
179 // numbered controls
180 cout << " --max-array-dim <num>: limit array dimensions to <num>. (default 3)" << endl << endl;
181 cout << " --max-array-len-per-dim <num>: limit array length per dimension to <num> (default 10)." << endl << endl;
182 cout << " --max-block-depth <num>: limit depth of nested blocks to <num> (default 5)." << endl << endl;
183 cout << " --max-block-size <size>: limit the number of non-return statements in a block to <size> (default 4)." << endl << endl;
184 cout << " --max-expr-complexity <num>: limit expression complexities to <num> (default 10)." << endl << endl;
185 cout << " --max-funcs <num>: limit the number of functions (besides main) to <num> (default 10)." << endl << endl;
186 cout << " --max-pointer-depth <depth>: limit the indirect depth of pointers to <depth> (default 2)." << endl << endl;
187 cout << " --max-struct-fields <num>: limit the number of struct fields to <num> (default 10). " << endl << endl;
188 cout << " --max-union-fields <num>: limit the number of union fields to <num> (default 5). " << endl << endl;
189
190 cout << " --muls | --no-muls: enable | disable multiplications (enabled by default)." << endl << endl;
191 cout << " --safe-math | --no-safe-math: Emit safe math wrapper functions (enabled by default)." << endl << endl;
192 cout << " --packed-struct | --no-packed-struct: enable | disable packed structs by adding #pragma pack(1) before struct definition (enabled by default)." << endl << endl;
193 cout << " --paranoid | --no-paranoid: enable | disable pointer-related assertions (disabled by default)." << endl << endl;
194 cout << " --pointers | --no-pointers: enable | disable pointers (enabled by default)." << endl << endl;
195 cout << " --quiet: generate programs with less comments (disabled by default)." << endl << endl;
196 cout << " --structs | --no-structs: enable | disable to generate structs (enable by default)." << endl << endl;
197 cout << " --unions | --no-unions: enable | disable to generate unions (enable by default)." << endl << endl;
198 cout << " --volatiles | --no-volatiles: enable | disable volatiles (enabled by default)." << endl << endl;
199 cout << " --volatile-pointers | --no-volatile-pointers: enable | disable volatile pointers (enabled by default)." << endl << endl;
200 cout << " --const-pointers | --no-const-pointers: enable | disable const pointers (enabled by default)." << endl << endl;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected