| 211 | } |
| 212 | |
| 213 | static void print_advanced_help() |
| 214 | { |
| 215 | cout << "'Advanced' command line options that are probably only useful for Csmith's" << endl; |
| 216 | cout << "original developers:" << endl << endl; |
| 217 | // file split options |
| 218 | cout << " --max-split-files <num>: evenly split a generated program into <num> different files(default 0)." << endl << endl; |
| 219 | cout << " --split-files-dir <dir>: generate split-files into <dir> (default ./output)." << endl << endl; |
| 220 | |
| 221 | // dfs-exhaustive mode options |
| 222 | cout << " --dfs-exhaustive: enable depth first exhaustive random generation (disabled by default)." << endl << endl; |
| 223 | cout << " --expand-struct: enable the expansion of struct in the exhaustive mode. "; |
| 224 | cout << "Only works in the exhaustive mode and cannot used with --no-structs." << endl << endl; |
| 225 | |
| 226 | cout << " --compact-output: print generated programs in compact way. "; |
| 227 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 228 | |
| 229 | cout << " --max-nested-struct-level <num>: limit maximum nested level of structs to <num>(default 0). "; |
| 230 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 231 | |
| 232 | cout << " --struct-output <file>: dump structs declarations to <file>. "; |
| 233 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 234 | |
| 235 | cout << " --prefix-name: prefix names of global functions and variables with increasing numbers. "; |
| 236 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 237 | |
| 238 | cout << " --sequence-name-prefix: prefix names of global functions and variables with sequence numbers."; |
| 239 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 240 | |
| 241 | cout << " --compatible-check: disallow trivial code such as i = i in random programs. "; |
| 242 | cout << "Only works in the exhaustive mode." << endl << endl; |
| 243 | |
| 244 | // target platforms |
| 245 | cout << " --msp: enable certain msp related features " << endl << endl; |
| 246 | cout << " --ccomp: generate compcert-compatible code" << endl << endl; |
| 247 | |
| 248 | // symblic excutions |
| 249 | cout << " --splat: enable splat extension" << endl << endl; |
| 250 | cout << " --klee: enable klee extension" << endl << endl; |
| 251 | cout << " --crest: enable crest extension" << endl << endl; |
| 252 | |
| 253 | // coverage test options |
| 254 | cout << " --coverage-test: enable coverage-test extension" << endl << endl; |
| 255 | cout << " --coverage-test-size <num>: specify size (default 500) of the array generated to test coverage. "; |
| 256 | cout << "Can only be used with --coverage-test." << endl << endl; |
| 257 | |
| 258 | cout << " --func1_max_params <num>: specify the number of symbolic variables passed to func_1 (default 3). "; |
| 259 | cout << "Only used when --splat | --crest | --klee | --coverage-test is enabled." << endl << endl; |
| 260 | |
| 261 | // struct/union related options |
| 262 | cout << " --fixed-struct-fields: fix the size of struct fields to max-struct-fields (default 10)." << endl << endl; |
| 263 | cout << " --return-structs | --no-return-structs: enable | disable return structs from a function (enabled by default)." << endl << endl; |
| 264 | cout << " --arg-structs | --no-arg-structs: enable | disable structs being used as args (enabled by default)." << endl << endl; |
| 265 | cout << " --return-unions | --no-return-unions: enable | disable return unions from a function (enabled by default)." << endl << endl; |
| 266 | cout << " --arg-unions | --no-arg-unions: enable | disable unions being used as args (enabled by default)." << endl << endl; |
| 267 | cout << " --take-union-field-addr | --take-no-union-field-addr: allow | disallow addresses of union fields to be taken (allowed by default)." << endl << endl; |
| 268 | cout << " --vol-struct-union-fields | --no-vol-struct-union-fields: enable | disable volatile struct/union fields (enabled by default)" << endl << endl; |
| 269 | cout << " --const-struct-union-fields | --no-const-struct-union-fields: enable | disable const struct/union fields (enabled by default)" << endl << endl; |
| 270 | |